From 5a05b543778b62236f31fbb5e0db507e0e0c733d Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Tue, 14 Jan 2014 07:54:33 +0100 Subject: [PATCH] Copy macro files for log --- cluster_tools/gate_run_submit_cluster.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cluster_tools/gate_run_submit_cluster.sh b/cluster_tools/gate_run_submit_cluster.sh index 0248a1e..4df0be7 100755 --- a/cluster_tools/gate_run_submit_cluster.sh +++ b/cluster_tools/gate_run_submit_cluster.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash set -u SCRIPTNAME="$(basename "${0}")" @@ -74,10 +74,19 @@ echo "njobs = ${NJOBS}" >> "${PARAMFILE}" echo "macro = ${MACROFILE}" >> "${PARAMFILE}" test -z "${PARAM}" || echo "param = ${PARAM}" >> "${PARAMFILE}" +# Copy macros files (for log) +mkdir ${OUTPUTDIR}/mac +cp ${MACROFILE} ${OUTPUTDIR}/mac +files=`grep "control/execute" ${MACROFILE} | cut -d " " -f 2` +for i in $files +do + cp $i ${OUTPUTDIR}/mac +done + while test $NJOBS -gt 0; do if test "${QSUB}" = "noqsub" - then + then echo "Launching Gate log in ${OUTPUTDIR}/gate_${NJOBS}.log" PARAM=\"${PARAM}\" INDEX=${NJOBS} INDEXMAX=${NJOBSMAX} SCRIPTDIR=${SCRIPTDIR} OUTPUTDIR=${OUTPUTDIR} RELEASEDIR=${RELEASEDIR} MACROFILE=${MACROFILE} MACRODIR=${MACRODIR} PBS_JOBID="local_${NJOBS}" bash "${JOBFILE}" > ${OUTPUTDIR}/gate_${NJOBS}.log & else -- 2.47.1