-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We have a SUN grid system at UCSF.  I have some shell scripts for using
freesurfer on this type of grid.  As said earlier, freesurfer does not
contain multi-threaded programs.  Use of the grid is simply to run
multiple instances of freesurfer programs on different processing nodes
(computers).  The grid is managed by scheduling programs.  We submit
jobs to those scheduling programs (qsub in our case).  My simple
solution consists of two parts, a) a subject specific script to run
recon-all (only if necessary) and b) another script to find and loop
over subjects and submit those jobs to the grid.

a) freesurfer_recon_script.csh  (Note that all of my freesurfer
environment variables are setup in ~/.cshrc and this environment is
configured to work correctly on all nodes of the grid system, providing
the NFS disk mapping is working.)

############### CUT BELOW HERE #################
#!/bin/csh

echo $0 $1

cd $SUBJECTS_DIR
pwd

if ( "$1" == "" ) then
    echo
    echo "Missing <subjID>, please use"
    echo "$0 <subjID>"
    echo
    exit 1
endif

if ( -d $1 ) then

    echo $1

    # has this been done already?
    if ( -s $1/surf/lh.pial && -s $1/surf/rh.pial ) then
        echo
        echo "The pial surfaces already exist:"
        echo
        ls -l $1/surf/*
        echo
    else
        recon-all -subjid $1 -all
    endif
endif
############### CUT ABOVE HERE #################


b) ~/bin/freesurfer_recon_gridSubmit.csh
############### CUT BELOW HERE #################
#!/bin/csh

cd $SUBJECTS_DIR

foreach sub ( `ls -d ucsf_??` )

    echo $sub

    # has this been done already?
    if ( -s $1/surf/lh.pial && -s $1/surf/rh.pial ) then
        echo
        echo "The pial surfaces already exist."
        echo
    else
        qsub -q dnl.q -l arch=lx24-x86 ~/bin/freesurfer_recon_script.csh
$sub &
    endif
end
############### CUT ABOVE HERE #################




It's a little bit clumsy this way, but qsub is not really intelligent
about handling job specifications (or I am too stupid to figure out how
to get it all into one script!), so I ask it to run a shell script.

Best, Darren



Andries van der Leij wrote:
>  
> 
>  
> 
> ------------------------------------------------------------------------
> 
> *From:* Andries van der Leij
> *Sent:* Wednesday, December 06, 2006 5:59 PM
> *To:* 'freesurfer@nmr.mgh.harvard.edu'
> *Subject:* Freesurfer and Grid computing
> 
>  
> 
> Dear Freesurfer community,
> 
>  
> 
> I?m a PHD student at the university of Amsterdam and I?m currently
> investigating the possibilities to streamline our MRI data processing
> stream. Next summer we?ll obtain a research-only scanner. I?m trying to
> push the group to also invest in computing power and am currently
> investigating the applications that researchers will most probably use.
> 
>  
> 
> I came across a project of the group of Cohen at UCLA. They have
> configured a Apple (unix) grid and have proposed a more or less standard
> setup specially designed for MRI analyses:
> 
>  
> 
> http://airto.bmap.ucla.edu/mt-static/NICluster/archives/2005/06/welcome.html
> 
>  
> 
> It is my understanding that one of the members has rewritten the FSL
> code which allow distributed parallel processing in a Grid. See the
> benchmarks here:
> 
>  
> 
> http://airto.bmap.ucla.edu/bmcweb/bmc_bios/MarkCohen/Apple/Benchmarks.htm
> 
>  
> 
> My question is fairly simple: Are similar steps taken in the Freesurfer
> community? I have no experience with this app myself, but it is my
> understanding that Freesurfer consumes a lot of resources.
> 
>  
> 
> Thank you very much in advance,
> 
>  
> 
> Andries van der Leij
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

- --

Darren L. Weber, Ph.D.
Postdoctoral Scholar

Dynamic Neuroimaging Laboratory,
UCSF Department of Radiology,
185 Berry Street, Suite 350, Box 0946,
San Francisco, CA 94107, USA.

Tel: +1 415 353-9444
Fax: +1 415 353-9421
www: http://dnl.ucsf.edu/users/dweber

"To explicate the uses of the brain seems as difficult
a task as to paint the soul, of which it is commonly
said, that it understands all things but itself."
  Thomas Willis (The Anatomy of the Brain and Nerves, 1664)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFeM7yxaCYN7qs0v4RAvIuAJ0dUPOOWNuHpkhgZT3XZPMGjcgHagCdFoIM
eJ8OPogaXktVZyW0CLajGXA=
=ts8p
-----END PGP SIGNATURE-----

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to