User Tools

Site Tools


mrtrix_usage

MRtrix

Multi-threading

Similar to Matlab, MRtrix will, by default, spawn as many threads as it sees cores on the compute node where it's running. This will cause problems and significantly slow down the whole node. To prevent this, multi-threading should be disabled or carefully set to match the number of slots/cores assigned to your job.

MRTRIX_NTHREADS defaults to NSLOTS

As of approximately December 21, 2016, MRTrix will read the environment variable MRTRIX_NTHREADS to globally set the number of threads it should use. By default when you login or start a new qlogin or qsub job, the CfN cluster settings assigns the SGE NSLOTS var to MRTRIX_NTHREADS, so that MRTrix will run with the same number of threads as the requested number of cores/slots for your job.

How to override multi-threading

If for some reason (be sure about this!) you need to override the setting, you can do so in your script when you call an MRtrix command, by including the command line option -nthreads <N> in your , where N is the number of threads.

mrtrix_usage.txt · Last modified: 2017/06/02 15:27 by mgstauff