Skip to content
Snippets Groups Projects
Commit 00ff6fdd authored by Moises Fernandez's avatar Moises Fernandez
Browse files

Change to don't repeat all slices in case of fail in one

parent c38b202c
No related branches found
No related tags found
No related merge requests found
...@@ -205,7 +205,6 @@ echo "Compilation Time: $diff seconds" >> ${subjdir}.bedpostX/times ...@@ -205,7 +205,6 @@ echo "Compilation Time: $diff seconds" >> ${subjdir}.bedpostX/times
echo "CUDA CODE compiled successfully" echo "CUDA CODE compiled successfully"
mailto=`whoami`@fmrib.ox.ac.uk
before=`date +%s` before=`date +%s`
echo Preprocessing stages echo Preprocessing stages
${FSLDIR}/bin/bedpostx_preproc.sh ${subjdir} ${gflag} ${FSLDIR}/bin/bedpostx_preproc.sh ${subjdir} ${gflag}
...@@ -224,21 +223,27 @@ post_string="bsub -o ${subjdir}'.bedpostX/logs/output.log -e ${subjdir}.bedpostX ...@@ -224,21 +223,27 @@ post_string="bsub -o ${subjdir}'.bedpostX/logs/output.log -e ${subjdir}.bedpostX
post_string=$post_string" -w " post_string=$post_string" -w "
echo Submitting slices to GPUs echo Submitting slices to GPUs
first_job=1
while [ $slice -lt $nslices ];do while [ $slice -lt $nslices ];do
slicezp=`$FSLDIR/bin/zeropad $slice 4`
string=$(bsub -o ${subjdir}'.bedpostX/logs/output.log' -e ${subjdir}'.bedpostX/logs/error.log' -W 0:15 -n 1 ${FSLDIR}'/bin/splitter_multigpu' $subjdir $gflag $nfibres $slice $opts) if [ `$FSLDIR/bin/imtest ${subjdir}.bedpostX/diff_slices/data_slice_$slicezp/dyads1` -eq 1 ];then
array=(`echo $string | tr "<" ' '`) echo "Slice $slice has already been processed"
aux=${array[1]} else
array=(`echo $aux | tr ">" ' '`) string=$(bsub -o ${subjdir}'.bedpostX/logs/output.log' -e ${subjdir}'.bedpostX/logs/error.log' -W 0:30 -n 1 ${FSLDIR}'/bin/splitter_multigpu' $subjdir $gflag $nfibres $slice $opts)
job=${array[0]} array=(`echo $string | tr "<" ' '`)
#echo $job aux=${array[1]}
array=(`echo $aux | tr ">" ' '`)
if [ $slice -eq $(($nslices-1)) ];then job=${array[0]}
post_string=$post_string"done("${job}")" #echo $job
else
post_string=$post_string"done("${job}")&&" if [ $first_job -eq 1 ];then
fi post_string=$post_string"done("${job}")"
slice=$(($slice + 1)) first_job=0
else
post_string=$post_string"&&done("${job}")"
fi
fi
slice=$(($slice + 1))
done done
post_string=$post_string" ${FSLDIR}/bin/bedpostx_postproc.sh $subjdir" post_string=$post_string" ${FSLDIR}/bin/bedpostx_postproc.sh $subjdir"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment