multiprocessing: passing a Gurobi model from a process to another
AnsweredDear All,
I have two questions:
1. Is it possible to pass a Gurobi model from a process to another while doing multiprocessing in Python?
2. is it possible to share a Gurobi model among different processors?
thanks
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Sami,
I am not sure what exactly you are asking for. Gurobi does support multiprocessor optimization and even has a distributed memory mode. This is happening internally and does not require any interactions from the user.
What do you mean by "passing a Gurobi model from one process to another"?
Cheers,
Matthias0 -
Hi Matthias,
I have a follow up question, how does Gurobi figure out how many cores it can use? What i understood is that we need to write a function that tells Gurobi how many cores to use and what needs to be processed in which core. So that will need user interaction right?
Also are there examples of using multiple cores for generating the gurobi variables and objective functions etc. for huge models?0 -
Hi Upasana,
There are several ways to ask the machine how many cores or threads there are. On Linux, you can follow these instructions: c - Maximum number of threads per process - sysconf(_SC_THREAD_THREADS_MAX) failing - Stack Overflow
I am not aware of any examples generating models in parallel. I don't believe that a model that is so large that it relies on or significantly benefits from this can be solved afterward.
Cheers,
Matthias0
Post is closed for comments.
Comments
4 comments