source: BAORadio/AmasNancay/v5/submit2ge-onoffmaker.sh @ 682

Last change on this file since 682 was 580, checked in by torrento, 13 years ago

add new scripts

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/sh -xv
2
3scriptName="`basename $0`"
4echo "Processing script ${scriptName} at `date`"
5
6#Process cmd line args: the -src option is mandatory (source name as Abell85)
7sourceRadio=
8dateSelected=
9dateJob=
10freqBAOCalib=
11#use -sim option to simulate processing (debug the script as if...)
12simulationMode=""
13while [ $# -gt 0 ]
14do
15  case "$1" in
16      -src)  sourceRadio="$2"; shift;;
17      -date) dateSelected="-date $2"; dateJob="$2";     shift;;
18      -freq) freqBAOCalib="-freq $2"; shift;;
19      -sim) 
20      simulationMode="-sim On"
21      $ECHO "INFO ${scriptName} running in SIMUL mode";;
22        -h)
23        echo >&2 \
24            "usage: $0 -src souce -date YYYYMMDD [-freq freq in MHz (default ${freqBAOCalib})] [-sim to trig simulation mode]"
25        exit 1;;
26        *)  break;;     # terminate while loop
27    esac
28    shift
29done
30
31
32if [ "<${sourceRadio}>" = "<>" ]; then
33    $ECHO "FATAL: You have forgotten to select the source option (-src)"
34    exit 1
35fi
36
37
38jobBatchName="onoff-${sourceRadio}${dateJob}"
39
40jobLogName="${jobBatchName}.log.$$"
41
42qsub -P P_baoradio -l sps=1,irods=1,ct=2400,vmem=1000M,fsize=1000M -o $jobLogName -j yes -N $jobBatchName -m be -M ${LOGNAME}@lal.in2p3.fr -V <<EOF
43
44${SCRIPTPATH}/onoffmaker.sh  -src ${sourceRadio} ${dateSelected} ${freqBAOCalib} ${simulationMode}
45EOF
Note: See TracBrowser for help on using the repository browser.