125. NTHRDS - Number of Execution Threads
The NTHRDS option controls the maximum number of threads, or processors, to utilize at any given time. Interesting settings for the thread count are:
• | 0 — LINGO determines the number of processors on the system and sets the thread limit to this number. |
• | 1 — Only one processor will be used, causing LINGO to run in single-threaded mode. |
• | N — Here, N is some positive integer greater than 1 and less-than-or-equal-to 32, in which case, LINGO will set the maximum number of threads to N. |
LINGO defaults to running in single-threaded mode with a thread limit of 1.
By default, this option is disabled.
Note: | Setting the maximum thread count parameter, NTHRDS, to N does not guarantee than N cores will be fully utilized throughout the entire solve. There may be serial sections inside parallel code that get executed from time to time, causing only one core to be utilized. Concurrent algorithms may also have fewer than N different serial algorithms to launch, meaning fewer than N cores will be occupied. |