Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

#Draft/WIP: Simplify lookup of scratch directory #16

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,8 @@ XRDRURL="root://dtn-eic.jlab.org/"
XRDRBASE="/work/eic2/EPIC"

# Local temp dir
echo "SLURM_TMPDIR=${SLURM_TMPDIR:-}"
echo "SLURM_JOB_ID=${SLURM_JOB_ID:-}"
echo "SLURM_ARRAY_JOB_ID=${SLURM_ARRAY_JOB_ID:-}"
echo "SLURM_ARRAY_TASK_ID=${SLURM_ARRAY_TASK_ID:-}"
echo "_CONDOR_SCRATCH_DIR=${_CONDOR_SCRATCH_DIR:-}"
echo "OSG_WN_TMP=${OSG_WN_TMP:-}"
if [ -n "${_CONDOR_SCRATCH_DIR:-}" ] ; then
TMPDIR=${_CONDOR_SCRATCH_DIR}
elif [ -n "${SLURM_TMPDIR:-}" ] ; then
TMPDIR=${SLURM_TMPDIR}
else
if [ -d "/scratch/slurm/${SLURM_JOB_ID:-}" ] ; then
TMPDIR="/scratch/slurm/${SLURM_JOB_ID:-}"
else
TMPDIR=${TMPDIR:-/tmp}/${$}
fi
fi
TMPDIR=${WORK_DIR:-/tmp}
echo "TMPDIR=${TMPDIR}"
mkdir -p ${TMPDIR}
ls -al ${TMPDIR}

# Input file parsing
Expand Down Expand Up @@ -190,5 +173,3 @@ fi

# closeout
date
find ${TMPDIR}
du -sh ${TMPDIR}
Loading