Bruce, Thanks a lot! 
Would you explain more on how to run recon-all in parallel? By run the script it did not automatically took the advantage of multiple cores (by checking CPU usage). Is their somewhere I can change the preference or I shall add some parameters in my code?


On Thu, Feb 6, 2014 at 2:39 PM, Bruce Fischl <fischl@nmr.mgh.harvard.edu> wrote:
Hi Peng

the recon-all instances should be able to be run in parallel. The first time you run one it will see that fsaverage does not exist, and will symlink it to $FREESURFER_HOME/subjects/fsaverage (which is our existing coordinate system, NOT an average of your subjects - to make your own average use the make_average_subject script).

cheers
Bruce



 On Thu, 6 Feb 2014, peng wrote:

Hi everyone,

   I am a new user of freesurfer. As a first step, I wrote a script (see
below between ---) to run recon-all on the anatomical data. Since I found it
very slow, and our server has multi-cores, I run this script manually
several times, thus it appeared to be parallel.Then I have several
questions:

1 From the screen output, I guess if a certain subject folder exists,
freesurfer will refuse to work on this subject. Then I have assumption that
if I run the same script multiple times would not overwrite results from
previous session. Can I hold this believe?
2 After certain time, I found new folders with name such as [fsaverage],
which I assumed as kind of average of subjects. Then I worry this was
generated from one  session (either the first one or the last one, depending
on overwriting policy of this folder). For example, if session one worked on
subject 1 4 7 ... and session two worked on subject 2 5 8... and session
three worked on subject 3 6 9 ... ; is this [fsaverage] an average of
(subject 1, 4, 7) or  (subject 3, 6, 9)? Or I am so lucky that it is the
average all processed subjects?
3 Is there a proper way to work in parallel than my stone-age way?
4 I searched the wiki and found some slides and pages which may help but not
answering the above question. Would you please suggest an example "full"
script of analysis?
    Thank you very much!
=======
My environment: 64-bit Linux with OpenSUSE. 8-CPUs/32G mem
Script:
-------------
#!/bin/csh  
echo "beginning ..."  

#environment setup
source ~/1tests/FreeSurferEnv.csh

#Set environment and get the filelist 
set raw_dir = '~/2rawdata/'
set fileNameList = `ls {$raw_dir}` 

#Try all the subjects in a loop
foreach file ($fileNameList)
echo "Now processing file ($file): ..."
echo ""
set inName = ($raw_dir$file)
recon-all -i $inName -s $file -autorecon-all
end

echo "done!"  
-------------
=======






The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.