From: David Sarrut Date: Tue, 14 Jan 2014 06:54:33 +0000 (+0100) Subject: Copy macro files for log X-Git-Tag: v1.4.0~143 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5a05b543778b62236f31fbb5e0db507e0e0c733d;p=clitk.git Copy macro files for log --- 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