Hi Frank
in Linux you would just add an & to the end of the recon-all command line to put it in the background and start however many you want. Or you can run them from different terminal windows. If you have a lot to get through you can do something like (note this is not debugged!):
set maxrunning=8 foreach s ($SUBJECTS) set cmd = (recon-all -s $s ...) set running = (`ps -aux | grep recon-all | wc -l`) while ($running >= $maxrunning) sleep 600 set running = (`ps -aux | grep recon-all | wc -l`) end eval $cmd& end
that is csh code. Bash would be similar but not seem modifications cheers Bruce
On Sat, 4 Jan 2020, Frank Chau wrote:
External Email - Use Caution
Dear Bruce,
No, I want to run recon-all on 4-8 subjects at the same time. I could find detail tutorial on the Mac platform (Run: "ls *.nii | parallel --jobs 4 recon-all -s {.} -i {} -all -qcache", after installing Xcode and Homebrew.) But I couldn't find any similar information on the Linux platform.
Regards
Frank
On Jan 3, 2020 11:15 PM, Bruce Fischl fischl@nmr.mgh.harvard.edu wrote: Hi Frank
do you mean completing a single recon faster? The easiest way to do that is to use the -openmp <N> flag, and set <N> to the number of threads/cores you want to use. Alternatively if you have enough RAM you can just run multiple recon-alls at the same time (which will give you a bigger effective speed increase) cheers Bruce On Fri, 3 Jan 2020, Frank Chau wrote: > > External Email - Use Caution > > Dear Freesurfer experts, > > > May I know how to run Recon-all in parallel on Linux? I have read some > source said that can use "gnu parallel" to complete it. But they do not > describe it in detail how to perform it. > > > Regards > > > Frank > > --------------------------- > > FRANK C Y CHAU > > > Research assistant > > Division of Neurology > > Department of Medicine > > > Tel: +852 6340 2553 > > Fax: 2872 5828 > > > E-mail : cyfrank@hku.hk > > > > Rm 304, 3/F, New Clinical building, Queen Mary Hospital, 102 Pokfulam Road, > Hong Kong > > >