Threads

Top  Previous  Next

Threads is an option  that controls the number of threads or CPU cores to be used by a solver. It can be set as a command line parameter, a GAMS option or a model attribute.  Note that this does not alter the cores used in Grid computing. Numeric input is expected with the allowable numeric values being

 

-nreserve n cores
0use all available cores
nuse n cores

 

it is implemented in the command line with the syntax

 

Threads=number

 

or as an option with

 

option threads=number;

 

or as a model attribute with

 

modelname.threads=number;

 

 

Non-positive values are interpreted as the number of cores to leave free so setting threads to 0 uses all available cores while setting threads to -1 leaves one core free for other tasks.