-
Notifications
You must be signed in to change notification settings - Fork 153
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
introduce scenario specific names for .log and .lst GAMS files #716
Comments
As an additional consideration, storing the |
From the Messageix meeting today, there is a module(s) to automate logging in python. e.g. |
The code already contains mechanisms to generate and pass specific command-line options to GAMS; this is how the input and output GDX files are identified to the GAMS code: message_ix/message_ix/models.py Lines 315 to 322 in 6dee23a
I imagine this could easily be extended to set those other options on a per-solve basis.
For the present issue, the log files in question are generated entirely by GAMS processes that are not accessible to Python, stdlib
I don't know if the current Java ixmp_source (probably not) or the new ixmp4 backend (possibly?) support such storage. I would suggest (a) this can be a separate issue and (b) we first document and promote the practice used in the NAVIGATE project, i.e. using symlinks, network drives, the filesystem and/or configurable paths to point the "GAMS log directory" or "GAMS listing directory" to a shared location. |
I concur that this can be separated into two issues with the log/lst file storage being much easier to deal with. The idea of storing files as part of the scenario object is probably indeed best addressed in the migration to ixmp4 backend. I will raise it in this context. |
At present,
.log
and.lst
files of MESSAGEix model runs overwrite each other, since the files are generically calledMESSAGE_run.log
andMESSAGE-MACRO_run.log
when runningMESSAGE
andMESSAGE-MACRO
, respectively (and similarly for the.lst
files). It is often useful to keep these files after the scenarios have been completed, e.g., to compare with scenarios run as part of the same batch.I would therefore suggest to introduce scenario specific names to the
.log
and.lst
files, using the same naming convention as for theGDX
input and output files. This can either be achieved by renaming the files after completing the scenarios or using GAMS native command line options-lf
for.log
files and-o
for.lst
files that allows naming those files. For example, the following code snippet would something along those lines:gams MESSAGE_run.gms -o=Msg_model_scenario.lst -lf=Msg_model_scenario.log
(see GAMS documentation).With many files potentially accumulating, it would probably make sense to move them to a separate folder.
The text was updated successfully, but these errors were encountered: