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 5509 for branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh – NEMO

Ignore:
Timestamp:
2015-06-30T10:49:09+02:00 (9 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Error management redefinition

File:
1 edited

Legend:

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

    r5485 r5509  
    66NEMO_TRUS=$( pwd $( dirname $0 ) ) 
    77DEBUG=0; PUBLISH=0 
    8 STATUS='FAILED'; STEP='' # 'FAILED' by default 
     8ST='FAILED'; ERR=0 # 'FAILED' by default 
    99 
    1010# Get options for replacing some initials settings 
     
    6464cd ${DIR_XIOS} 
    6565#./make_xios --full --arch $ARCH -job $NPROC >& /dev/null 
    66 [ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out $STATUS $STEP 
     66[ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out $ST ERR=1 
    6767 
    6868# NEMO config compiled from scratch 
     
    7272#[ -d ${TEST_CONF} ] && ./makenemo -n ${TEST_CONF} clean 
    7373./makenemo -n ${TEST_CONF} -r ${REFE_CONF} -m $ARCH -j $NPROC >& /dev/null 
    74 [ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out $STATUS $STEP 
     74[ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out $ST ERR=2 
    7575 
    7676# Get namelists, xml & forced files for running 
     
    8080find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 
    8181get_inputs 
    82 [ $? -ne 0 ] && get_out $STATUS $STEP 
     82[ $? -ne 0 ] && get_out $ST ERR=3 
    8383[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 
    8484 
     
    9292print_step 'Submitting job' 
    9393JOB_ID=$( eval ${JOB_SUBM} ) 
    94 [ $? -ne 0 ] && get_out $STATUS $STEP 
     94[ $? -ne 0 ] && get_out $ST ERR=4 
    9595print_step 'Holding-Running job' 
    9696job_pending 
     
    102102if   [[ ! -e time.step || $( grep -q 'E R R O R' ocean.output ) ]]; then 
    103103    comments 'E R R O R' 
    104     get_out $STATUS $STEP 
     104    get_out $ST ERR=5 
    105105else 
    106106    # Get time computation 
     
    110110fi 
    111111 
    112 STATUS='OK' # 'OK' by default 
     112ST='OK' # 'OK' by default 
    113113# Inspect output text files 
    114114#--------------------------------------------------- 
    115115print_step 'Test ASCII output files diff' 
    116116diff_textfiles 
    117 [ "$STATUS" == 'FAILED' ] && get_out $STATUS $STEP 
     117[ "$ST" == 'FAILED' ] && get_out $ST ERR=8 
    118118 
    119119# Inspect output NetCDF files 
     
    121121print_step 'Test last restart NetCDF files diff' 
    122122diff_restart 
    123 [ "$STATUS" == 'FAILED' ] && get_out $STATUS $STEP 
     123[ "$ST" == 'FAILED' ] && get_out $ST ERR=10 
    124124 
    125125# Get comments (ocean.output & diff model.log) 
     
    129129# End 
    130130#--------------------------------------------------- 
    131 [ "$STATUS" == 'OK' ] && STEP='Code is reliable' 
    132 get_out $STATUS $STEP 
     131[ "$ST" == 'OK' ] && ERR='Code is reliable' 
     132get_out $ST $ERR 
Note: See TracChangeset for help on using the changeset viewer.