0

I reveive the following error code (I blocked my name with XXX):

 File "/home/XXX/anaconda3/envs/pulposm/lib/python3.7/site-packages/pulp/pulp.py", line 1664, in solve
    status = solver.actualSolve(self, **kwargs)
  File "/home/XXX/anaconda3/envs/pulposm/lib/python3.7/site-packages/pulp/solvers.py", line 502, in actualSolve
    raise PulpSolverError("PuLP: Error while trying to execute "+self.path)
pulp.solvers.PulpSolverError: PuLP: Error while trying to execute cplex

I figured that the error code is produced in the following line: (https://github.com/coin-or/pulp/blob/5b80f9dc7f11376d317469d1a6ea31c83b2c9631/pulp/apis/cplex_api.py#L68)

if cplex.returncode != 0:
    raise PulpSolverError("PuLP: Error while trying to execute "+self.path)

Does anyone have ideas what can trigger the problem or how to solve it?

Here's the part of the Cplex log output where the error occurs:

128768 118996     7516.8164    42     7103.1741     7608.9390  6203301    7.12%
 128792 121137     7279.3145    44     7103.1741     7608.6999  6286364    7.12%
 128907 121055     7570.8491    17     7103.1741     7608.6999  6283339    7.12%
 129180 121246     7313.2036    24     7103.1741     7608.6999  6297312    7.12%
 129959 121502     7431.4681    45     7103.1741     7608.4919  6311096    7.11%
 131008 121495     7519.4483    45     7103.1741     7608.4919  6308404    7.11%
 132292 122261     7373.1288    31     7103.1741     7608.3116  6341504    7.11%
 133410 122143     7458.9598    41     7103.1741     7608.0257  6337036    7.11%
 134815 124577     7504.9377    36     7103.1741     7607.9550  6431868    7.11%
Elapsed time = 3852.00 sec. (955701.63 ticks, tree = 63182.69 MB, solutions = 62)
Nodefile size = 61135.38 MB (51982.32 MB after compression)
 136056 126079     7391.4353    20     7103.1741     7607.6933  6485133    7.10%
 137401 125917     7111.0226    29     7103.1741     7607.6933  6478042    7.10%
 138503 127750     7551.3553    40     7103.1741     7607.6933  6532990    7.10%
 139426 127962     7531.9580    37     7103.1741     7607.6469  6544624    7.10%
 140196 130269     7555.4712    28     7103.1741     7607.6469  6616851    7.10%
Traceback (most recent call last):
  File "main.py", line 88, in <module>
    service(Graph, C, source, origins, destinations, seats, pickuptime, dropofftime, k)
  File "/home/XXX/PycharmProjects/ride_8_k5/service.py", line 65, in service
    opt_out, M)
  File "/home/XXX/PycharmProjects/ride_8_k5/crit3_origobj_mod1.py", line 85, in crit3_origobj_mod1
    prob.solve(CPLEX_CMD(timelimit=7200, msg=1))
  File "/home/XXX/anaconda3/envs/pulposm/lib/python3.7/site-packages/pulp/pulp.py", line 1664, in solve
    status = solver.actualSolve(self, **kwargs)
  File "/home/XXX/anaconda3/envs/pulposm/lib/python3.7/site-packages/pulp/solvers.py", line 502, in actualSolve
    raise PulpSolverError("PuLP: Error while trying to execute "+self.path)
pulp.solvers.PulpSolverError: PuLP: Error while trying to execute cplex
  • Can you show the full log output? Could it be that CPLEX started to use lots of memory and was killed? – Daniel Junglas Mar 24 '20 at 13:22
  • And just in case someone of PULP reads this: it would be nice if the `PulpSolverError` would include the `cplex.returncode` in the error message. That would allow a first quick guess on what went wrong. – Daniel Junglas Mar 24 '20 at 16:31
  • @DanielJunglas It could indeed be the use of lots of memory. If that is the reason, do you know how to avoid the problem? I am doing a lot of runs to solve several MIPs (one after another), maybe that is part of the problem too. – katherinejohnson Mar 25 '20 at 12:04
  • You can ask CPLEX to swap out parts of the search tree to disk. Check the "Use node files for storage" in this section of the user manual: https://www.ibm.com/support/knowledgecenter/SSSA5P_12.10.0/ilog.odms.cplex.help/CPLEX/UsrMan/topics/discr_optim/mip/troubleshoot/61_mem_gone.html (I don't know how to set CPLEX parameters with PuLP but it is definitely doable). If that does not help, try reducting the number of threads that CPLEX uses by setting this parameter: https://www.ibm.com/support/knowledgecenter/SSSA5P_12.10.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/Threads.html – Daniel Junglas Mar 25 '20 at 13:01

0 Answers0