Changeset 9223


Ignore:
Timestamp:
2018-01-12T19:43:55+01:00 (3 years ago)
Author:
mathiot
Message:

add function to detect not-succesfull runs (E R R O R in ocean.output) in sette_rpt

Location:
branches/2017/dev_merge_2017/NEMOGCM/SETTE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/SETTE/new_sette_rpt.sh

    r9221 r9223  
    183183    fi 
    184184    rm f1.tmp$$ 
    185   else 
    186     printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv 
    187185  fi 
    188186} 
     
    273271      fi 
    274272    fi 
     273  fi 
     274} 
     275 
     276function runtest(){ 
     277# 
     278# Run checks. 
     279# Check presence of E R R O R in ocean.output from each 
     280# 
     281  vdir=$1 
     282  nam=$2 
     283  pass=$3 
     284# 
     285  if [ -d $vdir/$nam ]; then 
     286    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
     287    dorv=`echo $dorv | sed -e 's:.*/::'` 
     288    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 ` 
     289    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output 
     290    if  [ ! -f $f1o ] ; then 
     291      printf "%-20s %s\n" $nam " ocean.output is MISSING : " $dorv 
     292      return; 
     293    else 
     294      nerr=`grep 'E R R O R' $f1o | wc -l` 
     295      if [[ $nerr > 0 ]]; then 
     296        printf "%-20s %s %s\n" $nam " run FAILED : " $dorv 
     297        if [ $pass == 1 ]; then 
     298          echo "<return> to view end of ocean.output" 
     299          read y 
     300          tail -100 $f1o 
     301          echo '' 
     302          echo "full ocean.output available here: $f1o" 
     303        fi 
     304      fi 
     305    fi 
    275306  else 
    276     printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv  
     307    printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv 
    277308  fi 
    278309} 
     
    389420 do 
    390421   reprotest $NEMO_VALID $repro_test $pass 
     422   runtest $NEMO_VALID $repro_test $pass 
    391423 done 
    392424 
  • branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette_rpt.sh

    r9221 r9223  
    184184    fi 
    185185    rm f1.tmp$$ 
    186   else 
    187     printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv 
    188186  fi 
    189187} 
     
    275273      fi 
    276274    fi 
     275  fi 
     276} 
     277 
     278function runtest(){ 
     279# 
     280# Run checks. 
     281# Check presence of E R R O R in ocean.output from each 
     282# 
     283  vdir=$1 
     284  nam=$2 
     285  pass=$3 
     286# 
     287  if [ -d $vdir/$nam ]; then 
     288    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
     289    dorv=`echo $dorv | sed -e 's:.*/::'` 
     290    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 ` 
     291    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output 
     292    if  [ ! -f $f1o ] ; then 
     293      printf "%-20s %s\n" $nam " ocean.output is MISSING : " $dorv 
     294      return; 
     295    else  
     296      nerr=`grep 'E R R O R' $f1o | wc -l` 
     297      if [[ $nerr > 0 ]]; then 
     298        printf "%-20s %s %s\n" $nam " run FAILED : " $dorv 
     299        if [ $pass == 1 ]; then 
     300          echo "<return> to view end of ocean.output" 
     301          read y 
     302          tail -100 $f1o 
     303          echo '' 
     304          echo "full ocean.output available here: $f1o" 
     305        fi 
     306      fi 
     307    fi 
    277308  else 
    278309    printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv 
     
    392423 do 
    393424   reprotest $NEMO_VALID $repro_test $pass 
     425   runtest $NEMO_VALID $repro_test $pass 
    394426 done 
    395427 
Note: See TracChangeset for help on using the changeset viewer.