External Email - Use Caution
Dear experts, Thanks in advance for any help you can provide. I’m using “mri_coreg” and trying to accelerate it with the “--threads” (and/or “--nthreads”) flags. However in the subsequent command feedback it looks like it is still using just one thread (see output below, “nthreads 1”; and also it is no faster). Am I doing something obviously wrong? There are no errors and it executes successfully… Not sure if relevant but I’m using this for nifty (.nii.gz) files, my command is: “mri_coreg --ref <path/to/ref.nii.gz> --mov <path/to/mov.nii.gz> --reg <path/to/registration.lta> --threads 10”
I’m on MacOS running a recent dev download (freesurfer-macOS-darwin_arm64-dev-20241011), but I’ve tried it on 7.4.1 with no success either.
… INFO: using NIfTI-1 sform (sform_code=1) Setting cras translation parameters to align volume centers Init matrix params -0.4553 -6.3123 39.4428 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 Initial Matrix (RAS2RAS) 1.00000 0.00000 0.00000 0.45535; 0.00000 1.00000 0.00000 6.31235; 0.00000 0.00000 1.00000 -39.44280; 0.00000 0.00000 0.00000 1.00000; Initial parameters to be opt -0.4553 -6.3123 39.4428 0.0000 0.0000 0.0000 Creating random numbers for coordinate dithering Performing intensity dithering Performing intensity dithering on mov with computed dither Separation list (2): 4 2 min = 2 DoSmoothing 1 DoCoordDither 1 DoIntensityDither 1 nitersmax 4 ftol 1.000e-07 linmintol 1.000e-03 SatPct 99.990000 Hist FWHM 7.000000 7.000000 nthreads 1 movsat = 3917.0000 mov gstd 0.9539 0.9539 0.7422 Smoothing mov …
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, re-transmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
It looks like it is only using one thread, though you have correctly specified 10. I often run it with more than 1, and it certainly uses as many as I give it. It is possible that it is not allowed to have that many threads. Have you been able to run other programs with multiple threads? You can try re-running it adding --debug as the 1st argument. Also run it through fs_time, eg, fs_time mri_coreg ... Capture all the terminal output. fs_time will print out something in the end to indicate the amount of CPU it is using.
On 11/25/2024 4:32 PM, Hemond, Christopher wrote:
External Email - Use Caution
Dear experts,
Thanks in advance for any help you can provide. I’m using “mri_coreg” and trying to accelerate it with the “--threads” (and/or “--nthreads”) flags. However in the subsequent command feedback it looks like it is still using just one thread (see output below, “nthreads 1”; and also it is no faster). Am I doing something obviously wrong? There are no errors and it executes successfully… Not sure if relevant but I’m using this for nifty (.nii.gz) files, my command is:
“mri_coreg --ref <path/to/ref.nii.gz> --mov <path/to/mov.nii.gz> --reg <path/to/registration.lta> --threads 10”
I’m on MacOS running a recent dev download (freesurfer-macOS-darwin_arm64-dev-20241011), but I’ve tried it on 7.4.1 with no success either.
…
INFO: using NIfTI-1 sform (sform_code=1)
Setting cras translation parameters to align volume centers
Init matrix params -0.4553 -6.3123 39.4428 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000
Initial Matrix (RAS2RAS)
1.00000 0.00000 0.00000 0.45535;
0.00000 1.00000 0.00000 6.31235;
0.00000 0.00000 1.00000 -39.44280;
0.00000 0.00000 0.00000 1.00000;
Initial parameters to be opt -0.4553 -6.3123 39.4428 0.0000 0.0000 0.0000
Creating random numbers for coordinate dithering
Performing intensity dithering
Performing intensity dithering on mov with computed dither
Separation list (2): 4 2 min = 2
DoSmoothing 1
DoCoordDither 1
DoIntensityDither 1
nitersmax 4
ftol 1.000e-07
linmintol 1.000e-03
SatPct 99.990000
Hist FWHM 7.000000 7.000000
nthreads 1
movsat = 3917.0000
mov gstd 0.9539 0.9539 0.7422
Smoothing mov
…
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, re-transmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
External Email - Use Caution
Dear Doug and team, Thanks very much for your support. I’ve tried multiple different thread numbers between 1 and 10 with no effect. I can successfully use multithreading to accelerate other applications like mri_synthseg. I tried adding combinations of both ‘fs_time’ as well as ‘--debug’ to the command, but I do not see any difference in final output, nor any CPU load/usage readout at the end of the command…. Just the usual “mri_coreg RunTimeSec <X> sec”. Could this be related to the ARM processor in Mac? It seems to cause many other issues, especially with some SPM commands including processing specification. Many thanks, Chris
From: Hemond, Christopher Christopher.Hemond@umassmemorial.org Date: Monday, November 25, 2024 at 4:32 PM To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu Subject: mri_coreg threads parallel processing clarification Dear experts, Thanks in advance for any help you can provide. I’m using “mri_coreg” and trying to accelerate it with the “--threads” (and/or “--nthreads”) flags. However in the subsequent command feedback it looks like it is still using just one thread (see output below, “nthreads 1”; and also it is no faster). Am I doing something obviously wrong? There are no errors and it executes successfully… Not sure if relevant but I’m using this for nifty (.nii.gz) files, my command is: “mri_coreg --ref <path/to/ref.nii.gz> --mov <path/to/mov.nii.gz> --reg <path/to/registration.lta> --threads 10”
I’m on MacOS running a recent dev download (freesurfer-macOS-darwin_arm64-dev-20241011), but I’ve tried it on 7.4.1 with no success either.
… INFO: using NIfTI-1 sform (sform_code=1) Setting cras translation parameters to align volume centers Init matrix params -0.4553 -6.3123 39.4428 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 Initial Matrix (RAS2RAS) 1.00000 0.00000 0.00000 0.45535; 0.00000 1.00000 0.00000 6.31235; 0.00000 0.00000 1.00000 -39.44280; 0.00000 0.00000 0.00000 1.00000; Initial parameters to be opt -0.4553 -6.3123 39.4428 0.0000 0.0000 0.0000 Creating random numbers for coordinate dithering Performing intensity dithering Performing intensity dithering on mov with computed dither Separation list (2): 4 2 min = 2 DoSmoothing 1 DoCoordDither 1 DoIntensityDither 1 nitersmax 4 ftol 1.000e-07 linmintol 1.000e-03 SatPct 99.990000 Hist FWHM 7.000000 7.000000 nthreads 1 movsat = 3917.0000 mov gstd 0.9539 0.9539 0.7422 Smoothing mov …
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, re-transmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
freesurfer@nmr.mgh.harvard.edu