tparamsubmit.sh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch) (HTM) git clone git://src.adamsgaard.dk/pism (DIR) Log (DIR) Files (DIR) Refs (DIR) LICENSE --- tparamsubmit.sh (745B) --- 1 #!/bin/bash 2 3 # Copyright (C) 2009-2013 Ed Bueler and Andy Aschwanden 4 5 # submits scripts produced by paramspawn.sh; uses QSUB environment variable if set 6 # "qsub" is from PBS job scheduler 7 # (see http://www.adaptivecomputing.com/products/open-source/torque/) 8 # 9 # usage for real, using qsub: 10 # $ ./paramsubmit.sh 11 # 12 # usage for test: 13 # $ PISM_QSUB=cat ./paramsubmit.sh 14 15 set -e -x # exit on error 16 17 SCRIPTNAME=paramsubmit.sh 18 19 # submission command 20 if [ -n "${PISM_QSUB:+1}" ] ; then # check if env var PREFIX is already set 21 QSUB=$PISM_QSUB 22 echo "($SCRIPTNAME) QSUB = $PISM_QSUB" 23 else 24 QSUB="qsub" 25 echo "($SCRIPTNAME) QSUB = $QSUB" 26 fi 27 28 for SCRIPT in do_*.sh 29 do 30 echo "($SCRIPTNAME) doing '$QSUB $SCRIPT' ..." 31 $QSUB $SCRIPT 32 done