Model is solvable in one system whereas no ouptut in other system.
OngoingI wrote a MILP program in python (jupyter notebook editor). For optimization, I am using Gurobi software. One laptop gives me a solution within 7 sec whereas the other system runs (occupying all available cores) and gives no output at all (I observed for 30-40 min.).
Description of the system giving solutions within 7 sec. :
8 GB RAM, 8 CPU
Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
Gurobipy 9.1.2
Gurobi 9.1.2
installed under Anaconda environment SageMath
Description of the system giving no solution :
64 GB RAM, 48 CPU
Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz
Gurobipy 9.1.2
Gurobi 9.1.2
installed under Anaconda environment SageMath
Basic framework of program is as follows:
import gurobipy as gp
from gurobipy import GRB
model = gp.Model()
****Some Constraints and Variables****
model.optimize()
temp = model.x
Can anyone help me? Is there any installation problem, processor problem etc? Why there is a huge time difference of solution for the two systems under the same model?
Edited:
Here I have uploaded the .mps file of the same.
https://www.dropbox.com/sh/8j3zrkkxwts1ovy/AACbQzvUdt6HPmlgqI_AtQB8a?dl=0
File structure:
├── model.mps
├── system1_successful-output_log
│ └── gurobi.log
└── system2_unsuccessful-output_log
└── gurobi.log
2 directories, 3 files
System1 folder contains the log of successful output whereas System2 folder contains the log of unsuccessful output.
-
Hi,
It is not unusual that Gurobi performs differently on different machines due to performance variability, see Why does Gurobi perform differently on different machines? However, your case seems very extreme. Such cases are often caused by numerical issues during the optimization process. The documentation article Does my model have numerical issues? and our Guidelines for Numerical Issues provide a good starting point to tackle sources of numerical issues in the model.
You could provide an MPS file to make the issue reproducible. Please have a look at How do I write an MPS model file from a third-party API? You can then share this MPS file as described in Posting to the Community Forum.
Once you exported an MPS file of your problem, could you try solving it using the gurobi command line tool on both machines to see whether the issue is still reproducible?
Best regards,
Jaromił1 -
Hi Jaromił, thanks for your reply. I checked for numerical issues as you suggested. I could not find any issue while printing m.printStats(), however when I tried to print m.KappaExact, it gives the following error:
AttributeError: Unable to retrieve attribute 'KappaExact'
I also run .mps file on both systems using the gurobi_cl command and observed the same issues.
Thus I have provided a dropbox link to my .mps file. For system 2, I interrupted the process (after 5-10 min) and attach the log file. Link has been provided in the edit section of my problem.
Please check. Again thanks for the help.
0
Please sign in to leave a comment.
Comments
2 comments