(file) Return to checkglobalhsargs CVS log (file) (dir) Up to [Development] / JSOC / proj / globalhs / scripts

File: [Development] / JSOC / proj / globalhs / scripts / checkglobalhsargs (download)
Revision: 1.5, Fri Nov 7 06:36:14 2014 UTC (3 years, 2 months ago) by tplarson
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-12, Ver_8-11, Ver_8-10, HEAD
Changes since 1.4: +3 -3 lines
now use separate job submission parameters for first and subsequent iterations of peakbagging

#! /bin/tcsh -f

@ numequals = `echo $argv | sed s/=/"\n"/g | wc -l` - 1
if ($numequals < $#argv) then
  echo no space is permitted after the equal sign in parameter value assignments
  exit 1
endif

set paramlist = (label starttime totaltime lmin lmax \
lchunk lchunk1 lchunk2 lchunk3 lchunk4 lchunk5 \
timechunk timechunk1 timechunk2 \
powtotaltime slicestep powstartoffset pkbwriteflag\
firststep laststep topdir \
retnjobs tsfnjobs pownjobs pkbnjobs1 pkbnjobs2 \
v2tjobthreshold retjobthreshold tsfjobthreshold powjobthreshold pkbjobthreshold1 pkbjobthreshold2 \
v2tqueue retqueue tsfqueue powqueue pkbqueue1 pkbqueue2)

@ i = 1
while ($i <= $#argv )
  set param = `echo $argv[$i] | cut -d= -f1`
  set test = `echo $paramlist | sed s/" "/"\n"/g | grep -cw $param`
  if ($test != 1) then
    echo $param is not a valid parameter for doglobalhs
    exit 1
  endif
@ i++
end

set steplist = (sht shtcheck retilen dscopyn retile retile1 dscopy1 mkgaps gapfill gfgaps pow slice pkbgn invert)

@ i = 1
while ($i <= $#argv )
  set $argv[$i]
@ i++
end

if ($?firststep) then
  set test = `echo $steplist | sed s/" "/"\n"/g | grep -cw $firststep`
  if ($test != 1) then
    echo \"$firststep\" is not a valid value for parameter firststep
    exit 1
  endif
endif

if ($?laststep) then
  set test = `echo $steplist | sed s/" "/"\n"/g | grep -cw $laststep`
  if ($test != 1) then
    echo \"$laststep\" is not a valid value for parameter laststep
    exit 1
  endif
endif


Karen Tian
Powered by
ViewCVS 0.9.4