--- mitgcm.org/scripts/check_outp 2009/04/16 14:45:53 1.8 +++ mitgcm.org/scripts/check_outp 2009/06/28 16:59:59 1.13 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.8 2009/04/16 14:45:53 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.13 2009/06/28 16:59:59 jmc Exp $ # # The purpose of this script is to compare # the latest output with the previous one (from the same platform with @@ -43,6 +43,8 @@ ADDRESS='none' dBug=f sTime=`date` +#- to get case insensitive "ls" (and order of tested experiments) +export LC_ALL="en_US.UTF-8" # Parse options ac_prev= @@ -286,7 +288,7 @@ cat ./slist | tee -a $OUTPFIL fi echo ".... previous list (n=$n):" | tee -a $OUTPFIL - cat ./plist | tee -a $OUTPFIL + cat ./plist | tee -a $OUTPFIL | head -20 fi fi @@ -308,7 +310,10 @@ num=`grep -c "^$key" ./plist` #- discard unsafe test: dd=`echo $optf | grep -c 'gfortran.*mth'` - if test $dd = 1 -a $mname = lagoon ; then num=-1 ; fi + #if test $mname = 'lagoon' -a $dd = 1 ; then num=-1 ; fi + #if test $mname = 'harbor' -a $dd = 1 ; then num=-1 ; fi + #if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi + #if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi if test $num -gt 0 ; then pline=`grep "^$key " ./plist | head -1` if test $dBug = 't' ; then @@ -324,6 +329,25 @@ sed -n "5,$ p" $outp | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' \ | sed 's/ OPTFILE=.*\// OPTFILE=/g' \ | grep -v '^[A-S][a-t]* time: ' > tmpfp + #-- re-order list of exp (according to local "sort" order) + listD=`grep '^[YN] [YN] [YN] [YN]' tmpfs \ + | sed 's/^[YN] .*pass //' | sed 's/^[YN] .*FAIL //' \ + | sed 's/^[YN] .*N\/O //' | sort` + for xx in $listD + do + sed "/ $xx\$/d" tmpfs > tmpfn + sed -n "/ $xx\$/p" tmpfs >> tmpfn + mv tmpfn tmpfs + done + listD=`grep '^[YN] [YN] [YN] [YN]' tmpfp \ + | sed 's/^[YN] .*pass //' | sed 's/^[YN] .*FAIL //' \ + | sed 's/^[YN] .*N\/O //' | sort` + for xx in $listD + do + sed "/ $xx\$/d" tmpfp > tmpfn + sed -n "/ $xx\$/p" tmpfp >> tmpfn + mv tmpfn tmpfp + done echo -n "=== diff $sdir $pdir :" | tee -a $OUTPFIL diff tmpfs tmpfp > tmpdf yy=$?