A thread is a single flow of operations within a program. Programs use multiple threads concurrently to speed up the time to solution.
It is strongly advised not to set these variables as the solver automatically determines the most efficient number of threads to use, based on the CPU usage.
To limit the number of threads, set one of the following as an Environmental Variable.
Variable | Action |
---|---|
MF_OMP_NUM_THREADS | Sets the number of threads an analysis will use. This variable overwrites any string settings in the User Interface. For example: MF_OMP_NUM_THREADS=2 Runs the analysis with two threads. |
OMP_THREAD_LIMIT | Limits the absolute maximum number of threads available to an analysis. For example: OMP_THREAD_LIMIT=4 Up to four threads will be used. |
MS_DISABLE_SOLVER_PARALLELIZATION | Disables parallelization regardless of UI settings or other Environmental Variables. |
Add the variable in front of the runstudy command.
For example:
declare -x MF_OMP_NUM_THREADS=4; runstudy <studyName.sdy>
Four threads will be used to run the analysis.