Dear GAMS experts,
I am trying to figure out whether the use of the Python API GAMSModelInstance for multithreading would be possible for an MCP GAMS model.
From the API intro I see that only a few solvers take full advantage of solving models through model instances, but could not find anything on MCP/PATH.
I only see a post from 4 years ago https://newforum.gams.com/t/modifying-parameter-in-mcp-modelinstance/1790/1 raising some issues while trying to modify GAMS parameters.
Many thanks in advance.
Kind regards,
Victor
Victor,
The example in the referenced post works with the current GAMS version. However, the GAMS/PATH solver is not a thread safe (they use lusol for factorization that use global variables, there are some other options for factorization but I don’t know if that guarantees you thread safety) so you can’t solve concurrently. GAMS’ solveLink=6 (https://www.gams.com/latest/docs/UG_GamsCall.html#GAMSAOsolvelink) is only allowed for thread safe solver (links). The section “Multi-Threading” in chapter “The Grid and Multi-Threading Solve Facility” (https://www.gams.com/latest/docs/UG_GridComputing.html#UG_GridComputing_MultiThreading) provides a table of thread safe solver (links). Otherwise, I am not aware of issues with the combination of GAMSModelinstance and MCP (and PATH).
-Michael
Hi Michael,
Thank you for the explanations, very useful.
Kind regards,
Victor