Skip to content
Snippets Groups Projects

Bf/set sge

Merged Matthew Webster requested to merge bf/setSGE into master
#!/bin/bash
# This test needs to be executed
# on a CUDA-capable machine
# This test will attempt to submit to a cuda-capable queue via fsl_sub
set -e
unset SGE_ROOT
outdir=$1
datadir=$2
@@ -14,5 +11,17 @@ cp -Lr $datadir/fsl_course_data/fdt2/subj1 $outdir/
bedpostx_gpu $outdir/subj1 --nf=2 --fudge=1 --bi=1000 --seed=1234
# wait for all jobs to finish
while [ : ]; do
jid=`cat $outdir/subj1.bedpostX/logs/postproc_ID`
echo "JID $jid"
status=`qstat -j ${jid} 2>/dev/null | wc`
status=`echo $status | awk '{print $1}'`
if [ $status -eq 0 ]; then
break
fi
sleep 60
done
chmod -R u+w $outdir/subj1
rm -r $outdir/subj1
Loading