-
Notifications
You must be signed in to change notification settings - Fork 170
scenario.solve() error in 3.11.1 version #1000
Description
What happened?
After upgrading MESSAGEix to v3.11.1, I attempted to run the Westeros baseline scenario, but encountered an error during the execution of scenario.solve(). I have attempted several troubleshooting steps based on guidance from ChatGPT, but the issue persists. I would appreciate your assistance in identifying the cause and resolving this error.
Exception Traceback (most recent call last)
File MsgScenario.java:1328, in at.ac.iiasa.ixmp.objects.MsgScenario.toGDX()
Exception: Java Exception
The above exception was the direct cause of the following exception:
java.lang.UnsatisfiedLinkError Traceback (most recent call last)
Cell In[28], line 1
----> 1 scenario.solve()
File ~\anaconda3\envs\message_env\Lib\site-packages\message_ix\core.py:753, in Scenario.solve(self, model, solve_options, **kwargs)
734 def solve(self, model="MESSAGE", solve_options={}, **kwargs):
735 """Solve MESSAGE or MESSAGE-MACRO for the Scenario.
736
737 By default, :meth:ixmp.Scenario.solve is called with 'MESSAGE' as the
(...) 751 :class:.MESSAGE_MACRO class and :class:.GAMSModel.
752 """
--> 753 super().solve(model=model, solve_options=solve_options, **kwargs)
File ~\anaconda3\envs\message_env\Lib\site-packages\ixmp\core\scenario.py:894, in Scenario.solve(self, model, callback, cb_kwargs, **model_options)
892 # Iterate until convergence
893 while True:
--> 894 model_obj.run(self)
896 # Store an iteration number to help the callback
897 if not hasattr(self, "iteration"):
File ~\anaconda3\envs\message_env\Lib\site-packages\message_ix\models.py:506, in MESSAGE.run(self, scenario)
503 self.var_list = self.var_list or []
504 self.var_list.extend(variable.gams_name for variable in REQUIRED_VARIABLES)
--> 506 super().run(scenario)
File ~\anaconda3\envs\message_env\Lib\site-packages\message_ix\models.py:242, in GAMSModel.run(self, scenario)
239 lines2 = ("{} = {}".format(*kv) for kv in self.cplex_opts.items())
240 optfile2.write_text("\n".join(lines2))
--> 242 result = super().run(scenario)
244 # In previous versions, the cplex.opt file(s) were removed at this point
245 # in the workflow. This has been removed due to issues when running
246 # scenarios asynchronously.
248 return result
File ~\anaconda3\envs\message_env\Lib\site-packages\ixmp\model\gams.py:423, in GAMSModel.run(self, scenario)
419 s_arg["container_data"] = self.container_data
421 try:
422 # Write model data to file
--> 423 scenario.platform._backend.write_file(
424 self.in_file, ItemType.SET | ItemType.PAR, **s_arg
425 )
426 except NotImplementedError: # pragma: no cover
427 # No coverage because there currently is no such Backend that doesn't
428 # support GDX
429
430 # Remove the temporary directory, which should be empty
431 self.remove_temp_dir()
File ~\anaconda3\envs\message_env\Lib\site-packages\ixmp\backend\jdbc.py:616, in JDBCBackend.write_file(self, path, item_type, **kwargs)
613 raise ValueError("write to GDX requires a Scenario object")
615 # include_var_equ=False -> do not include variables/equations in GDX
--> 616 self.jindex[ts].toGDX(str(path.parent), path.name, False)
617 elif path.suffix == ".csv" and item_type is ItemType.TS:
618 models = set(filters.pop("model"))
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: no utiljni64 in java.library.path: C:\Users\Cheolhung\anaconda3\envs\message_env\Lib\site-packages\tutorial\westeros\apifiles\Java\api;C:\Users\Cheolhung\anaconda3\envs\message_env\Lib\site-packages\ixmp\backend\jdbc\AMD64
Code Sample
What did you expect to happen?
.
Versions
(message_env) C:\Users\Cheolhung>message-ix show-versions
ixmp: 3.11.1
message_ix: 0.0.0
message_ix_models: (not installed)
message_data: (not installed)
click: 8.3.1
dask: 2026.1.1
genno: 1.29.1
graphviz: (not installed)
ixmp4: (not installed)
jpype: 1.6.0
Java VM path: C:\Users\Cheolhung\anaconda3\envs\message_env\Library\lib\jvm\bin\server\jvm.dll
openpyxl: 3.1.5
pandas: 3.0.0
pint: 0.25.2
xarray: 2025.12.0
yaml: 6.0.3
iam_units: 2025.10.13
jupyter: 5.9.1
matplotlib: 3.10.8
plotnine: 0.15.2
pyam: 1.6.0
GAMS: 24.8.3
system dir: C:\Users\Cheolhung
python: 3.13.11 | packaged by conda-forge | (main, Jan 26 2026, 23:43:44) [MSC v.1944 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 11
machine: AMD64
processor: Intel64 Family 6 Model 142 Stepping 11, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('Korean_Korea', '949')
### Additional Context
_No response_