/[MITgcm]/mitgcm.org/scripts/check_outp
ViewVC logotype

Diff of /mitgcm.org/scripts/check_outp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by jmc, Tue Sep 9 18:09:37 2008 UTC revision 1.6 by jmc, Mon Apr 6 18:12:34 2009 UTC
# Line 18  usage() Line 18  usage()
18      echo "  (-l |-list )MACHINES  check platforms from this list"      echo "  (-l |-list )MACHINES  check platforms from this list"
19      echo "                         [def=\"$MACHINES\"]"      echo "                         [def=\"$MACHINES\"]"
20      echo "  (-d |-day  )FIRSTDAY  select output from day=\"YYYYMMDD\""      echo "  (-d |-day  )FIRSTDAY  select output from day=\"YYYYMMDD\""
21        echo "                         (argument of \"date -d\" is allowed)"
22      echo "                         [def=\"$FIRSTDAY\"]"      echo "                         [def=\"$FIRSTDAY\"]"
23      echo "  (-u |-upto )LASTDAY   until last day=\"YYYYMMDD\" (=selected period)"      echo "  (-u |-upto )LASTDAY   until last day=\"YYYYMMDD\" (=selected period)"
24      echo "                         [def=\"FIRSTDAY\"]"      echo "                         [def=\"FIRSTDAY\"]"
# Line 101  for ac_option ; do Line 102  for ac_option ; do
102       esac       esac
103    
104  done  done
105    #-- test FIRSTDAY content ; interpret as "date -d" arg. if not YYYYMMDD
106    ttt=`echo "y$FIRSTDAY" | sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/z/'`
107    if test "x$ttt" != 'xyz' ; then
108       FIRSTDAY=`date -d "$FIRSTDAY" +%Y%m%d`
109    fi
110    ttt=`echo "y$FIRSTDAY" | sed 's/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/z/'`
111    if test "x$ttt" != 'xyz' ; then
112      echo "Error: FIRSTDAY='$FIRSDAY' not recognized"
113      exit 2
114    fi
115  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi  if test $LASTDAY = "30000000" ; then LASTDAY=$FIRSTDAY ; fi
116  CMDLINE=$0  CMDLINE=$0
117  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
# Line 144  if test -d $INDIR ; then Line 155  if test -d $INDIR ; then
155    fi    fi
156  else  else
157    echo "$INDIR is not a directory"    echo "$INDIR is not a directory"
158    exit    exit 3
159  fi  fi
160    
161  #- a short summary of this checking :  #- a short summary of this checking :
# Line 291  for mname in $MACHINES ; do Line 302  for mname in $MACHINES ; do
302            num=`grep -c "^$key" ./plist`            num=`grep -c "^$key" ./plist`
303            #- discard unsafe test:            #- discard unsafe test:
304            dd=`echo $optf | grep -c 'gfortran.*mth'`            dd=`echo $optf | grep -c 'gfortran.*mth'`
305            if [ $dd -ge 1 ] ; then num=-1 ; fi            #if [ $dd -ge 1 ] ; then num=-1 ; fi
306            if test $num -gt 0 ; then            if test $num -gt 0 ; then
307              pline=`grep "^$key " ./plist | head -1`              pline=`grep "^$key " ./plist | head -1`
308              if test $dBug = 't' ; then              if test $dBug = 't' ; then
# Line 301  for mname in $MACHINES ; do Line 312  for mname in $MACHINES ; do
312              pdir=`echo $pline | cut -d " " -f 5`              pdir=`echo $pline | cut -d " " -f 5`
313              outs="$INDIR/$sdir/summary.txt"              outs="$INDIR/$sdir/summary.txt"
314              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              sed -n "5,$ p" $outs | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
315                                     | sed 's/ OPTFILE=.*\// OPTFILE=/g' \
316                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfs
317              outp="$INDIR/$pdir/summary.txt"              outp="$INDIR/$pdir/summary.txt"
318              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \              sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \
319                                     | sed 's/ OPTFILE=.*\// OPTFILE=/g' \
320                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp                                   | grep -v '^[A-S][a-t]* time:  ' > tmpfp
321              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL              echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL
322              diff tmpfs tmpfp > tmpdf              diff tmpfs tmpfp > tmpdf
# Line 373  if test "x$ADDRESS" != 'xnone' ; then Line 386  if test "x$ADDRESS" != 'xnone' ; then
386  fi  fi
387  echo ".. cat $OUTPSUM"  echo ".. cat $OUTPSUM"
388  cat $OUTPSUM  cat $OUTPSUM
389    exit 0

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22