Ignore:
Timestamp:
2015-06-19T22:57:06+02:00 (5 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Ping pong updates between Curie & Ada to finalize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh

    r5453 r5455  
    33 
    44comments() { 
    5     [ -e ocean.output ] && line=$( grep $1 ocean.output ) 
     5    state=$1 
    66 
    7     # Check environment architecture modification 
    8     #--------------------------------------------------- 
    9     [ $( diff -q env.log ${REFE_DIR}/env.log ) ] && line=$( diff env.log ${REFE_DIR}/env.log ) 
     7    if [ $state == 'E R R O R' ]; then 
     8   if [ -e ocean.output ]; then 
     9       last_time_step=$( cat ${TEST_DIR}/time.step | tr -d [:space:] ) 
     10       STEP='nemo.exe crashed at '${last_time_step} && export STEP 
     11       line=$( grep -m1 "$state" ocean.output | tr -d '\n' ) 
     12   else 
     13       STEP='nemo.exe crashed at initialization'    && export STEP 
     14       return 
     15   fi 
     16    fi 
     17 
     18    if [ $( diff -q env.log ${REFE_DIR}/env.log ) ]; then 
     19   line=$( diff env.log ${REFE_DIR}/env.log  | tr -d '\n' ) 
     20    fi 
    1021 
    1122    printf "Comments\n$line\n" | tee mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 
     
    4758       cmp ${TEST_DIR}/${base_name}_$comp.nc ${REFE_DIR}/${base_name}_$comp.nc 
    4859       if [ $? -ne 0 ]; then 
    49       export STEP='Restart files different' 
     60      STATUS='FAILED'; STEP='Restart files different' 
    5061      printf "$CDO diffn\n" 
    5162      $CDO diffn ${TEST_DIR}/${base_name}_$comp.nc ${REFE_DIR}/${base_name}_$comp.nc 2> /dev/null 
     
    5869 
    5970    else 
     71   STATUS='FAILED'; STEP='No restart files found at last time step' 
    6072   printf "no restart files found for comparison\n" 
    6173    fi 
     74 
     75    [ $STATUS == 'FAILED'] && get_out $STATUS $STEP 
    6276} 
    6377 
     
    93107   # For time being, just get revision number from XIOS 
    94108   if [ $dir == ${DIR_XIOS} ]; then 
    95        echo 'XIOS '$( svn info $dir | awk '(NR == 9) {print $NF}' ) >> env.log 
     109       echo 'XIOS '$( svn info $dir | awk '(NR == 5) {print $NF}' ) >> env.log 
    96110       continue 
    97111   fi 
     
    119133 
    120134  # Send mail only when FAILED 
    121   if [[ ! -z $MAIL && "$STATUS"=='FAILED' ]]; then 
     135  if [[ ! -z $MAIL && $STATUS == 'FAILED' ]]; then 
    122136      cat << END_MAIL > trusting.mail 
    123137XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
     
    144158 
    145159    # Save tested configuration if trusting failed 
    146     if [ "$STATUS" == 'FAILED' ]; then 
     160    if [ $STATUS == 'FAILED' ]; then 
     161   cd ${TEST_DIR} 
    147162   touch mesg_08_inputfiles_${CFG_USER}_${CFG_ARCH}.txt mesg_09_realcputime_${CFG_USER}_${CFG_ARCH}.txt \ 
    148163         mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt 
Note: See TracChangeset for help on using the changeset viewer.