Process MemTimer-1, Broken Pipe Error

32 views
Skip to first unread message

Diego Rios

unread,
Apr 8, 2025, 2:44:34 AMApr 8
to pypsa
Hello,
When I try an optimization using more than one core, I get a Process MemTimer-1 error with BrokenPipeError: [WinError 232] The pipeline is being closed (see bottom).
When I run the optimization with only 1 core i have no problems, but it is only on the multiprocessing. I'm using a slight outdated pypsa-eur version (0.8.1), but I looked into the release notes and I have not found anything related to this issue.

Thanks for any help,
--Diego Rios

Process MemTimer-1: Traceback (most recent call last): File "...\envs\pypsa-eur\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "...\pypsa-eur-0.8.1\rules\..\scripts\_benchmark.py", line 96, in run self.pipe.send(mem_usage) File "...\envs\pypsa-eur\lib\multiprocessing\connection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "...\envs\pypsa-eur\lib\multiprocessing\connection.py", line 280, in _send_bytes ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True) BrokenPipeError: [WinError 232]
The pipeline is being closed

Johannes Hampp

unread,
Apr 9, 2025, 3:36:37 AMApr 9
to pypsa
Hi Diego,

Have you tried running the model in WSL?


Best,
Johannes

Diego Rios

unread,
Apr 11, 2025, 5:20:35 AMApr 11
to pypsa
Hello  Johannes and thanks for the answer.

So, I tried with WSL and it works fine! It is much faster even if I use only 1 core, and it accepts using 4 cores, so I think using WSL is the best way around.

The only thing, if it helps anybody, I had to change n.objective = m.objective_value by n.objective = m.objective.value in the definition of the function assign_solution in optimize.py (line 368). It might have something to do with the versions I'm using, but I thought of mentioning it.

Thanks again. Regards,
--Diego
Reply all
Reply to author
Forward
0 new messages