Commit 68bc9271 authored by Pape, David (FWCC) - 139658's avatar Pape, David (FWCC) - 139658
Browse files

Fixed "couldn't chdir to '/tmp/custom-executorXXXXXXXXX'" bug by setting

a working directory for Slurm.
parent bbd044be
......@@ -61,9 +61,10 @@ if [[ "$1" == "hemera" && "$runStage" == "build_script" ]]; then
{
# write shebang and SBATCH options to new script
echo "#!/usr/bin/env bash";
echo "#SBATCH --output=$WORK_DIR/slurm-%j.out";
echo "#SBATCH --error=$WORK_DIR/slurm-%j.err";
echo "#!/usr/bin/env bash"
echo "#SBATCH --workdir=$WORK_DIR"
echo "#SBATCH --output=$WORK_DIR/slurm-%j.out"
echo "#SBATCH --error=$WORK_DIR/slurm-%j.err"
# iterate over SLURM options and get the desired setting
# only write to new script if variable not empty
......@@ -82,7 +83,7 @@ if [[ "$1" == "hemera" && "$runStage" == "build_script" ]]; then
echo ""
# add the rest of the old script
tail -n +5 "$script";
tail -n +5 "$script"
} >> "$newScript"
# move the script
......@@ -124,7 +125,7 @@ if [[ "$1" == "hemera" && "$runStage" == "build_script" ]]; then
;;
esac
sleep 5;
sleep 5
done
pidTailOut=$(pidChildOf "$pidTailOutParent")
......
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