- This topic has 10 replies, 3 voices, and was last updated 2 years, 7 months ago by Anonymous.
-
AuthorPosts
-
-
June 15, 2019 at 10:49 am #1836LDOParticipant
We have been having troubles with SVreg aborting when used from the command line.
BUT, only on some machines. Seems to run fine on the same machines from the GUI.
Have tried the commands from both v18a and 19a with same result. The svreg.exe is called from within a Matlab script.I think I have found the source of the command line error:
“The whole surface volume registration and labeling sequence takes about 90-100 min.
Starting parallel pool (parpool) using the ‘local’ profile … Error using parpool (line 103)
You requested a minimum of 3 workers, but the cluster “local” has the NumWorkers property set to allow a maximum of 2 workers. To run a communicating job on more workers than this (up to a maximum of 512 for the Local cluster), increase the value of the NumWorkers property for the cluster. The default value of NumWorkers for a Local cluster is the number of cores on the local machine.
Error in svreg (line 169)”So 2 core machines fail but 4 core machines do OK. Is this something you can address in the command line tool? Or do I have to try to modify the minimum number of cores in Matlab on every machine?
-
June 15, 2019 at 9:50 pm #1837Anand JoshiModerator
Thank you for using BrainSuite and reporting this issue.
You can run the svreg on the command line in a single threaded mode using -U flag. -
June 16, 2019 at 6:02 am #1838LDOParticipant
Yes! That did start the process.
But it stops after a few minutes:…curvature resolution 10/10
Multiresolution curvature maps are calculated
Computing additive curvature
Performing curvature registration
Curvature registration at resolution 1/4
Error using imhist (line 76)
Invalid MEX-file ‘C:\Users\LARRYO~1\AppData\Local\Temp\Larry Olson\mcrCache9.0\svreg_0\toolbox\images\images\private\imhistc.mexw64’: The specified procedure could not be found.Error in histeq>computeCumulativeHistogram (line 181)
Error in histeq (line 138)
Error in register_images_elastic_anand_landmarks_cg (line 26)
Error in curvature_registration512g_wt_multi_bs_elastic_xyz_cg (line 129)
Error in curvature_registration_newbs_elastic_xyz (line 73)
Error in svreg_label_surf_hemi (line 165)
Error in svreg (line 180)
MATLAB:invalidMEXFileBut, oddly, if I look in ‘C:\Users\LARRYO~1\AppData\Local\Temp\Larry Olson\mcrCache9.0\svreg_0\toolbox\images\images\private\imhistc.mexw64’, imhistc.mexw64 is there
-
June 16, 2019 at 8:35 am #1839LDOParticipant
See above. The svreg.exe with -U failed when I called it from Matlab 2019a. I just ran exactly the same call from the command prompt in Windows and it worked perfectly. I am puzzled…
-
June 16, 2019 at 10:50 am #1840Anand JoshiModerator
Did you install 32 bit windows MCR by any chance? A 64 bit version is required.
-
June 16, 2019 at 11:07 am #1841LDOParticipant
No, it is 64 bit MCR
It works from the GUI
It works (with the same DOS command) from the Windows command prompt
*It just aborts part way through (with the same DOS command) when started within Matlab(MCR_R2015b_win64_installer.exe)
(but I also have other versions installed for creating Matlab standalone programs)That is so puzzling
-
June 16, 2019 at 1:25 pm #1842Anand JoshiModerator
It might be that it is trying to use a different runtime version when called from matlab.
Note that the environment variables and the path is different in dos and in matlab.
check environment variables in matlab by typing env. Make sure that the correct MCR is first on the path. -
June 16, 2019 at 2:21 pm #1843LDOParticipant
“check environment variables in matlab by typing env”
>’env’ is not recognized as an internal or external command, operable program or batch file.
(On Windows here)Actually I have only one Matlab Compiler Runtime: 7.13
But 3 Matlab Runtimes: 9.0, 9.5, 9.6Not sure how to check environment variables…
-
June 16, 2019 at 11:09 pm #1844Anand JoshiModerator
Can you just type path in the matlab command window?
How are you running the svreg execuable from witin matlab? Are you using !svreg.exe …. ?
Can you send me steps to reproduce the issue?
-
June 17, 2019 at 4:44 pm #1845LDOParticipant
Of course this is done after having run the Cortical Extraction Sequence first.
Then, here is a bit of the Matlab code used to call svreg:Name = ’xnrT1.nii.gz’ %(skull stripped T1)
basename = string(name(1:(length(name)-7))) %(.nii.gz extension)
st=’svreg.exe ‘+ basename + ‘ -U’
dos(st)This results in:
basename= ‘xnrT1’
st=svreg.exe “C:\Users\Larry Olson\Desktop\jtTestCase\BS”\xnrT1 -U
these are the errors (from running the script OR from pasting into matlab command window):
…curvature resolution 8/10
curvature resolution 9/10
curvature resolution 10/10
Multiresolution curvature maps are calculated
Computing additive curvature
Performing curvature registration
Curvature registration at resolution 1/4
Error using imhist (line 76)
Invalid MEX-file ‘C:\Users\LARRYO~1\AppData\Local\Temp\Larry Olson\mcrCache9.0\svreg_1\toolbox\images\images\private\imhistc.mexw64’: The specified procedure could not be found.
Error in histeq>computeCumulativeHistogram (line 181)
Error in histeq (line 138)
Error in register_images_elastic_anand_landmarks_cg (line 26)
Error in curvature_registration512g_wt_multi_bs_elastic_xyz_cg (line 129)
Error in curvature_registration_newbs_elastic_xyz (line 73)
Error in svreg_label_surf_hemi (line 191)
Error in svreg (line 180)
MATLAB:invalidMEXFile
ans =
-1Note I pasted the exact same call into a DOS Command Prompt, and it ran all the way through:
svreg.exe “C:\Users\Larry Olson\Desktop\jtTestCase\BS”\xnrT1 –UHad to use the –U flag because this machine is only a dual core i5
-
April 14, 2022 at 8:30 am #3529AnonymousInactive
How did you made it start working?
I am on Windows 10 2-core i7
I have executed the CSE before SVReg with this command (it worked):
(in the 1 dataset folder I added the cse script to the path)
C:\Users\italo\Documents\BrainSuite_CMD>”C:\Users\italo\Documents\BrainSuite_Tools\BrainSuite21a_src\scripts\cortical_extraction” italot1.niiNote that I did not call cortical_extraction.exe (Did not recognize it)
Now with the SVReg Process.
I did the same with the SVReg script and typed:
C:\Users\italo\Documents\BrainSuite_CMD>”C:\Users\italo\Documents\BrainSuite_Tools\svreg_21a_build2317_source\scripts\svreg” italot1Returned me:
using SVReg in C:\Users\italo\Documents\BrainSuite_Tools\svreg_21a_build2317_source
‘”C:\Users\italo\Documents\BrainSuite_Tools\svreg_21a_build2317_source\scripts\svreg.exe”‘ is not recognized as an internal or external command,
operable program or batch file.So I decided to run the svreg on the BrainSuite Bin folder:
C:\Users\italo\Documents\BrainSuite_CMD>”C:\Program Files\BrainSuite21a\svreg\bin\svreg” italot1Returned me:
Not enough input arguments.
Error in svreg (line 24)
MATLAB:minrhsAny Suggestions to run SVReg on Command Line properly?
Regards, Italo
-
-
AuthorPosts
- You must be logged in to reply to this topic.