Ignore:
Timestamp:
2015-06-19T18:39:39+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.sh

    r5444 r5452  
    5656# SVN action on XIOS & NEMO essentials directories 
    5757#--------------------------------------------------- 
    58 pstep "Get NEMO SVN state with: ${SVN_OPT}" 
     58print_step "Get NEMO SVN state with: ${SVN_OPT}" 
    5959get_nemo_rev 
    6060 
    6161# Check softwares versions (source arch environment) 
    6262#--------------------------------------------------- 
    63 pstep 'Get softwares release' 
     63print_step 'Get softwares release' 
    6464. ${ARCH_ENV} > /dev/null 
    6565get_soft_rel 
     
    6868# XIOS compiling 
    6969#--------------------------------------------------- 
    70 pstep 'Compiling XIOS' 
     70print_step 'Compiling XIOS' 
    7171cd ${DIR_XIOS} 
    7272#./make_xios --arch $ARCH -job $NPROC >& /dev/null 
     
    7474# NEMO config compiled from scratch 
    7575#--------------------------------------------------- 
    76 pstep "Compiling ${CONF_REF} configuration" 
     76print_step "Compiling ${CONF_REF} configuration" 
    7777cd ${NEMO_CONF} 
    7878#[ -d ${TEST_CONF} ] && ./makenemo -n ${TEST_CONF} clean 
     
    8282# Get namelists, xml & forced files for running 
    8383#--------------------------------------------------- 
    84 pstep 'Preparing job' 
     84print_step 'Preparing job' 
    8585cd ${TEST_DIR} 
    8686find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \; 
     
    9898# Check input files in all cases 
    9999#--------------------------------------------------- 
    100 pstep 'Test input files difference' 
     100print_step 'Test input files difference' 
    101101diff_inputs 
    102 get_out $STEP $STATUS 
     102 
    103103# Job submission & computing 
    104104#--------------------------------------------------- 
    105 pstep 'Running' 
    106 job_num=$( ${JOB_SUBM} | awk '{print $NF}' ) 
     105print_step 'Running' 
     106export JOB_ID=$( ${JOB_SUBM} | awk '{print $NF}' ) 
    107107[ $? -ne 0 ] && get_out $STEP $STATUS 
    108108 
    109109time_elapsed=0; time_increment=30 
    110110sleep ${time_increment} 
    111 while [[ $( ${JOB_LIST} | grep ${job_num} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 
     111while [[ $( ${JOB_LIST} | grep ${JOB_ID} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do 
    112112    printf "\n####################################################" >> computation.log 
    113     ${JOB_VIEW} ${job_num}                                          >> computation.log 
     113    ${JOB_VIEW} ${JOB_ID}                                          >> computation.log 
    114114    sleep ${time_increment} 
    115115    let time_elapsed+=${time_increment} 
     
    119119# Eventual crash during computing 
    120120#--------------------------------------------------- 
    121 pstep 'Test if ASCII output files exist' 
    122 if   [[ ! -f ocean.output || $( grep 'E R R O R' ocean.output ) ]]; then 
    123     ${JOB_DELE} ${job_num} &> /dev/null 
    124     [ ! -f ocean.output                  ] && STEP='nemo.exe crashed at initialization' 
    125     [ $( grep 'E R R O R' ocean.output ) ] && STEP='nemo.exe crashed' 
     121print_step 'Test if ASCII output files exist' 
     122if   [[ ! -e ocean.output || $( grep 'E R R O R' ocean.output ) ]]; then 
     123    ${JOB_DELE} ${JOB_ID} &> /dev/null 
     124    [ ! -e ocean.output                  ] && STATUS='nemo.exe crashed at initialization' 
     125    [ $( grep 'E R R O R' ocean.output ) ] && STATUS='nemo.exe crashed' 
    126126    comments('E R R O R') 
    127     ${JOB_DELE} ${job_num} >/dev/null 2>&1 
    128     STATUS='FAILED' 
     127    ${JOB_DELE} ${JOB_ID} >/dev/null 2>&1 
    129128    get_out $STEP $STATUS 
    130129else 
     
    133132    # Inspect output text files 
    134133    #--------------------------------------------------- 
    135     pstep 'Test ASCII output files diff' 
     134    print_step 'Test ASCII output files diff' 
    136135    for file in ocean.output solver.stat tracer.stat; do 
    137136   diff $file ${REFE_DIR}/$file 
    138    [ $? -ne 0 ] && STATUS='FAILED' 
     137   [ $? -ne 0 ] && STATUS='At least 1 ASCII output file differ' 
    139138    done 
    140139 
    141140    # Inspect output NetCDF files 
    142141    #--------------------------------------------------- 
    143     pstep 'Test last restart NetCDF files diff' 
     142    print_step 'Test last restart NetCDF files diff' 
    144143    diff_restart #2> /dev/null 
    145     [ $? -ne 0 ] && STATUS='FAILED' 
     144    [ $? -ne 0 ] && STATUS='At least 1 restart .nc file differ' 
     145 
     146    # Check super-computing architecture modification 
     147    #--------------------------------------------------- 
     148    print_step 'Test super-computing architecture change' 
     149    diff_arch 
     150    [ $? -ne 0 ] && STATUS='At least 1 restart .nc file differ' 
    146151 
    147152    # Get computation duration 
    148153    #--------------------------------------------------- 
    149     pstep 'Get real CPU time' 
     154    print_step 'Get real CPU time' 
    150155    get_cpu_time 
    151156 
     
    155160# End 
    156161#--------------------------------------------------- 
    157 if [ $STATUS == 'FAILED' ]; then STEP='Test outputs difference'; else STEP='Code is reliable'; fi 
     162[ $STATUS == 'OK' ] && STEP='Code is reliable' 
    158163get_out $STEP $STATUS 
Note: See TracChangeset for help on using the changeset viewer.