Commit 72142522 authored by Christian Meesters's avatar Christian Meesters

working version

parent 3a18acfa
......@@ -202,8 +202,8 @@ do
shift
done
_positional_names=('_arg_inputdir')
for (( ii = 0; ii < 2; ii++)); do
_positional_names=('_arg_inputdir' )
for (( ii = 0; ii < 1; ii++)); do
eval "${_positional_names[ii]}=\${_positionals[ii]}" || die "Error during argument parsing, possibly an Argbash bug." 1
done
......@@ -241,37 +241,33 @@ if [ -z "$SLURM_JOB_ID" ]; then
### check if output directory already exists
if [[ ! -d "${_arg_outdir// }" ]]; then
_arg_outdir="$(pwd)/${_arg_tag}"
mkdir -p "${_arg_outdir}"
mkdir -p "${_arg_outdir/%j/}"
else
error "${_arg_outdir// } exists already! Possibly over overwrite of results. Cowardly giving up."
fi
sbatch -A "${_arg_assoc}" -p parallel -J "${_arg_tag}" -o "${_arg_outdir}" -n 40 -t 120:00:00 --signal=B:SIGUSR2@600 -N 1 --wrap "$(cat << EOF
set -x
cleanup(){
cp /localscratch/${SLURM_JOB_ID}/* "\${_arg_outdir}"
}
trap 'cleanup' SIGUSR2
cp $sample /localscratch/\${SLURM_JOB_ID}
scratch=/localscratch/\${SLURM_JOB_ID}
cp $sample "\$scratch"
# Go to jobdir and start the program
cd /localscratch/\${SLURM_JOB_ID}
set OMPI_MCA_btl=self,sm
orca $sample
eval $(which orca) "\$scratch"/$(basename $sample)
cleanup
EOF
)"
done
fi
https://stackoverflow.com/questions/53071681/use-of-a-heredoc-with-slurm-sbatch-wrap
EOF
)
#./orca.sh ${sample}
done
fi
# done
# fi
https://stackoverflow.com/questions/53071681/use-of-a-heredoc-with-slurm-sbatch-wrap
#https://stackoverflow.com/questions/53071681/use-of-a-heredoc-with-slurm-sbatch-wrap
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment