--- mitgcm.org/scripts/check_outp 2013/08/22 21:32:54 1.40 +++ mitgcm.org/scripts/check_outp 2018/08/24 14:18:18 1.52 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.40 2013/08/22 21:32:54 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.52 2018/08/24 14:18:18 jmc Exp $ # # The purpose of this script is to compare # the latest output with the previous one (from the same platform with @@ -162,14 +162,14 @@ else kind="restart" ; order=5 fi - order=`expr $order + 10 \* $EXTRA` - order=`printf '%3.3i' $order` if test "x$UR4" = x1 ; then OPTFILE="${OPTFILE}.use_r4" fi if test "x$MPI" = x1 ; then yy=`echo $OPTFILE | grep -c '+mpi'` - if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi + if test $yy = 0 ; then yy=`echo $OPTFILE | grep -c '+impi'` ; fi + if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" + else order=`expr $order + 200` ; fi fi if test "x$MTH" = x1 ; then yy=`echo $OPTFILE | grep -c '+mth$'` @@ -181,6 +181,8 @@ if test "x$DVLP" = x1 ; then OPTFILE="${OPTFILE}.dvlp" fi + order=`expr $order + 10 \* $EXTRA` + order=`printf '%3.3i' $order` day=`echo $i | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'` @@ -224,6 +226,7 @@ OUTPFIL=`basename $0`'.log' NBLDIFF=5 ADDRESS='none' +MAILCMD="mail" dBug=f t4update=0 sTime=`date` @@ -313,9 +316,9 @@ PREV_P="${PY}_${PM}"; PERIOD=`echo $PERIOD | sed 's/^[0-9][0-9][0-9][0-9]/&_/'` -#INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD" +#INDIR="/net/zany.mit.edu/data/ORWELL/export-9/mitgcm-testing/results/$PERIOD" INDIR="/u/u0/httpd/html/testing/results/$PERIOD" -#INDIR="/u/u2/jmc/mitgcm/test_web/results/$PERIOD" +#INDIR="$HOME/mitgcm/test_web/results/$PERIOD" #- a short summary of this checking : OUTPSUM=`echo $LASTDAY | sed 's/^20../_/'` @@ -336,9 +339,14 @@ if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL fi + elif test -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then + echo ' '$CMDLINE | tee -a $OUTPSUM + echo " t4update: skip "`basename $0`" ( $PRC_MAILS missing )" | tee -a $OUTPSUM + echo " End time: "`date` | tee -a $OUTPSUM + exit 0 else if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi - echo " t4update ignored (not current day or $PRC_MAILS or $OUTPSUM missing)" | tee $OUTPFIL + echo " t4update ignored (not current day or $OUTPSUM missing)" | tee $OUTPFIL fi elif test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' @@ -386,8 +394,8 @@ ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all if test "x$MACHINES" = "x_All_" ; then - MACHINES="aces- acesgrid baudelaire dickens danton beagle" - MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber" + MACHINES="aces- acesgrid baudelaire engaging1 engaging- svante glacier ollie stan1" + MACHINES="$MACHINES pleiades archer stomp octopus saramago" MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` for madd in $MALL ; do @@ -457,7 +465,8 @@ echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL cmis=`expr $cmis + 1` elif test $num = '0' ; then - echo "no previous test for:" $key | tee -a $OUTPFIL + echo " dir='$sdir', type='$type', of='$optf':" | tee -a $OUTPFIL + echo " --> no previous test matching key='$key'" | tee -a $OUTPFIL cmis=`expr $cmis + 1` else pline=`grep "^$key " $TMP.plist | head -1` @@ -560,8 +569,13 @@ rm -f $TMP.dir_all $TMP.slist $TMP.plist if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi if test "x$ADDRESS" != 'xnone' ; then - echo ".. send $OUTPSUM to $ADDRESS" - mail -s $OUTPSUM $ADDRESS < $OUTPSUM + #- change default sender address ("From:") using "mail -r" option + # since, by default, baudelaire uses USER@localhost.localdomain + #fullNam=`hostname -A | awk '{print $1}'` + #MAILCMD="$MAILCMD -r ${USER}@${fullNam}" + #--- + echo ".. send $OUTPSUM to '$ADDRESS' using '$MAILCMD'" + $MAILCMD -s 'check_outp summary' $ADDRESS < $OUTPSUM fi echo ".. cat $OUTPSUM" cat $OUTPSUM