Closed arnaud-leroy closed 6 years ago
Yes, it seems like perhaps the solver runs out of memory. Do you have an indication of what memory usage looks like during the run?
Assuming you are using calliope run
, can you re-run with calliope run --debug
so we see more output on what's going wrong?
Thanks! No, I don't have a precise way to measure the memory consumption on that server during the run. But I will run it with --debug to have more information.
At the same time, we are trying to increase our available memory. I think another solution may be to use a lower timestep (every 2 or 3 hours).
I get the same error. Trace stack is:
Traceback (most recent call last): File "run_dates.py", line 42, in <module> raise(inst) File "run_dates.py", line 36, in <module> model_2.run() File "/home/ubuntu/calliope_dir/calliope/calliope/core.py", line 1368, in run self.solve() File "/home/ubuntu/calliope_dir/calliope/calliope/core.py", line 1475, in solve self.results, warnmsg = self._solve_with_output_capture(warmstart, solver_kwargs) File "/home/ubuntu/calliope_dir/calliope/calliope/core.py", line 1411, in _solve_with_output_capture return self._solve(warmstart, solver_kwargs) File "/home/ubuntu/calliope_dir/calliope/calliope/core.py", line 1427, in _solve results = self.opt.solve(self.m, tee=True, **solver_kwargs) File "/home/ubuntu/miniconda3/envs/cal/lib/python3.6/site-packages/pyomo/opt/base/solvers.py", line 589, in solve _status = self._apply_solver() File "/home/ubuntu/miniconda3/envs/cal/lib/python3.6/site-packages/pyomo/opt/solver/shellcmd.py", line 242, in _apply_solver self._rc, self._log = self._execute_command(self._command) File "/home/ubuntu/miniconda3/envs/cal/lib/python3.6/site-packages/pyomo/opt/solver/shellcmd.py", line 305, in _execute_command tee = self._tee File "/home/ubuntu/miniconda3/envs/cal/lib/python3.6/site-packages/pyutilib/subprocess/processmngr.py", line 673, in run_command th.join() UnboundLocalError: local variable 'th' referenced before assignment
I suspect it is due to the memory, because the model worked at higher time-step
This is definitely a memory issue causing Pyomo to fail, which to some extent we can do nothing about when models get really large (though 0.6.x improves things). Closing this as we are tracking that general issue in #69.
Hello,
I am running a model with 26 locations and 20 technologies over 8784 hours. The preprocessing was successful but an error appears while solving the model:
Because the model is working well for much smaller timesteps, I am suspecting a lack of memory. But it is maybe something else.
Thanks for your help! Arnaud