Fixelcfestats: parallelization and expected memory usage

Hi MRtrix experts,

I’m using fixelcfestats for fixel-based statistical analysis, and I’m curious about how its parallelization works and what we should expect regarding the memory usage. I have these specific questions:

  1. Under the hood of its parallelization method, does fixelcfestats use multiple threads, or actually multiple CPU cores?
  2. Will memory usage change with nthreads option? So far my observation is: yes, it will increase with nthreads value. But this makes me confused – the memory usage of a multi-threaded application probably should not change with nthreads; whereas memory usage of multi-core computing may increase with number of CPU cores requested.
  3. If option nthreads > 1, how many processes should we expect when running fixelcfestats? Should there be only one process (that includes all threads), or it should be a parent process + several child processes (where number of child processes = nthreads)?

Additional information: I’m using a Linux system and MRtrix version is: 3.0.2-193-gdd63cc20

Thank you very much!
Chenying

1 Like

Hi MRtrix experts,

Following my posted questions, I have profiled the memory usage of fixelcfestats - see the figure below. When using multiple threads, for example nthreads=4, I found:

  • There was only one process but I did not detect any child process (i.e., instead of 1 parent process + 4 child processes);
  • The CPU usage for the process I found was ~400%, and 4 CPU cores were used at the same time;
  • The maximum memory usage increased with number of threads – see the figure below.

Are these as expected?

Also I have another new question – based on the doc of fixelcfestats, nthreads=0 means there is no multi-threaded application – does it mean there is no thread or there is 1 thread? Also I’m wondering does nthreads=1 mean it’s using multi-threaded application but there is only 1 thread?

Really appreciate it!
Thanks,
Chenying