From 7c6f86cefdc90cfc796c0f3a3d3a4e0b231db58f Mon Sep 17 00:00:00 2001 From: Pierre Gueth Date: Mon, 30 Jan 2012 16:06:15 +0100 Subject: [PATCH] bugfix in cluster jobs and submission script --- cluster_tools/gate_run_submit_cluster.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cluster_tools/gate_run_submit_cluster.sh b/cluster_tools/gate_run_submit_cluster.sh index 136a567..ab772dd 100755 --- a/cluster_tools/gate_run_submit_cluster.sh +++ b/cluster_tools/gate_run_submit_cluster.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -u SCRIPTNAME="$(basename "${0}")" @@ -9,7 +9,7 @@ usage exit 1 } -DEFAULTRELEASESUFFIX="06o" +DEFAULTRELEASESUFFIX="06w" DEFAULTNUMBEROFJOBS="10" function usage { @@ -20,9 +20,9 @@ echo "default releasesuffix = ${DEFAULTRELEASESUFFIX}" test $# -eq 0 && usage && exit 0 -SCRIPTDIR=~/gate/gate-tests/bin -RELEASEDIR="${HOME}/gate/release${3:-"${DEFAULTRELEASESUFFIX}"}" -JOBFILE=~/gate/gate-tests/job_release.job +SCRIPTDIR="${HOME}/git/gate-tests/bin" +RELEASEDIR="${HOME}/releases/grid_release${3:-"${DEFAULTRELEASESUFFIX}"}" +JOBFILE="${HOME}/git/gate-tests/job_cluster.job" echo "Checking stuff" test -f ${JOBFILE} || error "can't find job file ${JOBFILE}" @@ -31,7 +31,7 @@ MACRODIR=$(pwd) test -d ${MACRODIR}/mac && test -d ${MACRODIR}/data || error "invalid path" MACROFILE=${1:?"provide relative macro path"} test -f ${MACRODIR}/${MACROFILE} || error "invalid macro" -OUTPUTDIR=$(mktemp --tmpdir=${MACRODIR} -d run.XXXX) +OUTPUTDIR=$(mktemp --tmpdir=${MACRODIR} -d run.XXXX || error "can't create temp dir") test -d ${OUTPUTDIR} || error "can't locate output dir" RUNID=${OUTPUTDIR##*.} NJOBS=${2:-"${DEFAULTNUMBEROFJOBS}"} @@ -40,6 +40,7 @@ PARAM="${4:-""}" echo "Lets roll!!" echo "runid is ${RUNID}" +echo "qsub is $(which qsub)" test -z "${PARAM}" && echo "no param" || echo "param is ${PARAM}" echo "using release $(basename ${RELEASEDIR})" echo "submitting ${NJOBS} jobs" @@ -47,7 +48,7 @@ echo "submitting ${NJOBS} jobs" while test $NJOBS -gt 0; do qsub -N "gatejob.${RUNID}" -o "${OUTPUTDIR}" \ -v "PARAM=\"${PARAM}\",INDEX=${NJOBS},INDEXMAX=${NJOBSMAX},SCRIPTDIR=${SCRIPTDIR},OUTPUTDIR=${OUTPUTDIR},RELEASEDIR=${RELEASEDIR},MACROFILE=${MACROFILE},MACRODIR=${MACRODIR}" \ - ${JOBFILE} || error "submission error" + "${JOBFILE}" || error "submission error" let NJOBS-- done -- 2.47.1