Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
software:matlab:maxnumcompthreads [2019-08-29 15:45] – anita | software:matlab:maxnumcompthreads [2019-08-29 15:58] (current) – removed anita | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Setting maximum number of computational threads ====== | ||
- | Your default setting for MATLAB is to use all the cores on the node to to run computational threads. | ||
- | |||
- | In some cases, you may find the job runs better with 4 or 5 comp threads, with diminishing returns using more threads. | ||
- | |||
- | The following MATLAB statements, at the beginning of your MATLAB script, will read the number of slots from the '' | ||
- | |||
- | < | ||
- | [compThreads, | ||
- | if count == 1 | ||
- | warning(' | ||
- | autoCompThreads = maxNumCompThreads(compThreads); | ||
- | end | ||
- | </ | ||
- | |||
- | The NSLOTS is automatically set when you use qsub. This way your MATLAB job will never use more cores than Grid Engine has assigned to you. The '' | ||
- | |||
- | <note tip>You may be able to use the program '' | ||
- | This is currently available on Farber, but not Mills. | ||
- | < | ||
- | # added 16 Mar 2016 to setup interactive MATLAB | ||
- | function matlab-setup { | ||
- | vpkg_require matlab/ | ||
- | eval " | ||
- | export NSLOTS=" | ||
- | } | ||
- | |||
- | </ | ||
- | </ |