Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to download input files once per gamscompile if missing #1693

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

orichters
Copy link
Contributor

@orichters orichters commented Jun 5, 2024

Purpose of this PR

  • try to download input files once per gamscompile if missing to avoid that ./start.R --gamscompile fails with some config files because another run was interrupted on the standby partition while distributing input files.
  • fix the exclusion of coupled config files. The filenames still have the foldername in front of them, so with ^ it doesn't match anymore.

Type of change

  • Bug fix

Checklist:

  • My code follows the coding etiquette
  • I performed a self-review of my own code
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • I adjusted the reporting in remind2 where it was needed
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • All automated model tests pass (FAIL 0 in the output of make test)
  • The changelog CHANGELOG.md has been updated correctly

@@ -243,6 +243,10 @@ if (any(c("--reprepare", "--restart") %in% flags)) {
slurmConfig <- "direct"
message("\nTrying to compile ", nrow(scenarios), " selected runs...")
lockID <- gms::model_lock()
if (length(missingInputData()) > 0) {
# try to fix missing input data, but only once at the beginning, not for every scenario
updateInputData(readDefaultConfig("."), remindPath = ".", gamsCompile = FALSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a problem, that at this point the cfg is not yet configured and we have to use the defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Because if one of the scenarios has a different cfg, this line will trigger a reload anyway. So what might happen if you want to compile a REMIND-EU config file and some input files are missing, that it first downloads REMIND-H12 and then again REMIND-EU. But well, it doesn't break anything.

Copy link
Contributor

@dklein-pik dklein-pik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@orichters orichters merged commit fe4d6fd into remindmodel:develop Jun 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants