I need to solve one LP per thread at the same time.
I'm coding in Matlab and using gurobi as a solver. Since gurobi is an API that actually run calculations in C++, I'm unable to use several threads at the same time, despite that Simplex be a single thread algorithm. I tried the parfor function, but I got the MEX function error ("Use of MEX functions is not supported on a thread-based worker.").
I would like to highlight that those LP are similar and I can't build one big problem with all of them since some can be infeasible. So, build one big LP and solving using barrier (which is multithread) is not an option.
Is there any way (using gurobi or something else, even other programming language) to handle that?
I tried to solve that using parallel toolbox from Matlab, however, since gurobi is a MEX function, I'm unable to assign one thread to each LP simultaneously. I would like to know if someone knows a way to do that, even if it using other programming language and/or solver.
I need to solve one LP per thread at the same time.
I'm coding in Matlab and using gurobi as a solver. Since gurobi is an API that actually run calculations in C++, I'm unable to use several threads at the same time, despite that Simplex be a single thread algorithm. I tried the parfor function, but I got the MEX function error ("Use of MEX functions is not supported on a thread-based worker.").
I would like to highlight that those LP are similar and I can't build one big problem with all of them since some can be infeasible. So, build one big LP and solving using barrier (which is multithread) is not an option.
Is there any way (using gurobi or something else, even other programming language) to handle that?
I tried to solve that using parallel toolbox from Matlab, however, since gurobi is a MEX function, I'm unable to assign one thread to each LP simultaneously. I would like to know if someone knows a way to do that, even if it using other programming language and/or solver.
As you have discovered, MEX files are not currently supported on thread pools. However, MEX files are supported on process pools, i.e. try
parpool("Processes")