Skip to content
Snippets Groups Projects

Major re-arrangement of eddy tests

Merged Paul McCarthy requested to merge rf/eddy into master
+ 25
23
@@ -19,7 +19,7 @@
set -e
# First argument is directory in which to search
# First argument is directory in which to search
# for eddy executables (typically $FSLDIR/bin).
# All remaining arguments are to be passed to
# eddy. Don't pass the --out option, as that is
@@ -52,30 +52,32 @@ if [ "${cuda_exes}" == "" ] && [ "${cpu_exes}" == "" ]; then
fi
# Launch both GPU and CPU versions
# Store job IDs separately so we
# can qalter the openmp jobs below
cuda_jids=""
for cuda_exe in ${cuda_exes};
cpu_jids=""
for exe in ${cuda_exes} ${cpu_exes};
do
tmp=`basename ${cuda_exe}`
variant=`echo ${tmp} | sed 's/eddy_//'`
jid=`fsl_sub -l ${outdir} -q cuda.q ${cuda_exe} --out=${outdir}/eddyOutput_${variant} ${eddy_args}`
if [ $? -ne 0 ]; then
echo "Error submitting ${cuda_exe} ${cuda_args}"
exit 1
variant=`basename ${exe}`
variant=`echo ${variant} | sed 's/eddy_//'`
if [[ "${exe}" == *"cuda"* ]]; then
fsl_sub="fsl_sub -l ${outdir} -q cuda.q"
else
fsl_sub="fsl_sub -l ${outdir} -q long.q -s openmp,6"
fi
cuda_jids="${cuda_jids} ${jid}"
done
cpu_jids=""
for cpu_exe in ${cpu_exes};
do
tmp=`basename ${cuda_exe}`
variant=`echo ${tmp} | sed 's/eddy_//'`
jid=`fsl_sub -l ${outdir} -q long.q -s openmp,6 ${cpu_exe} --out=${outdir}/eddyOutput_${variant} ${eddy_args}`
jid=`${fsl_sub} ${exe} --out=${outdir}/eddyOutput_${variant} ${eddy_args}`
if [ $? -ne 0 ]; then
echo "Error submitting ${cuda_exe} ${cuda_args}"
echo "Error submitting ${exe} ${eddy_args}"
exit 1
fi
cpu_jids="${cpu_jids} ${jid}"
fi
if [[ "${exe}" == *"cuda"* ]]; then
cuda_jids="${cuda_jids} ${jid}"
else
cpu_jids="${cpu_jids} ${jid}"
fi
done
# If running on a cluster, wait
@@ -85,7 +87,7 @@ done
# have blocked until completion.
if [ ! -z "${SGE_ROOT}" ]; then
# Ensure that slots are being reserved
# Ensure that slots are being reserved
# on the queue for CPU jobs
for jid in ${cpu_jids}; do
qalter ${jid} -R y
@@ -104,17 +106,17 @@ if [ ! -z "${SGE_ROOT}" ]; then
if [ $tmp -eq 0 ]; then
break
fi
sleep 5m
sleep 1m
done
fi
# Gather output prefixes for each run,
# and check that the main output file
# and check that the main output file
# was created
outputs=""
for exe in ${cuda_exes} ${cpu_exes};
do
tmp=`basename ${cuda_exe}`
tmp=`basename ${exe}`
variant=`echo ${tmp} | sed 's/eddy_//'`
prefix="${outdir}/eddyOutput_${variant}"
outputs="${outputs} ${prefix}"
Loading