Hi Neil -
Actually, bedpost is set up to process each slice separately ( we
could process each voxel separately, but I've never come across a
situation where Ncpus > Nslices .
The way this is done, is that each machine in the list runs a program
called bedpost_proc.
bedpost_proc claims a slice so that no other processor can touch it
(by writing a temporary file), processes this slice, and then finds
out which the next unclaimed slice is etc. etc. If more than one
processor is doing this, the list of unclaimed slices goes down
quicker!!!
Hope this helps
T
Tim Behrens
Centre for Functional MRI of the Brain
The John Radcliffe Hospital
Headley Way Oxford OX3 9DU
Oxford University
Work 01865 222782
Mobile 07980 884537
[log in to unmask]
www.fmrib.ox.ac.uk/~behrens
On 6 Jul 2006, at 06:56, Neil Killeen wrote:
> Hi
>
> I am looking into parallelizing bedpost on our Altix. The Altix
> uses a single Linux image to manage all of the processors
> so all processes will be local; no need for ssh/rsh invocations
>
> I have been looking at the bedpost script to see how I should
> modify it
> for the Altix
>
>
> The relevant bit of code is :
>
> if [ "x$FSLMACHINELIST" = "x" ] ; then
> echo "processing data on local host"
> ${FSLDIR}/bin/bedpost_proc $subjdir $nslices ${subjdir}.bedpost/
> logs/pid_${$} &
> else
> echo "processing data on hosts: $FSLMACHINELIST"
> for machine in $FSLMACHINELIST; do
> echo "if [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/
> local/etc/fslconf/fsl.sh;fi;
> if [ -r /etc/fslconf/fsl.sh ];then . /etc/
> fslconf/ fsl.sh;fi;
> if [ -r \${HOME}/.fslconf/fsl.sh ]; then . \$
> {HOME}/.fslconf/fsl.sh; fi;
> if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/
> bedpost_proc $subjdir $nslices ${subjdir}.bedpost/logs/pid_${$};
> else echo FSLDIR not set in any default location on machine
> `hostname`;fi"| $FSLREMOTECALL $machine /bin/sh &
> done
> fi
>
>
> Since all processes will run locally, I can scrap all the
> environment testing and the remote call.
>
> My understanding of the parallelization process is that each voxel
> is done separately.
> However, I don't follow how you are managing that.
> This is because the command you pass to the remote machine (see
> above) is the same as
> that used for running the whole thing on one host. Viz:
>
> ${FSLDIR}/bin/bedpost_proc $subjdir $nslices ${subjdir}.bedpost/
> logs/pid_${$}
>
>
> This command is passed to each machine in your list, or in my case,
> I would just issue
> it N_proc times.
>
> How is it decided which process operates upon which voxel of the image
> when you are operating in parallel ? Additionally, if there are say
> N_v voxels, and I operate with say N_p < N_v processors, how is
> that 'chunking' up of the problem
> handled (i.e. how do you generate the list of voxels for each
> processor to operate on
> since there are less processors than voxels). Is there some kind
> of log file that
> indictaes which voxels are being processed and each running process
> keeps taking the
> next available voxel until they are all done ?
>
>
> thanks
> Neil
|