]> Creatis software - clitk.git/commitdiff
add JOB_ID as alias
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Tue, 4 Dec 2018 09:18:30 +0000 (10:18 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Tue, 4 Dec 2018 09:18:30 +0000 (10:18 +0100)
cluster_tools/gate_run_submit_cluster.sh

index 6e4b3286242e2de56d0fe56eef426ebc320cf024..7f1568dcfd801ff1b5deeea8672c699090a9084c 100755 (executable)
@@ -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}" \