pnlbwh / pnlNipype

PNL pipeline for NIFTI images
Other
10 stars 15 forks source link

fs.py #56

Closed tashrifbillah closed 4 years ago

tashrifbillah commented 4 years ago

https://github.com/pnlbwh/pnlNipype/blob/master/scripts/fs.py#L126 Forget -parallel entirely, rather use -threads and -itkthreads instead. In our current design, we have overridden -threads only, but not -itkthreads:

if int(self.ncpu)>1:
    common_params+=['-parallel', '-openmp', self.ncpu] 

Alternatively, you can use OMP_NUM_THREADS and ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS variables.

Moreover, -openmp, -threads, -nthreads appear to be the same flags: https://github.com/freesurfer/freesurfer/blob/dev/scripts/recon-all#L7328

See reference issue https://github.com/Deep-MI/FastSurfer/issues/22

tashrifbillah commented 4 years ago

According to my thread in FreeSurfer forum, we are good with -parallel -openmp <num-threads>