Commit 4434809d authored by Martin Vala's avatar Martin Vala

Fixing submit dir

parent 2e41f677
Pipeline #1006 passed with stages
in 56 seconds
......@@ -8,7 +8,7 @@ SR_TOKEN_LOCATION=${SR_TOKEN_LOCATION-"$HOME/.alice"}
SR_ALICE_VERSION=${SR_ALICE_VERSION-"VO_ALICE@AliPhysics::vAN-20181115-1"}
SR_SUBMIT_DIR=${SR_SUBMIT_DIR-"$PWD"}
SR_WKDIR=${SR_WK_BASE_DIR-"${SR_SUBMIT_BASE_DIR}"}/wk/$SLURM_ARRAY_JOB_ID_${SLURM_ARRAY_TASK_ID}
SR_WKDIR=${SR_WK_BASE_DIR-"${SR_SUBMIT_BASE_DIR}"}/wk/${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}
SR_OUTDIR=$SR_SUBMIT_BASE_DIR/$(printf "%04d" ${SLURM_ARRAY_TASK_ID})
SR_ALIEN_LOCK="/tmp/.alien_$UID.lock"
......
......@@ -46,14 +46,15 @@ SetupAlice
# Split files
if [ "$SR_MODE" = "slurm" ];then
SR_SUBMIT_BASE_DIR=$PWD/$(date +%F)
[ -d $SR_SUBMIT_BASE_DIR ] && { echo "Directory '$SR_SUBMIT_BASE_DIR' exists!!! Remove it first !!!"; exit 1;}
mkdir -p $SR_SUBMIT_BASE_DIR
# export SR_SUBMIT_DIR=$SR_SUBMIT_BASE_DIR/${SR_INPUT_PREFIX::-1}
SR_RUN=${SR_INPUT_PREFIX::-1}
SR_RUN=$(echo $SR_RUN | cut -d '_' -f 3)
export SR_SUBMIT_DIR=$SR_SUBMIT_BASE_DIR/$SR_RUN/src
export SR_SUBMIT_BASE_DIR=$PWD/$SR_RUN/$(date +%F)
[ -d $SR_SUBMIT_BASE_DIR ] && { echo "Directory '$SR_SUBMIT_BASE_DIR' exists!!! Remove it first !!!"; exit 1;}
mkdir -p $SR_SUBMIT_BASE_DIR
export SR_SUBMIT_DIR=$SR_SUBMIT_BASE_DIR/src
if [ -d $SR_SUBMIT_DIR ]; then
echo "Reusing $SR_SUBMIT_DIR ..."
rm -f $SR_SUBMIT_DIR/${SR_INPUT_PREFIX}*
......
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