From be384dae0a3d42503ea8af4d471c455943273822 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Tue, 4 Dec 2018 10:18:30 +0100 Subject: [PATCH] add JOB_ID as alias --- cluster_tools/gate_run_submit_cluster.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cluster_tools/gate_run_submit_cluster.sh b/cluster_tools/gate_run_submit_cluster.sh index 6e4b328..7f1568d 100755 --- a/cluster_tools/gate_run_submit_cluster.sh +++ b/cluster_tools/gate_run_submit_cluster.sh @@ -105,10 +105,17 @@ done while test $NJOBS -gt 0; do + if [ "$PARAM" = "\"\"" ] + then + JPARAM="-a [JOB_ID,${NJOBS}]" + else + JPARAM="${PARAM} [JOB_ID,${NJOBS}]" + fi + if test "${QSUB}" = "noqsub" then echo "Launching Gate log in ${OUTPUTDIR}/gate_${NJOBS}.log" - PARAM=\"${PARAM}\" INDEX=${NJOBS} INDEXMAX=${NJOBSMAX} OUTPUTDIR=${OUTPUTDIR} RELEASEDIR=${RELEASEDIR} MACROFILE=${MACROFILE} MACRODIR=${MACRODIR} PBS_JOBID="local_${NJOBS}" bash "${JOBFILE}" > ${OUTPUTDIR}/gate_${NJOBS}.log & + PARAM=\"${JPARAM}\" INDEX=${NJOBS} INDEXMAX=${NJOBSMAX} OUTPUTDIR=${OUTPUTDIR} RELEASEDIR=${RELEASEDIR} MACROFILE=${MACROFILE} MACRODIR=${MACRODIR} PBS_JOBID="local_${NJOBS}" bash "${JOBFILE}" > ${OUTPUTDIR}/gate_${NJOBS}.log & elif test "$(dnsdomainname)" = "in2p3.fr" then PROJECTGROUP=creatis @@ -116,7 +123,7 @@ while test $NJOBS -gt 0; do -e "${OUTPUTDIR}" \ -l sps=1 \ -N "gate.${RUNID}" \ - -v "PARAM=\"${PARAM}\",INDEX=${NJOBS},INDEXMAX=${NJOBSMAX},OUTPUTDIR=${OUTPUTDIR},RELEASEDIR=${RELEASEDIR},MACROFILE=${MACROFILE},MACRODIR=${MACRODIR}" \ + -v "PARAM=\"${JPARAM}\",INDEX=${NJOBS},INDEXMAX=${NJOBSMAX},OUTPUTDIR=${OUTPUTDIR},RELEASEDIR=${RELEASEDIR},MACROFILE=${MACROFILE},MACRODIR=${MACRODIR}" \ "${JOBFILE}" || error "submission error" else qsub -N "gatejob.${RUNID}" -o "${OUTPUTDIR}" \ -- 2.47.1