GAMS Model Error when scenario solve #582
Unanswered
Bomi-Kim-96
asked this question in
Getting started
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am studying on MESSAGE-ix model by installing v3.4.0 and running westeros tutorial.
However, while running scen.solve() on 'westeros_flexible_generation.ipynb', There was a problem with a GAMS error(code 3: execution error) .
And there is no problem with the GAMS license, Any suggestion on how to solve it? I attached the error message and message version.
ModelError Traceback (most recent call last)
Input In [10], in <cell line: 1>()
----> 1 scen.solve()
File c:\users\aisg\appdata\local\programs\python\python38\lib\site-packages\message_ix\core.py:566, in Scenario.solve(self, model, solve_options, **kwargs)
546 def solve(self, model="MESSAGE", solve_options={}, **kwargs):
547 """Solve MESSAGE or MESSAGE-MACRO for the Scenario.
548
549 By default, :meth:
ixmp.Scenario.solve
is called with 'MESSAGE' as the(...)
564 :class:
.GAMSModel
.565 """
--> 566 super().solve(model=model, solve_options=solve_options, **kwargs)
File c:\users\aisg\appdata\local\programs\python\python38\lib\site-packages\ixmp\core\scenario.py:836, in Scenario.solve(self, model, callback, cb_kwargs, **model_options)
834 # Iterate until convergence
835 while True:
--> 836 model_obj.run(self)
838 # Store an iteration number to help the callback
839 if not hasattr(self, "iteration"):
File c:\users\aisg\appdata\local\programs\python\python38\lib\site-packages\message_ix\models.py:364, in GAMSModel.run(self, scenario)
361 optfile.write_text("\n".join(lines))
363 try:
--> 364 result = super().run(scenario)
365 finally:
366 # Remove the optfile regardless of whether the run completed
367 # without error. The file may have been removed already by another
368 # run (in a separate process) that completed before this one.
369 # py37 compat: check for existence instead of using
370 # unlink(missing_ok=True)
371 if optfile.exists():
File c:\users\aisg\appdata\local\programs\python\python38\lib\site-packages\ixmp\model\gams.py:296, in GAMSModel.run(self, scenario)
293 check_call(command, shell=os.name == "nt", cwd=self.cwd)
294 except CalledProcessError as exc:
295 # Do not remove self.temp_dir; the user may want to inspect the GDX file
--> 296 raise self.format_exception(exc, model_file) from None
298 # Read model solution
299 scenario.platform._backend.read_file(
300 self.out_file,
301 ItemType.MODEL,
(...)
306 var_list=as_str_list(self.var_list) or [],
307 )
ModelError: GAMS errored with return code 3:
There was an execution error
For details, see the terminal output above, plus:
Listing : c:\users\aisg\appdata\local\programs\python\python38\lib\site-packages\message_ix\model\MESSAGE_run.lst
Input data: c:\users\aisg\appdata\local\programs\python\python38\lib\site-packages\message_ix\model\data\MsgData_Westeros_Electrified_flexible_generation.gdx
message-ix show-versions
ixmp: 3.4.0
message_ix: 3.4.0
message_ix_models: None
message_data: None
click: 8.1.2
dask: 2022.04.1
genno: installed
graphviz: 0.20
jpype: 1.3.0
… JVM path: C:\Program Files\Java\jre-9.0.4\bin\server\jvm.dll
openpyxl: 3.0.9
pandas: 1.4.2
pint: 0.18
xarray: 2022.3.0
yaml: 6.0
iam_units: installed
jupyter: 1.0.0
matplotlib: 3.5.1
plotnine: None
pyam: 1.4.0
GAMS: 37.1.0
python: 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('Korean_Korea', '949')
Beta Was this translation helpful? Give feedback.
All reactions