From c030509f9433d54adfcc679ba767d318d8985f2f Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Thu, 16 May 2024 13:40:31 -0400 Subject: [PATCH 1/3] Simplify lookup of scratch directory Different systems use different scratch spaces. We can pass this through the template file specific to the site the jobs are being submitted from. For example, on OSG https://github.com/eic/job_submission_condor/blob/main/templates/osg_csv.sh.in. export TMPDIR=${_CONDOR_SCRATCH_DIR} On JLAB slurm, export TMPDIR=/scratch/slurm On CEDAR/narval slurm, export TMPDIR=$SLURM_TMPDIR --- scripts/run.sh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index b98282b..d996d42 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -70,23 +70,6 @@ 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 echo "TMPDIR=${TMPDIR}" mkdir -p ${TMPDIR} ls -al ${TMPDIR} From b95b47a95d3f3d66828185f8e47b26b08e1f846c Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 May 2024 08:42:16 -0400 Subject: [PATCH 2/3] Set up a separate variable for node local work directory --- scripts/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index d996d42..6ddfe96 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -70,8 +70,8 @@ XRDRURL="root://dtn-eic.jlab.org/" XRDRBASE="/work/eic2/EPIC" # Local temp dir +TMPDIR=${WORK_DIR:-/tmp} echo "TMPDIR=${TMPDIR}" -mkdir -p ${TMPDIR} ls -al ${TMPDIR} # Input file parsing From a0a2ce711cf21033520a8dff13475dbf8be65085 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 May 2024 08:56:55 -0400 Subject: [PATCH 3/3] Shorten closeout message --- scripts/run.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index 6ddfe96..a156921 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -173,5 +173,3 @@ fi # closeout date -find ${TMPDIR} -du -sh ${TMPDIR}