Skip to content
Snippets Groups Projects
Commit 8f8365f0 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

BF: Fix var naming bugs by unifying cpu/gpu submit code

parent 6e26fda4
No related branches found
No related tags found
1 merge request!37Major re-arrangement of eddy tests
...@@ -52,30 +52,32 @@ if [ "${cuda_exes}" == "" ] && [ "${cpu_exes}" == "" ]; then ...@@ -52,30 +52,32 @@ if [ "${cuda_exes}" == "" ] && [ "${cpu_exes}" == "" ]; then
fi fi
# Launch both GPU and CPU versions # Launch both GPU and CPU versions
# Store job IDs separately so we
# can qalter the openmp jobs below
cuda_jids="" cuda_jids=""
for cuda_exe in ${cuda_exes}; cpu_jids=""
for exe in ${cuda_exes} ${cpu_exes};
do do
tmp=`basename ${cuda_exe}` variant=`basename ${exe}`
variant=`echo ${tmp} | sed 's/eddy_//'` variant=`echo ${variante | sed 's/eddy_//'`
jid=`fsl_sub -l ${outdir} -q cuda.q ${cuda_exe} --out=${outdir}/eddyOutput_${variant} ${eddy_args}`
if [ $? -ne 0 ]; then if [[ "${exe}" == *"cuda"* ]]; then
echo "Error submitting ${cuda_exe} ${cuda_args}" fsl_sub="fsl_sub -l ${outdir} -q cuda.q"
exit 1 else
fsl_sub="fsl_sub -l ${outdir} -q long.q -s openmp,6"
fi fi
cuda_jids="${cuda_jids} ${jid}"
done
cpu_jids="" jid=`${fsl_sub} ${exe} --out=${outdir}/eddyOutput_${variant} ${eddy_args}`
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}`
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error submitting ${cuda_exe} ${cuda_args}" echo "Error submitting ${exe} ${eddy_args}"
exit 1 exit 1
fi fi
cpu_jids="${cpu_jids} ${jid}"
if [[ "${exe}" == *"cuda"* ]]; then
cuda_jids="${cuda_jids} ${jid}"
else
cpu_jids="${cpu_jids} ${jid}"
fi
done done
# If running on a cluster, wait # If running on a cluster, wait
......
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