Skip to content
Snippets Groups Projects

Update runEddy script to work with new multi-threaded version.

Merged Paul McCarthy requested to merge mnt/eddy-nthr into master
1 file
+ 3
5
Compare changes
  • Side-by-side
  • Inline
+ 3
5
@@ -30,7 +30,7 @@ set -e
@@ -30,7 +30,7 @@ set -e
# added by this script.
# added by this script.
exedir="$1"; shift;
exedir="$1"; shift;
outdir="$1"; shift;
outdir="$1"; shift;
eddy_args="$@"
eddy_args=("$@")
# Find all eddy_cuda* executables
# Find all eddy_cuda* executables
cuda_exes=""
cuda_exes=""
@@ -71,15 +71,13 @@ do
@@ -71,15 +71,13 @@ do
if [[ "${exe_name}" == *"cuda"* ]]; then
if [[ "${exe_name}" == *"cuda"* ]]; then
fsl_sub="fsl_sub -l ${outdir} --coprocessor=cuda"
fsl_sub="fsl_sub -l ${outdir} --coprocessor=cuda"
exe="${exe_name}"
exe="${exe_name}"
extra_args=""
else
else
# unpack eddy_cpu_nthr_N
# unpack eddy_cpu_nthr_N
# into eddy_cpu --nthr=N
# into eddy_cpu --nthr=N
fsl_sub="fsl_sub -l ${outdir} -q long.q"
fsl_sub="fsl_sub -l ${outdir} -q long.q"
exe="${exe_name%_nthr*}"
exe="${exe_name%_nthr*}"
nthr="${exe_name#eddy_cpu_nthr_}"
nthr="${exe_name#eddy_cpu_nthr_}"
extra_args="--nthr=${nthr}"
eddy_args+=("--nthr=${nthr}")
if [ "${nthr}" != "1" ]; then
if [ "${nthr}" != "1" ]; then
fsl_sub="${fsl_sub} -s openmp,${nthr}"
fsl_sub="${fsl_sub} -s openmp,${nthr}"
fi
fi
@@ -89,7 +87,7 @@ do
@@ -89,7 +87,7 @@ do
# output a job id) if we try to run a
# output a job id) if we try to run a
# cuda exe on a non-cuda-capable machine
# cuda exe on a non-cuda-capable machine
# or queue. So we allow it to fail.
# or queue. So we allow it to fail.
jid=$(${fsl_sub} ${exe} --out=${outdir}/eddyOutput_${variant} ${extra_args} ${eddy_args} || true)
jid=$(${fsl_sub} ${exe} --out=${outdir}/eddyOutput_${variant} ${eddy_args} || true)
if [ "${jid}" == "" ]; then
if [ "${jid}" == "" ]; then
echo "Error submitting ${exe_name} - skipping"
echo "Error submitting ${exe_name} - skipping"
continue
continue
Loading