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 5521 for branches/2015 – NEMO

Changeset 5521 for branches/2015


Ignore:
Timestamp:
2015-06-30T16:20:45+02:00 (9 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Error management redefinition

Location:
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST
Files:
3 edited

Legend:

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

    r5484 r5521  
    33#Config ccc_msub 
    44#MSUB -A  gen7451 
    5 #MSUB -r  O2L3P_trust 
    6 #MSUB -o  O2L3P_trust_%I 
    7 #MSUB -e  O2L3P_trust_%I 
     5#MSUB -r  Trust 
     6#MSUB -o  Trust_%I 
     7#MSUB -e  Trust_%I 
    88#MSUB -oe 
    99#MSUB -q  xlarge 
     
    1111#MSUB -N  1 
    1212#MSUB -T  1800 
    13 #MSUB -@  ntmlod@locean-ipsl.upmc.fr:begin,end 
     13##MSUB -@  ntmlod@locean-ipsl.upmc.fr:begin,end 
    1414ccc_mprun ./opa 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh

    r5509 r5521  
    66NEMO_TRUS=$( pwd $( dirname $0 ) ) 
    77DEBUG=0; PUBLISH=0 
    8 ST='FAILED'; ERR=0 # 'FAILED' by default 
     8ST='FAILED'# 'FAILED' by default 
    99 
    1010# Get options for replacing some initials settings 
     
    4949# SVN action on XIOS & NEMO essentials directories 
    5050#--------------------------------------------------- 
    51 print_step 'Get NEMO code state / repository' 
     51print_step 'SVN actions on NEMO directories' 
    5252get_nemo_rev 
    5353 
     
    6363print_step 'Compiling XIOS' 
    6464cd ${DIR_XIOS} 
    65 #./make_xios --full --arch $ARCH -job $NPROC >& /dev/null 
    66 [ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out $ST ERR=1 
     65./make_xios --full --arch $ARCH -job $NPROC >& /dev/null 
     66[ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out 1 
    6767 
    6868# NEMO config compiled from scratch 
     
    7070print_step "Compiling ${REFE_CONF} configuration" 
    7171cd ${NEMO_CONF} 
    72 #[ -d ${TEST_CONF} ] && ./makenemo -n ${TEST_CONF} clean 
     72[ -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 $ST ERR=2 
     74[ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out 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 $ST ERR=3 
     82[ $? -ne 0 ] && get_out 3 
    8383[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 
    8484 
     
    9292print_step 'Submitting job' 
    9393JOB_ID=$( eval ${JOB_SUBM} ) 
    94 [ $? -ne 0 ] && get_out $ST ERR=4 
    95 print_step 'Holding-Running job' 
     94[ $? -ne 0 ] && get_out 4 
     95print_step 'Holding/Running job' 
    9696job_pending 
    9797print_step 'Job finished' 
     
    102102if   [[ ! -e time.step || $( grep -q 'E R R O R' ocean.output ) ]]; then 
    103103    comments 'E R R O R' 
    104     get_out $ST ERR=5 
     104    get_out 5 
    105105else 
    106106    # Get time computation 
     
    114114#--------------------------------------------------- 
    115115print_step 'Test ASCII output files diff' 
    116 diff_textfiles 
    117 [ "$ST" == 'FAILED' ] && get_out $ST ERR=8 
     116diff_results 
     117[ "$ST" == 'FAILED' ] && get_out 8 
    118118 
    119119# Inspect output NetCDF files 
     
    121121print_step 'Test last restart NetCDF files diff' 
    122122diff_restart 
    123 [ "$ST" == 'FAILED' ] && get_out $ST ERR=10 
     123[ "$ST" == 'FAILED' ] && get_out 10 
    124124 
    125125# Get comments (ocean.output & diff model.log) 
     
    129129# End 
    130130#--------------------------------------------------- 
    131 [ "$ST" == 'OK' ] && ERR='Code is reliable' 
    132 get_out $ST $ERR 
     131get_out 'Code is reliable' 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh

    r5509 r5521  
    77    if [ "$state" == 'E R R O R' ]; then 
    88   [ -e time.step ] && LAST_TIME_STEP=$( cat time.step | tr -d [:space:] ) 
    9    export ${LAST_TIME_STEP} ERR=1 
     9   export ${LAST_TIME_STEP} 
    1010    fi 
    1111 
    1212    [ -e ocean.output ] && line=$( grep -m1 -A5 "$state" ocean.output | tr -d '\n' ) 
     13 
    1314    if [[ -e ${REFE_DIR}/model.log && $( diff -q model.log ${REFE_DIR}/model.log ) ]]; then 
    1415   line=$( diff model.log ${REFE_DIR}/model.log  | tr -d '\n' ) 
     
    2223    mesg='Same' 
    2324    for file in inputs_list.txt $( ls namelist_* ) $( ls *.xml ); do 
    24    diff -q $file ${REFE_DIR}/$file 
     25   diff -q $file ${REFE_DIR}/$file > /dev/null 
    2526   [ $? -ne 0 ] && mesg='Different' 
    2627    done 
    2728 
    28     printf "Input files\n$mesg\n" | tee mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 
     29    printf "Input files\n$mesg\n" | tee mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt 
    2930} 
    3031 
    3132diff_results() { 
    3233    for file in ocean.output $( ls *.stat ); do 
    33    [ ! -e ${REFE_DIR}/$file ] && export ST='FAILED' && get_out $ST ERR=7 
     34   [ ! -e ${REFE_DIR}/$file ] && export ST='FAILED' && get_out 7 
    3435   diff -q $file ${REFE_DIR}/$file 
    3536   [ $? -ne 0 ] && export ST='FAILED' 
     
    3839 
    3940diff_restart() { 
    40     [ ! -e  ${REFE_DIR}/time.step ] && export ST='FAILED' && get_out $ST ERR=9 
     41    [ ! -e  ${REFE_DIR}/time.step ] && export ST='FAILED' && get_out 9 
    4142 
    4243    export LAST_TIME_STEP=$( cat ${REFE_DIR}/time.step | tr -d [:space:] ) 
     
    8283get_cpu_time() { 
    8384    real_cpu_time=$( eval "${JOB_INFO} ${JOB_ID} | ${JOB_TIME}" ) 
    84     printf "Real CPU time\n${real_cpu_time}\n" | tee mesg_10_realcputime_${CFG_USER}_${CFG_ARCH}.txt 
     85    printf "Real CPU time\n${real_cpu_time}\n" | tee mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt 
    8586} 
    8687 
     
    175176 
    176177END_MAIL 
    177 #`tail -n 1 ${TEST_DIR}/mesg_03_error_${CFG_USER}_${CFG_ARCH}.txt` 
     178 
    178179      if [ -e ${TEST_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt ]; then 
    179180     cat ${TEST_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt  >> trusting.mail 
     
    188189 
    189190get_out() { 
     191    ERR=$1 
     192 
    190193    printf "Status\n$ST\n"  > mesg_02_status_${CFG_USER}_${CFG_ARCH}.txt 
    191194 
    192     # Save tested configuration if trusting failed 
    193195    if [ "$ST" == 'FAILED' ]; then 
    194196   cd ${TEST_DIR} 
    195    printf "Input files\n\n"   > mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt 
    196    printf "Real CPU time\n\n" > mesg_10_realcputime_${CFG_USER}_${CFG_ARCH}.txt 
     197 
     198   if [ ! -e mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt ]; then 
     199       printf "Input files\n\n"   > mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt 
     200   fi 
     201 
     202   if [ ! -e mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt ]; then 
     203       printf "Real CPU time\n\n" > mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt 
     204   fi 
    197205 
    198206   if [ ! -e mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt ]; then 
     
    201209 
    202210        # Error identification 
    203    case ERR in 
     211   case $ERR in 
    204212       # Compilation 
    205213       1) ERR='XIOS compilation failed'            ;;  2) ERR='NEMO compilation failed'            ;; 
     
    215223   esac 
    216224 
    217    #tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz * 
     225   export ERR 
    218226    fi 
    219227 
    220228    printf "Result.....\n$ERR\n" > mesg_03_result_${CFG_USER}_${CFG_ARCH}.txt 
     229 
     230    # Save tested configuration if trusting failed 
     231    [ "$ST" == 'FAILED' ] && tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz * 
    221232 
    222233    mesg_make 
     
    234245   ${JOB_INFO} ${JOB_ID}                                           >> computation.log 
    235246   sleep ${time_increment} 
    236 #  let time_elapsed+=${time_increment} 
    237247   time_elapsed=$(( ${time_elapsed} + ${time_increment} )) 
    238248    done 
     
    244254   export ${TIME_LIMIT} 
    245255   get_out $ST ERR=6 
    246 } 
     256    fi 
     257} 
Note: See TracChangeset for help on using the changeset viewer.