Commit 4a6f4f72 authored by Christian Meesters's avatar Christian Meesters

debugged several statements introduced whilst tinkering

parent 96b5ca40
......@@ -234,12 +234,12 @@ fi
#check if this script is on node by checking env-variable $SLURM_JOB_ID, else send it to SLURM with given parameters and exit
if [ -z "$SLURM_JOB_ID" ]; then
for sample in "${_arg_inputdir}"/*.gjf; do
for sample in "${_arg_inputdir}"*.gjf; do
### infer job tag
if [ -z "$_arg_tag" ]; then
# remove the suffix from the sample name
samplename=${sample/\.gjf/}
_arg_tag="ORCA_$(basename "$_arg_inputdir")_on_$(basename "$samplename")_%j"
samplename=$(basename ${sample})
_arg_tag="ORCA_sim_on_${samplename/.gjf/}_%j"
fi
### check if output directory already exists
......@@ -261,7 +261,7 @@ if [ -z "$SLURM_JOB_ID" ]; then
#TODO: check sensible time constraint
# saving standard settings
submit_statement="sbatch -A ${_arg_assoc} -p $queue -J ${_arg_tag} -o ${_arg_outdir}/${_arg_outdir}.log -n $tasks -t 300 --signal=B:SIGUSR2@600 -N 1"
submit_statement="sbatch -A ${_arg_assoc} -p ${queue} -J ${_arg_tag} -o ${_arg_outdir}/${samplename%%.*}_%j.log -n $tasks -t 300 --signal=B:SIGUSR2@600 -N 1"
$submit_statement --wrap "$(cat << EOF
cleanup(){
......@@ -271,14 +271,11 @@ if [ -z "$SLURM_JOB_ID" ]; then
}
trap 'cleanup' SIGUSR2
scratch=/localscratch/\${SLURM_JOB_ID}
for fname in ${samplename}*; do
sbcast \$fname "\$scratch"/\$(basename \$fname)
done
#cp $sample "\$scratch"
sbcast $sample "\$scratch"/\$(basename $sample)
# Go to jobdir and start the program
cd /localscratch/\${SLURM_JOB_ID}
set OMPI_MCA_btl=self,sm,openib
eval $(which orca) "\$scratch"/$(basename $sample)
eval \$(which orca) "\$scratch"/\$(basename $sample)
cleanup
EOF
)"
......
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