Changeset 8826


Ignore:
Timestamp:
2017-11-27T17:49:45+01:00 (3 years ago)
Author:
nicolasmartin
Message:

Continuation of global refactoring of the tool: bugfixes, adjust cfg files mime property and default settings, improve error management

Location:
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_ADA.cfg

    • Property mime-type set to text/x-shellscript
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_CURIE.cfg

    • Property mime-type set to text/x-shellscript
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/X64_CURIE_cron.cfg

    • Property mime-type set to text/x-shellscript
    r8818 r8826  
    55## Default settings 
    66##--------------------------------------------------- 
    7 TRUST_JOB_ENV=${TRUST_IO_XIOS}/arch/arch-${TRUST_MAIN_HPCC}.env 
    8  
    97TRUST_COMPILE_FORTRAN='ifort' 
    10  
    118TRUST_COMPILE_MPI='bullxmpi/' 
    129TRUST_COMPILE_NETCDF='netcdf-[0-9]' 
     
    1411TRUST_IO_CDO='cdo' 
    1512 
    16 [ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC='4' 
    17  
    18 TRUST_JOB_SCRIPT=${TRUST_MAIN_DIR}/batch/${TRUST_MAIN_HPCC}.sh 
    19 TRUST_JOB_SUBMIT="ccc_msub ${TRUST_JOB_SCRIPT} | grep -oe '\<[0-9]*\>'" 
    20  
    21 TRUST_JOB_STATE="ccc_mpp   | grep \${TRUST_JOB_ID}" 
     13TRUST_JOB_SUBMIT="ccc_msub \${TRUST_JOB_SCRIPT} | grep -oe '\<[0-9]*\>'" 
     14TRUST_JOB_STATE="ccc_mpp  | grep \${TRUST_JOB_ID}" 
    2215TRUST_JOB_INFO="ccc_macct        \${TRUST_JOB_ID}" 
    2316TRUST_JOB_KILL="ccc_mdel         \${TRUST_JOB_ID}" 
    24  
    25 [ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT='10800' 
    2617 
    2718TRUST_JOB_TIME=" 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/arch_template.cfg

    • Property mime-type set to text/x-shellscript
    r8818 r8826  
    11## (Super)Computer configuration template 
    2 ##--------------------------------------------------- 
     2##-------------------------------------------------------------------------------- 
    33 
    4 ## Copy to root, rename it and then fill in according to your (super)computer environment 
    5 ## Rules for completion: undefined variables (=) are mandatory & void variables (='') are optional 
    6 ## Look into other configuration file for examples 
     4## Copy/Rename it and fill in according to your environment. 
     5 
     6##  Rules for completion: 
     7##o Undefined variables (XXX=  ) are mandatory 
     8##o Empty     variables (XXX='') are optional, default value  
     9 
     10## Look into other configuration file for examples. 
     11 
     12##  Most of the settings can be changed "on-the-fly" from the console to avoid 
     13##+ the creation of several configuration files. 
     14##+ See `./trusting.sh -h` 
     15 
     16##-------------------------------------------------------------------------------- 
    717 
    818 
     
    1020##--------------------------------------------------- 
    1121# (Super)Computer environment (${TRUST_IO_XIOS} is already defined in the user configuration file) 
    12 TRUST_JOB_ENV=${TRUST_IO_XIOS}/arch/arch-${TRUST_MAIN_HPCC} 
     22TRUST_JOB_ENV='' 
     23${TRUST_IO_XIOS}/arch/arch-${TRUST_MAIN_HPCC} 
    1324## If `module` is available, ${TRUST_JOB_ENV}.env will be sourced 
    1425## If not (scheduled jobs), it will be ${TRUST_JOB_ENV}.path or finally ${TRUST_JOB_ENV} 
     
    1728='cdo diffn' 
    1829 
    19 [ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC=     ## Number of compiling processes 
    20 [ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT=     ## Timeout for computation (s) 
     30TRUST_COMPILE_NPROC=     ## Number of compiling processes 
     31TRUST_JOB_TIMEOUT=     ## Timeout for computation (s) 
    2132 
    2233 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/martin.cfg

    • Property mime-type set to text/x-shellscript
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/romr005.cfg

    • Property mime-type set to text/x-shellscript
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/cfg/user_template.cfg

    • Property mime-type set to text/x-shellscript
    r8818 r8826  
    1919## --------------------- 
    2020 
    21 ## Checkout/Compilation folder ('CONFIG' root directory by default) 
     21## Checkout/Compilation folder ('CONFIG' root parent directory by default) 
    2222TRUST_DIR_WORK='' 
    2323 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env

    r8818 r8826  
    1919fi 
    2020 
    21 ## Forcing archive unset 
    22 #if [[ ! ${TRUST_IO_FORC_TAR} && ${TRUST_IO_FORC_TAR-_} ]]; then 
    23  
    24     ## Forcing directory set 
    25 #    if [ ${TRUST_IO_FORC_PATH} ]; then 
    26  
    27    ## Default forcing archive from trunk 
    28 #  TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.7.tar INPUTS_PISCES_v3.6st.tar' 
    29  
    30 #  [ ${TRUST_CFG_REF} == 'AMM12' ] && TRUST_IO_FORC_TAR='AMM12_v3.7.tar' 
    31  
    32 #  if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
    33  
    34 #      TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.6.tar' 
    35  
    36 #      if   [ ${TRUST_CFG_REF} == 'ORCA1_LIM3_PISCES' ]; then 
    37 #     TRUST_IO_FORC_TAR='INPUTS_ORCA1_LIM3_PISCES_V10.tar' 
    38 #      elif [ ${TRUST_CFG_REF} == 'AMM12'             ]; then 
    39 #     TRUST_IO_FORC_TAR='AMM12_v3.6.tar' 
    40 #      fi 
    41  
    42 #  fi 
    43  
    44 #    fi 
    45  
    46 #fi 
    47  
    4821 
    4922## Source user & (super)computer configurations 
     
    6134[ -z "${TRUST_DIR_WORK}"    ] &&    TRUST_DIR_WORK=${TRUST_MAIN_DIR}/../CONFIG 
    6235[ -z "${TRUST_DIR_SCRATCH}" ] && TRUST_DIR_SCRATCH=${TRUST_MAIN_DIR} 
    63  
    6436export TRUST_DIR_WORK TRUST_DIR_SCRATCH TRUST_DIR_STORE 
    6537 
     
    6941 
    7042export TRUST_SVN_REPO='https://forge.ipsl.jussieu.fr/nemo/svn' 
    71  
    72 export TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO               \ 
    73                        EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \ 
    74                        TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO \ 
    75                        TRUST                                              ' ) 
     43export TRUST_SVN_CO=( 'ARCH           CONFIG          NEMO               
     44                       EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    
     45                       TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO 
     46                       TRUST                                            ' ) 
     47export TRUST_SVN_UP=( 'ARCH           CONFIG          NEMO            
     48                       EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL 
     49                       TOOLS/COMPILE                                 ' ) 
    7650 
    7751export TRUST_SVN_BRANCH 
    78  
    7952export TRUST_SVN_NEMOGCM=${TRUST_DIR_WORK}/${TRUST_SVN_BRANCH}/NEMOGCM 
    8053 
     
    8356##------------------- 
    8457 
    85 ## Ref. cfg. unset or empty (mandatory) 
    86 #if [[ -z "${TRUST_CFG_REF}" ]]; then 
    87  
    88     ## Default cfg from trunk excepting last stable 
    89 #    TRUST_CFG_REF='ORCA2_LIM3_PISCES' 
    90  
    91 #    if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
    92 #  TRUST_CFG_REF='ORCA2_LIM_PISCES' 
    93 #    fi 
    94  
    95 #fi 
    96  
    9758## Forcing archive unset 
    9859if [[ ! ${TRUST_IO_FORC_TAR} && ${TRUST_IO_FORC_TAR-_} ]]; then 
     
    10061    ## Forcing directory set 
    10162    if [ ${TRUST_IO_FORC_PATH} ]; then 
    102  
    10363   ## Default forcing archive from trunk 
    10464   TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.7.tar INPUTS_PISCES_v3.6st.tar' 
    105  
    10665   [ ${TRUST_CFG_REF} == 'AMM12' ] && TRUST_IO_FORC_TAR='AMM12_v3.7.tar' 
    10766 
    10867   if [ ${TRUST_SVN_BRANCH} == 'nemo_v3_6_STABLE' ]; then 
    109  
    11068       TRUST_IO_FORC_TAR='ORCA2_LIM_nemo_v3.6.tar' 
    11169 
     
    12381 
    12482[ -z "${TRUST_CFG_NEW}" ] && TRUST_CFG_NEW=${TRUST_CFG_REF}'_trust' 
    125  
    12683export TRUST_CFG_NEW TRUST_CFG_REF 
    127 export TRUST_IO_FORC_TAR 
    128  
    12984export TRUST_CFG_KEY_ADD TRUST_CFG_KEY_DEL 
    13085 
     
    13388## -------------- 
    13489 
    135 [ -z "${TRUST_IO_XIOS}" ] && get_out X 
    136 export TRUST_IO_XIOS TRUST_IO_FORC_PATH 
     90[ -z "${TRUST_IO_XIOS}" ] && get_out A 
     91export TRUST_IO_XIOS 
     92export TRUST_IO_FORC_PATH TRUST_IO_FORC_TAR 
    13793export TRUST_IO_CDO 
    13894 
     
    14197##---------------------- 
    14298 
     99if [ -z "${TRUST_JOB_ENV}" ]; then 
     100    TRUST_JOB_ENV=${TRUST_IO_XIOS}/arch/arch-${TRUST_MAIN_HPCC}.env 
     101fi 
     102 
    143103export TRUST_JOB_ENV 
    144 export TRUST_COMPILE_FORTRAN TRUST_COMPILE_NPROC 
    145 export TRUST_COMPILE_MPI     TRUST_COMPILE_NETCDF 
    146 export TRUST_JOB_SCRIPT TRUST_JOB_SUBMIT  
    147 export TRUST_JOB_STATE  TRUST_JOB_KILL   TRUST_JOB_TIMEOUT 
    148 export TRUST_JOB_INFO   TRUST_JOB_TIME   TRUST_JOB_RAM_P   TRUST_JOB_RAM_V 
     104 
     105[ -z "${TRUST_COMPILE_NPROC}" ] && TRUST_COMPILE_NPROC='4' 
     106export TRUST_COMPILE_NPROC 
     107 
     108export TRUST_COMPILE_FORTRAN TRUST_COMPILE_MPI TRUST_COMPILE_NETCDF 
     109 
     110if [ -z "${TRUST_JOB_SCRIPT}" ]; then 
     111    TRUST_JOB_SCRIPT=${TRUST_MAIN_DIR}/batch/${TRUST_MAIN_HPCC}.sh || get_out A 
     112fi 
     113 
     114export TRUST_JOB_SCRIPT  
     115 
     116 
     117if [[ -z "${TRUST_JOB_SUBMIT}" || -z "${TRUST_JOB_STATE}" \ 
     118                               || -z "${TRUST_JOB_KILL}"    ]]; then 
     119    get_out A 
     120fi 
     121 
     122export TRUST_JOB_SUBMIT TRUST_JOB_STATE TRUST_JOB_KILL 
     123 
     124[ -z "${TRUST_JOB_TIMEOUT}" ] && TRUST_JOB_TIMEOUT='10800' 
     125export TRUST_JOB_TIMEOUT 
     126 
     127export TRUST_JOB_INFO TRUST_JOB_TIME TRUST_JOB_RAM_P TRUST_JOB_RAM_V 
    149128 
    150129 
     
    160139##       TRUST_TEST_DIR unset 
    161140if [[ ! ${TRUST_TEST_DIR}       && ${TRUST_TEST_DIR-_}       ]]; then 
    162         TRUST_TEST_DIR=${TRUST_DIR_SCRATCH}/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH}/${TRUST_TEST_DATE} 
     141        TRUST_TEST_DIR=${TRUST_DIR_SCRATCH}/${TRUST_CFG_REF}/${TRUST_SVN_BRANCH} 
     142        TRUST_TEST_DIR+=/${TRUST_TEST_DATE} 
    163143    export TRUST_TEST_DIR 
    164144fi 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh

    r8818 r8826  
    33 
    44## Messenger filenames 
     5##-------------------------------------------------------------------------------- 
     6 
    57file_date=mesg_01_date.txt  ; file_rslt=mesg_02_result.txt 
    68file_stat=mesg_03_status.txt; file_nemo=mesg_04_nemo.txt 
     
    1214 
    1315## Functions in order of use 
     16##-------------------------------------------------------------------------------- 
     17 
     18##  
     19##-------------------------------------------------------------------------------- 
     20 
    1421print_step() { 
    1522    local char_nb=$( echo "$1" | wc -c ) 
     
    1825    printf "\nStep.....\n%s\n%s\n" "$1" ${outline// /-} 
    1926} 
     27 
     28 
     29## 
     30##-------------------------------------------------------------------------------- 
    2031 
    2132init_files() { 
     
    3344    echo 'Comments'            > ${file_note} 
    3445 
    35     ## 'Failed' status with 'Unknown error' by default 
     46    ## 'FAILED' status with 'Unknown error' by default 
    3647    echo ${TRUST_FLAG_RESULT} \ 
    3748   >> ${file_rslt} 
     
    4051} 
    4152 
     53 
     54## 
     55##-------------------------------------------------------------------------------- 
     56 
    4257get_date() { 
    4358    ## UTC time zone for timestamping 
     
    4863} 
    4964 
     65 
     66## 
     67##-------------------------------------------------------------------------------- 
     68 
    5069get_nemo_rev() { 
    5170    local dir rev_loc 
     
    5372 
    5473    ## Loop on essential NEMO directories 
    55     for dir in ${TRUST_SVN_CO} ${TRUST_IO_XIOS}; do 
     74    for dir in ${TRUST_SVN_UP} ${TRUST_IO_XIOS}; do 
    5675 
    5776   ## For time being, just get revision from XIOS with no action on directory 
     
    6079       echo 'XIOS '${rev_loc} \ 
    6180      >> model.log 
    62        echo "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\">${rev_loc}</a>" 
     81       echo "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\">${rev_loc}</a>" \ 
    6382      >> ${file_xios} 
    6483       continue 
    6584   fi 
    6685 
    67    echo $dir && ${TRUST_SVN_ACTION} ${TRUST_DIR_NEMOGCM}/$dir 
    68    rev_loc=$( svn info ${TRUST_DIR_NEMOGCM}/$dir  \ 
     86   echo $dir && ${TRUST_SVN_ACTION} ${TRUST_SVN_NEMOGCM}/$dir || get_out C 
     87   rev_loc=$( svn info ${TRUST_SVN_NEMOGCM}/$dir  \ 
    6988              | awk '/Last Changed Rev/ {print $NF}'   ) 
    7089 
     
    7594    echo 'NEMOGCM '$rev \ 
    7695   >> model.log 
    77     echo "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\">$rev</a>" 
     96    echo "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\">$rev</a>" \ 
    7897   >> ${file_nemo} 
    7998} 
     99 
     100## 
     101##-------------------------------------------------------------------------------- 
    80102 
    81103get_soft_rel() { 
     
    115137   >> ${file_ncdf} 
    116138} 
     139 
     140 
     141## 
     142##-------------------------------------------------------------------------------- 
    117143 
    118144get_inputs() { 
     
    156182} 
    157183 
     184 
     185## 
     186##-------------------------------------------------------------------------------- 
     187 
    158188diff_inputs() { 
    159189    local dif file 
     
    192222   >> temp_${file_note} 
    193223} 
     224 
     225 
     226## 
     227##-------------------------------------------------------------------------------- 
    194228 
    195229job_pending() { 
     
    214248    if [ ${time_elapsed} -eq ${TRUST_JOB_TIMEOUT} ]; then 
    215249   eval ${TRUST_JOB_KILL} &> /dev/null 
    216    get_out 6 
    217     fi 
    218  
    219 } 
     250   get_out I 
     251    fi 
     252 
     253} 
     254 
     255 
     256## 
     257##-------------------------------------------------------------------------------- 
    220258 
    221259diff_results() { 
     
    230268    for file in 'ocean.output' *.stat; do 
    231269   ## Stop if no minimal benchmark files (ocean.output, eventual stat files) 
    232    [ ! -e ${TRUST_TEST_BENCHMARK}/$file ] && get_out 7 
     270   [ ! -e ${TRUST_TEST_BENCHMARK}/$file ] && get_out J 
    233271 
    234272   diff -q $file ${TRUST_TEST_BENCHMARK}/$file 
     
    245283   >> temp_${file_note} 
    246284} 
     285 
     286 
     287## 
     288##-------------------------------------------------------------------------------- 
    247289 
    248290diff_restarts() { 
     
    263305             | wc -l | awk '{print $1}'              ) 
    264306 
    265        [ $ndomain -eq 0 ] && get_out X 
    266  
    267307            ##################################################### 
    268308            ## Handle 2 possibilities of 'rebuild_nemo' origin ## 
    269309            ##################################################### 
    270310 
    271        ${TRUST_DIR_NEMOGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo \ 
     311       ${TRUST_SVN_NEMOGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo \ 
    272312      -t ${TRUST_COMPILE_NPROC} $filebase $ndomain       \ 
    273313      > /dev/null 
     
    278318                    > /dev/null 
    279319       else 
    280       get_out X 
     320      get_out K 
    281321       fi 
    282322 
     
    314354} 
    315355 
     356 
     357## 
     358##-------------------------------------------------------------------------------- 
     359 
    316360get_time() { 
    317361    [ -z "${TRUST_JOB_TIME}" ] && return 
     
    323367    echo ${time_cpu} | tee -a ${file_time} 
    324368} 
     369 
     370 
     371## 
     372##-------------------------------------------------------------------------------- 
    325373 
    326374get_memy() { 
     
    334382    echo ${memory_pmax}' / '${memory_vmax} | tee -a ${file_memy} 
    335383} 
     384 
     385 
     386## 
     387##-------------------------------------------------------------------------------- 
    336388 
    337389comments() { 
     
    351403   >> temp_${file_note} ) 
    352404} 
     405 
     406 
     407## 
     408##-------------------------------------------------------------------------------- 
    353409 
    354410log_make() { 
     
    363419} 
    364420 
     421 
     422## 
     423##-------------------------------------------------------------------------------- 
     424 
    365425prod_publish() { 
    366426    local cmd 
     
    373433   if [ -f ${TRUST_TEST_LOG} ]; then cmd='tail -1'; else cmd='cat'; fi 
    374434 
    375    $cmd ${TRUST_TEST_SUMMARY}      \ 
     435   $cmd ${TRUST_TEST_SUMMARY} \ 
    376436       >> ${TRUST_TEST_LOG} 
    377437 
    378438        ## Send mail only when FAILED 
    379    if [[ ! -z "${TRUST_TEST_MAILING}" \ 
     439   if [[ ! -z "${TRUST_TEST_MAILING}"        \ 
    380440         && ${TRUST_FLAG_RESULT} == 'FAILED'   ]]; then 
    381441 
     
    412472} 
    413473 
     474 
     475## 
     476##-------------------------------------------------------------------------------- 
     477 
    414478get_out() { 
    415479    local time_step=0 
     
    427491        ## Error identification 
    428492   case ${TRUST_FLAG_ERROR} in 
     493 
     494       ## Initialisation 
     495       'A') TRUST_FLAG_ERROR='Missing environment variable'      ;; 
     496       'B') TRUST_FLAG_ERROR='Unable to create testing directory';; 
     497       'C') TRUST_FLAG_ERROR='SVN issue on local working copy'   ;; 
     498 
    429499            ## Compilation 
    430        '1') TRUST_FLAG_ERROR='XIOS compilation failed' ;; 
    431        '2') TRUST_FLAG_ERROR='NEMO compilation failed' ;; 
     500       'D') TRUST_FLAG_ERROR='XIOS compilation failed'           ;; 
     501       'E') TRUST_FLAG_ERROR='NEMO compilation failed'           ;; 
     502 
    432503       ## Submission 
    433        '3') TRUST_FLAG_ERROR='Missing input files'     ;; 
    434        '4') TRUST_FLAG_ERROR='Job submission error'    ;; 
     504       'F') TRUST_FLAG_ERROR='Missing input files'               ;; 
     505       'G') TRUST_FLAG_ERROR='Job submission error'              ;; 
     506 
    435507       ## Computing 
    436        '5') TRUST_FLAG_ERROR='Crashed at time step'    ;; 
    437        '6') TRUST_FLAG_ERROR='Exceeded time limit'     ;; 
     508       'H') TRUST_FLAG_ERROR='Crashed at time step'              ;; 
     509       'I') TRUST_FLAG_ERROR='Exceeded time limit'               ;; 
     510 
    438511       ## Results 
    439        '7') TRUST_FLAG_ERROR='Missing previous outputs';; 
    440        '8') TRUST_FLAG_ERROR='New outputs differ'      ;; 
     512       'J') TRUST_FLAG_ERROR='Missing previous outputs'          ;; 
     513       'K') TRUST_FLAG_ERROR='Restart rebuild error'             ;; 
     514       'L') TRUST_FLAG_ERROR='New outputs differ'                ;; 
     515 
    441516       ## Other 
    442        '*') TRUST_FLAG_ERROR='Unknown error'           ;; 
     517       '*') TRUST_FLAG_ERROR='Unknown error'                     ;; 
     518 
    443519   esac 
    444520 
     
    448524 
    449525    ## Eventual comments from ocean.output 
    450     if [ "${TRUST_FLAG_ERROR}" == 'Crashed at time step' ]; then 
     526    if [ ${TRUST_FLAG_ERROR} == 'Crashed at time step' ]; then 
    451527   comments 'E R R O R' 
    452528   [ -e time.step ] && time_step=$( cat time.step ) 
     
    455531   comments 'W A R N I N G' 
    456532 
    457    if [ "${TRUST_FLAG_ERROR}" == 'Exceeded time limit' ]; then 
     533   if [ ${TRUST_FLAG_ERROR} == 'Exceeded time limit' ]; then 
    458534       TRUST_FLAG_ERROR+=' '$(( ${TRUST_JOB_TIMEOUT}/3600 ))'h' 
    459535   fi 
     
    462538 
    463539    ## Last messenger files 
    464     sed -i "2 s/.*/$TRUST_RESULT/"    ${file_rslt} 
    465     sed -i "2 s/.*/$TRUST_FLAG_ERROR/" ${file_stat} 
     540    sed -i "2 s/.*/$TRUST_FLAG_RESULT=/" ${file_rslt} 
     541    sed -i "2 s/.*/$TRUST_FLAG_ERROR/"   ${file_stat} 
    466542 
    467543    ## Save tested configuration if trusting failed in production mode (-p|--prod) 
     
    469545   echo 'Creating archive '${TRUST_TEST_BACKUP}' under '${TRUST_TEST_BENCHMARK} 
    470546   tar -czf ${TRUST_TEST_BENCHMARK}/${TRUST_TEST_BACKUP}                 * \ 
    471        -C   ${TRUST_DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/MY_SRC . \ 
    472        -C   ${TRUST_DIR_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}          \ 
     547       -C   ${TRUST_SVN_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}/MY_SRC . \ 
     548       -C   ${TRUST_SVN_NEMOGCM}/CONFIG/${TRUST_CFG_NEW}          \ 
    473549            cpp_${TRUST_CFG_NEW}.fcm 
    474550    fi 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/trusting.sh

    r8818 r8826  
    103103print_step 'Timestamped testing directory' 
    104104 
    105 mkdir -p ${TRUST_TEST_DIR} ${TRUST_TEST_BENCHMARK} 
     105mkdir -p ${TRUST_TEST_DIR} ${TRUST_TEST_BENCHMARK} || get_out B 
    106106cd       ${TRUST_TEST_DIR} 
    107107echo     ${TRUST_TEST_DIR} 
     
    123123##-------------------------------------------------------------------------------- 
    124124 
    125 print_step 'Get testing environement' 
     125print_step 'Get testing environment' 
    126126 
    127127get_soft_rel 
     
    141141    ${stdout_redir} /dev/null 
    142142 
    143 [ ! -e lib/libxios.a ] && get_out 1 || echo 'Success' 
     143[ ! -e lib/libxios.a ] && get_out D || echo 'Success' 
    144144 
    145145 
     
    163163    ${stdout_redir} /dev/null 
    164164 
    165 [ ! -e ${TRUST_CFG_NEW}/BLD/bin/nemo.exe ] && get_out 2 || echo 'Success' 
     165[ ! -e ${TRUST_CFG_NEW}/BLD/bin/nemo.exe ] && get_out E || echo 'Success' 
    166166 
    167167 
     
    198198TRUST_JOB_ID=$( eval ${TRUST_JOB_SUBMIT} ) 
    199199 
    200 [ $? -ne 0 ] && get_out 4 || printf "Success (job ID %s)\n" ${TRUST_JOB_ID} 
     200[ $? -ne 0 ] && get_out G || printf "Success (job ID %s)\n" ${TRUST_JOB_ID} 
    201201 
    202202print_step 'Pending job' 
     
    213213 
    214214if [[ ! -e time.step || $( grep 'E R R O R' ocean.output ) ]]; then 
    215     get_out 5 
     215    get_out H 
    216216else 
    217217    echo 'Success' ## Must be reviewed 
     
    238238diff_restarts 
    239239 
    240 [ $TRUST_RESULT == 'FAILED' ] && get_out 8 
     240[ $TRUST_FLAG_RESULT= == 'FAILED' ] && get_out L 
    241241 
    242242 
Note: See TracChangeset for help on using the changeset viewer.