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

File: [Development] / JSOC / proj / globalhs / scripts / pkbgn / doiter (download)
Revision: 1.16, Fri Feb 13 01:53:43 2015 UTC (3 years, 8 months ago) by tplarson
Branch: MAIN
CVS Tags: Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-12, Ver_8-11, Ver_8-10
Changes since 1.15: +3 -3 lines
change from a.q to k.q

#! /bin/tcsh -f

setenv PATH $JSOCROOT/bin/$JSOC_MACHINE':'$JSOCROOT/proj/globalhs/scripts':'$JSOCROOT/proj/globalhs/scripts/pkbgn':'$PATH

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

if (! $?index) then
  echo must specify parameter index
  exit 1
endif

if (! $?iter) then
  echo must specify parameter iter
  exit 1
endif

if (! $?noiseperturb) set noiseperturb = 0
if (! $?allmodes) set allmodes = 1
if (! $?last) set last=0
if (! $?writeflag) set writeflag=1

# submit next batch of jobs when total number of pkbgn jobs drops below jobthreshold
# submit at most maxjobs jobs at once
if (! $?GLOBALHS_PKBQUEUE1) then
  set q1=k.q
else
  set q1=$GLOBALHS_PKBQUEUE1
endif

if (! $?GLOBALHS_PKBNJOBS1) then
  set maxjobs1=10
else
  set maxjobs1=$GLOBALHS_PKBNJOBS1
endif

if (! $?GLOBALHS_PKBJOBTHRESHOLD1) then
  set jobthreshold1=2
else
  set jobthreshold1=$GLOBALHS_PKBJOBTHRESHOLD1
endif

if (! $?GLOBALHS_PKBQUEUE2) then
  set q2=k.q
else
  set q2=$GLOBALHS_PKBQUEUE2
endif

if (! $?GLOBALHS_PKBNJOBS2) then
  set maxjobs2=60
else
  set maxjobs2=$GLOBALHS_PKBNJOBS2
endif

if (! $?GLOBALHS_PKBJOBTHRESHOLD2) then
  set jobthreshold2=80
else
  set jobthreshold2=$GLOBALHS_PKBJOBTHRESHOLD2
endif


if ($iter == 1 && $writeflag != 0) then
  set readflag='READFFT=0'
  set stem='subpw'
  set q=$q1
  set maxjobs=$maxjobs1
  set jobthreshold=$jobthreshold1
else
  set readflag=''
  set stem='subp'
  set q=$q2
  set maxjobs=$maxjobs2
  set jobthreshold=$jobthreshold2
endif

# if this script inherited label in its environment, use it as the suffix for job names
if (! $?GLOBALHS_LABEL) then
  set ls=''
else
  set ls=.$GLOBALHS_LABEL
endif

set qsubtmp=/tmp27/$USER/qsubtmp
mkdir -p $qsubtmp

set vars = `cat script.parms`
@ i = 1
while ($i <= $#vars)
  set $vars[$i]
@ i++
end

if (! $?ica) set ica=2
if (! $?executable) then
  set exec=jpkbgn
else
 set exec=$executable
endif

if ($q == k.q) then
  alias qsub qsub2
  alias qstat qstat2
  alias waittosubmit waittosubmit2
endif

@ iter2=$iter + 1
set r='res'$iter'q'
set m='m'$iter'q'
set p='par'$iter
set is=.$iter

if ($ica <= 2) then
  set mm=24
  set pm=12
  set rm=163
else
  set mm=26
  set pm=13
  set rm=187
endif

set test = `wc par$iter`
if ($#test == 0) then
  echo file par$iter does not exist >> iter.log
  exit 1
endif
if ($test[1] == 0) then
  echo file par$iter is empty >> iter.log
  exit 1
endif
if ($test[2] != $pm * $test[1]) then
  echo error in file par$iter >> iter.log
  exit 1
endif

set test=`wc par$iter{q}`
if ($#test == 0) then
  echo file par$iter{q} does not exist >> iter.log
  exit 1
endif
if ($test[1] == 0) then
  echo file par$iter{q} is empty >> iter.log
  exit 1
endif
if ($test[2] != $pm * $test[1]) then
  echo error in file par$iter{q} >> iter.log
  exit 1
endif

rm result.* logp* outp.* $stem.* pkb.parms.[0-9]* pkb.log.* jpkbgn.exitstatus.* >& /dev/null
cp pblist0 pblist
set list=`cat pblist`
set njobs=$maxjobs
if ($#list < $njobs) set njobs = $#list
set i=0
while($i < $#list)
@ r = $i % $njobs
  set subfile=$stem.$index.$r$is$ls
  if ($i < $njobs) then
    echo '#\!/bin/csh' > $subfile
    echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
    echo 'cd' $PWD >> $subfile
  endif
@ i++
  set lmode=$list[$i]
  cat parms.MMMM | sed s/MMMM/$lmode/g > pkb.parms.$lmode
  echo \(time $exec @pkb.parms.$lmode $readflag\) '>&' pkb.log.$lmode >> $subfile
  echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
end 

waittosubmit $jobthreshold $stem
set i=0
while ($i < $njobs)
  qsub -q $q -e $qsubtmp -o $qsubtmp $stem.$index.$i$is$ls
@ i++
end

echo 'start waiting...'
set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep $stem.$index | grep "$ls" | wc -l`
while($njobsrunning > 0)
  sleep 60
  set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep $stem.$index | grep "$ls" | wc -l`
end

set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

cx 6 $iter'q'

if (-es m1 || -es faillist) then
  echo 'rerun failed modes...'
  cat m1 faillist | sort -n -r | uniq > pblist
  rm $stem.*
  set list=`cat pblist`
  if ($#list < $njobs) set njobs = $#list
  set i=0
  while($i < $#list)
  @ r = $i % $njobs
    set subfile=$stem.$index.$r$is$ls
    if ($i < $njobs) then
      echo '#\!/bin/csh' > $subfile
      echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
      echo 'cd' $PWD >> $subfile
    endif
  @ i++
    set lmode=$list[$i]
    echo \(time $exec @pkb.parms.$lmode $readflag\) '>&' pkb.log.$lmode >> $subfile
    echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
  end 
  waittosubmit $jobthreshold $stem
  set i=0
  while ($i < $njobs)
    qsub -q $q -e $qsubtmp -o $qsubtmp $stem.$index.$i$is$ls
  @ i++
  end
  echo 'start waiting...'
  set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep $stem.$index | grep "$ls" | wc -l`
  while($njobsrunning > 0)
    sleep 60
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep $stem.$index | grep "$ls" | wc -l`
  end

  set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
  set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
  set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

  set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
  set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
  set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
  echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

  cx 6 $iter'q'
endif

if (-es m1 || -es faillist) then
  echo 'iteration '$iter': some modes continue to fail, check file m1 and/or faillist' >> iter.log
  exit 1
endif

if ($noiseperturb) then
  mv www m$iter{q}
  cat parms.idl - << EOF |idl
extract,ndt,tsample,icasea=icasea
qqq
www
6 1 
EOF
  mv qqq res$iter{q}
else
  mv www m$iter{q}
  mv qqq res$iter{q}
endif


set test=`wc res$iter{q}`
if ($#test == 0) then
  echo file res$iter{q} does not exist >> iter.log
  exit 1
endif
if ($test[1] == 0) then
  echo file res$iterq is empty >> iter.log
  exit 1
endif
if ($test[2] % $rm) then
  echo error in file res$iter{q} >> iter.log
  exit 1
endif


if ($noiseperturb) then

  echo 'rerun with noise perturbed...'
  pcombine par$iter{q} www eee
  if ($ica <= 2) then
    awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12-1}' <eee >par$iter{qx}
  else
    awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12-1,$13}' <eee >par$iter{qx}
  endif
  cat parms.MMMM | sed s/$iter'q'/$iter'qx'/g > parms.MMMM.tmp
  mv parms.MMMM.tmp parms.MMMM
  awk '{print $2}' < par$iter{qx} | uniq | sort -n -r > pblist
  rm result.* logp* outp.* subp.* pkb.parms.[0-9]* pkb.log.* jpkbgn.exitstatus.* >& /dev/null

  set list=`cat pblist`
  set njobs=$maxjobs2
  if ($#list < $njobs) set njobs = $#list
  set i=0
  while($i < $#list)
  @ r = $i % $njobs
    set subfile=subp.$index.$r$is$ls
    if ($i < $njobs) then
      echo '#\!/bin/csh' > $subfile
      echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
      echo 'cd' $PWD >> $subfile
    endif
  @ i++
    set lmode=$list[$i]
    cat parms.MMMM | sed s/MMMM/$lmode/g > pkb.parms.$lmode
    echo \(time $exec @pkb.parms.$lmode\) '>&' pkb.log.$lmode >> $subfile
    echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
  end 

  waittosubmit $jobthreshold2 subp
  set i=0
  while ($i < $njobs)
    qsub -q $q2 -e $qsubtmp -o $qsubtmp subp.$index.$i$is$ls
  @ i++
  end

  echo 'start waiting...'
  set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
  while($njobsrunning > 0)
    sleep 60
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
  end

  set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
  set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
  set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

  set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
  set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
  set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
  echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

  cx 6 $iter'qx'

  if (-es m1 || -es faillist) then
    echo 'rerun failed modes...'
    cat m1 faillist | sort -n -r | uniq > pblist
    rm subp.*
    set list=`cat pblist`
    if ($#list < $njobs) set njobs = $#list
    set i=0
    while($i < $#list)
    @ r = $i % $njobs
      set subfile=subp.$index.$r$is$ls
      if ($i < $njobs) then
        echo '#\!/bin/csh' > $subfile
        echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
        echo 'cd' $PWD >> $subfile
      endif
    @ i++
      set lmode=$list[$i]
      echo \(time $exec @pkb.parms.$lmode\) '>&' pkb.log.$lmode >> $subfile
      echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
    end 
    waittosubmit $jobthreshold2 subp
    set i=0
    while ($i < $njobs)
      qsub -q $q2 -e $qsubtmp -o $qsubtmp subp.$index.$i$is$ls
    @ i++
    end
    echo 'start waiting...'
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
    while($njobsrunning > 0)
      sleep 60
      set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
    end

    set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
    set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
    set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

    set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
    set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
    set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
    echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

    cx 6 $iter'qx'
  endif

  if (-es m1 || -es faillist) then
    echo 'iteration '$iter': some modes continue to fail, check file m1 and/or faillist' >> iter.log
    exit 1
  endif

  mv qqq res$iter{qp}
  mv www m$iter{qp}
endif

if (! $last) then

  if ($noiseperturb) then
    noimake $iter $allmodes
  else
    regmake $iter $allmodes
  endif
  idl<'tmp'$iter'.idl'

  set test=`wc m$iter{qx}`
  if ($#test == 0) then
    echo file m$iter{qx} does not exist >> iter.log
    exit 1
  endif
  if ($test[1] == 0) then
    echo file m$iter{qx} is empty >> iter.log
    exit 1
  endif
  if ($test[2] != $mm * $test[1]) then
    echo error in file m$iter{qx} >> iter.log
    exit 1
  endif

  if ($noiseperturb) then
    cat parms.MMMM | sed s/par$iter'qx'/par$iter'q'/g > parms.MMMM.tmp
    mv parms.MMMM.tmp parms.MMMM
  endif
  cat parms.MMMM | sed s/par$iter/par$iter2/g > parms.MMMM.tmp
  mv parms.MMMM.tmp parms.MMMM
  exit 0

else

  echo running NA=18
  rm result.* logp* outp.* subp.* pkb.parms.[0-9]* pkb.log.* jpkbgn.exitstatus.* >& /dev/null
  cp pblist0 pblist
  set list=`cat pblist`
  set njobs=$maxjobs2
  if ($#list < $njobs) set njobs = $#list
  set i=0
  while($i < $#list)
  @ r = $i % $njobs
    set subfile=subp.$index.$r$is$ls
    if ($i < $njobs) then
      echo '#\!/bin/csh' > $subfile
      echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
      echo 'cd' $PWD >> $subfile
    endif
  @ i++
    set lmode=$list[$i]
    cat parms.MMMM | sed s/MMMM/$lmode/g > pkb.parms.$lmode
    echo \(time $exec @pkb.parms.$lmode NACOEFF=18\) '>&' pkb.log.$lmode >> $subfile
    echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
  end 

  waittosubmit $jobthreshold2 subp
  set i=0
  while ($i < $njobs)
    qsub -q $q2 -e $qsubtmp -o $qsubtmp subp.$index.$i$is$ls
  @ i++
  end

  echo 'start waiting...'
  set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
  while($njobsrunning > 0)
    sleep 60
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
  end

  set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
  set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
  set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

  set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
  set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
  set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
  echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

  cx 18 $iter'q'

  if (-es m1 || -es faillist) then
    echo 'rerun failed modes...'
    cat m1 faillist | sort -n -r | uniq > pblist
    rm subp.*
    set list=`cat pblist`
    if ($#list < $njobs) set njobs = $#list
    set i=0
    while($i < $#list)
    @ r = $i % $njobs
      set subfile=subp.$index.$r$is$ls
      if ($i < $njobs) then
        echo '#\!/bin/csh' > $subfile
        echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
        echo 'cd' $PWD >> $subfile
      endif
    @ i++
      set lmode=$list[$i]
      echo \(time $exec @pkb.parms.$lmode NACOEFF=18\) '>&' pkb.log.$lmode >> $subfile
      echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
    end 
    waittosubmit $jobthreshold2 subp
    set i=0
    while ($i < $njobs)
      qsub -q $q2 -e $qsubtmp -o $qsubtmp subp.$index.$i$is$ls
    @ i++
    end
    echo 'start waiting...'
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
    while($njobsrunning > 0)
      sleep 60
      set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
    end

    set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
    set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
    set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

    set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
    set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
    set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
    echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

    cx 18 $iter'q'
  endif

  if (-es m1 || -es faillist) then
    echo NA=18: some modes continue to fail, check file m1 and/or faillist >> iter.log
    exit 1
  endif

  mv qqq res$iter'q.18'
  mv www m$iter'q.18'


  echo running NA=36
  rm result.* logp* outp.* subp.* pkb.parms.[0-9]* pkb.log.* jpkbgn.exitstatus.* >& /dev/null
  cp pblist0 pblist
  set list=`cat pblist`
  set njobs=$maxjobs2
  if ($#list < $njobs) set njobs = $#list
  set i=0
  while($i < $#list)
  @ r = $i % $njobs
    set subfile=subp.$index.$r$is$ls
    if ($i < $njobs) then
      echo '#\!/bin/csh' > $subfile
      echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
      echo 'cd' $PWD >> $subfile
    endif
  @ i++
    set lmode=$list[$i]
    cat parms.MMMM | sed s/MMMM/$lmode/g > pkb.parms.$lmode
    echo \(time $exec @pkb.parms.$lmode NACOEFF=36 LOGFILE='/dev/null'\) '>&' pkb.log.$lmode >> $subfile
    echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
  end 

  waittosubmit $jobthreshold2 subp
  set i=0
  while ($i < $njobs)
    qsub -q $q2 -e $qsubtmp -o $qsubtmp subp.$index.$i$is$ls
  @ i++
  end

  echo 'start waiting...'
  set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
  while($njobsrunning > 0)
    sleep 60
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
  end

  set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
  set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
  set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

  set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
  set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
  set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
  echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

  cx 36 $iter'q'

  if (-es m1 || -es faillist) then
    echo 'rerun failed modes...'
    cat m1 faillist | sort -n -r | uniq > pblist
    rm subp.*
    set list=`cat pblist`
    if ($#list < $njobs) set njobs = $#list
    set i=0
    while($i < $#list)
    @ r = $i % $njobs
      set subfile=subp.$index.$r$is$ls
      if ($i < $njobs) then
        echo '#\!/bin/csh' > $subfile
        echo 'setenv PATH' $JSOCROOT'/bin/$JSOC_MACHINE' >> $subfile
        echo 'cd' $PWD >> $subfile
      endif
    @ i++
      set lmode=$list[$i]
      echo \(time $exec @pkb.parms.$lmode NACOEFF=36 LOGFILE='/dev/null'\) '>&' pkb.log.$lmode >> $subfile
      echo echo \$status '>&' jpkbgn.exitstatus.$lmode >> $subfile
    end 
    waittosubmit $jobthreshold2 subp
    set i=0
    while ($i < $njobs)
      qsub -q $q2 -e $qsubtmp -o $qsubtmp subp.$index.$i$is$ls
    @ i++
    end
    echo 'start waiting...'
    set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
    while($njobsrunning > 0)
      sleep 60
      set njobsrunning = `qstat -r -u $USER | grep "Full jobname:" | grep subp.$index | grep "$ls" | wc -l`
    end

    set expectedlist = `/bin/ls pkb.parms.[0-9]* | cut -d'.' -f3`
    set ranlist      = `/bin/ls pkb.log.* | cut -d'.' -f3`
    set rerunlist = `echo $expectedlist $ranlist | sed s/" "/"\n"/g | sort | uniq -u`

    set errlist1 = `grep -Hv 0 jpkbgn.exitstatus.* | awk -F '[.:]' '{print $3}'`
    set errlist2 = `grep -c "successful completion" pkb.log.* | grep -v :1 | awk -F '[.:]' '{print $3}'`
    set errlist = `echo $errlist1 $errlist2 | sed s/" "/"\n"/g | sort | uniq`
    echo -n $rerunlist $errlist | sed s/" "/"\n"/g | sort > faillist

    cx 36 $iter'q'
  endif

  if (-es m1 || -es faillist) then
    echo NA=36: some modes continue to fail, check file m1 and/or faillist >> iter.log
    exit 1
  endif

  mv qqq res$iter'q.36'
  mv www m$iter'q.36'

  chmod 444 res$iter{q*} par$iter{*} m$iter{q*}

endif

Karen Tian
Powered by
ViewCVS 0.9.4