New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10704 for NEMO/branches – NEMO

Changeset 10704 for NEMO/branches


Ignore:
Timestamp:
2019-02-20T11:10:07+01:00 (5 years ago)
Author:
mathiot
Message:

apply Simon suggestion + minor change in report display (ticket #2239)

Location:
NEMO/branches/2019/fix_sette_ticket2239
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_sette_ticket2239/all_functions.sh

    r10698 r10704  
    183183# function to tidy up after each test and populate the NEMO_VALIDATION store 
    184184post_test_tidyup () { 
     185# Save current exit status of caller script  
     186    RUN_STATUS=$?  
     187    echo "Exit status: ${RUN_STATUS}"  
    185188# 
    186189# requires the following variables defined and exported from the calling script: 
     
    204207################################################################ 
    205208# SMALL DEBUG 
     209    EXIT_STATUS=${RUN_STATUS} 
    206210    if [ ! -r ${EXE_DIR}/ocean.output ] 
    207211        then 
    208212        grep "E R R O R" ${EXE_DIR}/ocean.output && echo "Some ERRORS at execution time, see ${EXE_DIR}/ocean.output" 
     213        EXIT_STATUS=2 
    209214        # exit 2 Error now catch in the report  
    210215    fi 
     
    214219        echo "file time.step does not exist"   >> ${SETTE_DIR}/output.sette 
    215220        echo "some problems during execution of model"  >> ${SETTE_DIR}/output.sette  
     221        EXIT_STATUS=1 
    216222        # exit 1 Error now catch in the report 
    217223    else 
     
    234240   exit 1 
    235241    fi 
     242#  
     243# Exit before populating validation directory if the model run has  
     244# returned a non-zero exit status  
     245# On CRAY NEMO exit is not the expected 999 or 123456 (let this bloc in case useful later on). 
     246#    case ${EXIT_STATUS} in 
     247#        0|123456|999) echo " NEMO finished with exit code $EXIT_STATUS " ; post_test_tidyup ;; 
     248#        *) echo " NEMO abort on an unexpected error (segmentation fault or whatever) $EXIT_STATUS " 
     249#    esac 
     250 
     251    [ ${EXIT_STATUS} -ne 0 ] && exit ${EXIT_STATUS}   
    236252# 
    237253# Save output & debug files in NEMO_VALIDATION tree 
  • NEMO/branches/2019/fix_sette_ticket2239/sette_rpt.sh

    r10698 r10704  
    532532# 
    533533# before/after tests 
    534 # 
     534 echo "" 
     535 echo "   !----result comparison check----!   " 
    535536 if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ]; then 
    536537   echo '' 
     
    545546 else 
    546547   echo '' 
    547    echo 'Result are not compare with any other revision. To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg' 
     548   echo ' No path for comparison specified. Result are not compare with any other revision. ' 
     549   echo ' To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg. ' 
    548550   echo '' 
    549551 fi 
Note: See TracChangeset for help on using the changeset viewer.