Skip to content
Advertisement

`SolverResults Error` When Parallelising Pyomo Optimisations

I’m trying to optimise multiple linear programming problems in parallel using Pyomo and the standard Python multiprocessing library. When switching to using multi-processing I keep running into the error: ValueError: Cannot load a SolverResults object with bad status: error.

A similar issue was reported in this question, where their problem seemed to be that the solver (n.b. they used cbc whereas I used cplex) was timing out and couldn’t gracefully quit. This doesn’t seem to be the issue with my error though. One guess is that the cplex solver is trying to write to a temporary file that is then getting overwritten by the parallel optimisations.

Any help fixing this error would be much appreciated! The following code should reproduce the error.

JavaScript
JavaScript

Advertisement

Answer

A solution to the overall problem (but not this specific error) was to use glpk solver from here.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement