Runtime Error: Broken Pipe

91 views
Skip to first unread message

MUV

unread,
Sep 18, 2023, 5:16:24 PM9/18/23
to AMPL Modeling Language
I am getting  "RuntimeError: cannot write to file: Broken pipe" error in colab. The same mod and dat file give me a solution in AMPLIDE. The full error is given below.

RuntimeError Traceback (most recent call last) <ipython-input-8-505cf0d9d040> in <cell line: 1>() ----> 1 get_ipython().run_cell_magic('ampl_eval', '', '\nreset;\n\n# Model File\n\nmodel HerV2.mod;\ndata HerV2.dat;\n\n# Calling Optimization Engine and solving the problem\n\noption solver cplex;\n\nsolve;\n\n# Display Results\n\ndisplay Z, q; \n')

4 frames
/usr/local/lib/python3.10/dist-packages/google/colab/_shell.py in run_cell_magic(self, magic_name, line, cell) 332 if line and not cell: 333 cell = ' ' --> 334 return super().run_cell_magic(magic_name, line, cell) 335 336 /usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell) 2471 with self.builtin_trap: 2472 args = (magic_arg_s, cell) -> 2473 result = fn(*args, **kwargs) 2474 return result 2475 <decorator-gen-122> in ampl_eval(self, line, cell) /usr/local/lib/python3.10/dist-packages/IPython/core/magic.py in <lambda>(f, *a, **k) 185 # but it's overkill for just that one bit of state. 186 def magic_deco(arg): --> 187 call = lambda f, *a, **k: f(*a, **k) 188 189 if callable(arg): /usr/local/lib/python3.10/dist-packages/ampltools/utils.py in ampl_eval(self, line, cell) 51 else: 52 ampl = ampl_object ---> 53 ampl.eval("\n" + cell) 54 55 @line_magic /usr/local/lib/python3.10/dist-packages/amplpy/ampl.py in eval(self, statements, **kwargs) 264 if self._langext is not None: 265 statements = self._langext.translate(statements, **kwargs) --> 266 self._impl.eval(statements) 267 self._error_handler_wrapper.check() 268 RuntimeError: cannot write to file: Broken pipe  

Any help is really appreciated. 

AMPL Google Group

unread,
Sep 20, 2023, 5:14:53 PM9/20/23
to AMPL Modeling Language
Thanks for reporting this issue. How much memory does it take locally and have you tried running the notebook locally? This may be due to the AMPL process being killed due to memory usage.


--
Filipe Brandão

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
{#HS:2364890917-119456#}
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/a93350b8-37f4-411c-9282-ed395e1225b3n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages