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 5929 for branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc – NEMO

Ignore:
Timestamp:
2015-11-26T16:55:09+01:00 (8 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS18_TRUST Last commits before merging to trunk

Location:
branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc
Files:
4 added
3 moved

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting.env

    r5923 r5929  
    22 
    33 
    4 ## Patterns (UTC time-stamp & messengers filename) 
     4## Global environment variables 
    55##-------------------------------------- 
    66dat=$( date ) 
     
    1212## Source user configuration 
    1313##--------------------------------------------------- 
    14 . ${TRUS_DIRE}/config/${TRUS_USER}.cfg 
    15 export TRUS_SCRA TRUS_STOR TRUS_XIOS TRUS_FORC 
    16 export TRUS_WORK TRUS_BRAN TRUS_BHMK TRUS_TEST 
    17 export TRUS_REFE TRUS_CONF TRUS_TARF TRUS_KEYA TRUS_KEYD 
     14. ./config/${TRUS_USER}.cfg 
     15export TRUS_WORK TRUS_SCRA TRUS_STOR TRUS_XIOS TRUS_FORC 
     16export TRUS_BRAN TRUS_REFE 
     17export TRUS_CONF TRUS_TARF TRUS_KEYA TRUS_KEYD 
    1818export TRUS_MAIL 
    19  
    20 export TRUS_NGCM=${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 
    2119 
    2220 
    2321## Source (super)computer configuration 
    2422##--------------------------------------------------- 
    25 . ${TRUS_DIRE}/config/${TRUS_HPCC}.cfg 
    26 export TRUS_ENVI 
    27 export TRUS_CDOD 
    28 export TRUS_JSUB TRUS_JSTA TRUS_JKIL TRUS_JPME TRUS_JTIM TRUS_JVME TRUS_JINF 
    29 export TRUS_CMPF TRUS_CDOR TRUS_MPIR TRUS_CDFR 
    30 export TRUS_NPRO TRUS_TOUT 
     23. ./config/${TRUS_HPCC}.cfg 
     24export TRUS_ENVI TRUS_CDOD TRUS_NPRO TRUS_TOUT 
     25export TRUS_JSPT TRUS_JSUB TRUS_JSTA TRUS_JKIL 
     26export TRUS_JPME TRUS_JTIM TRUS_JVME TRUS_JINF 
     27export TRUS_CMPV TRUS_CDOR TRUS_MPIR TRUS_CDFR 
    3128 
     29 
     30export TRUS_NGCM=${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM 
  • branches/2015/dev_r5092_CNRS18_TRUST/NEMOGCM/TRUST/inc/trusting_func.sh

    r5923 r5929  
    9090    [ $TRUS_HPCC == 'X64_ADA' ] && WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS} 
    9191 
    92     for str in ${TRUS_CMPF} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do 
     92    for str in ${TRUS_CMPV} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do 
    9393   [ -z "$str" ] && continue 
    9494   soft_rel='' 
     
    9898 
    9999   ## option --version would work for main compilers (gfortran, intel, pgfortran, ...) 
    100    [ $str == ${TRUS_CMPF} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' ) 
     100   [ $str == ${TRUS_CMPV} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' ) 
    101101 
    102102   ## Cleaning characters string to display proper soft name 
     
    116116 
    117117get_inputs() { 
    118     # List archive content & extract it by default 
    119     local cmd_iol="tar -tvf ${TRUS_FORC}/${TRUS_TARF}" cmd_iof="tar -vxf ${TRUS_FORC}/${TRUS_TARF}" 
    120  
    121     ## List & copy files in case of personal inputs 
    122     if [ -z "${TRUS_TARF}" ]; then 
    123      cmd_iol="ls ${TRUS_FORC}/*"                ; cmd_iof="\cp ${TRUS_FORC}/* ." 
    124     fi 
    125  
    126     ${cmd_iol} > inputs_list.txt 
    127     ${cmd_iof} > /dev/null 
     118    ## Extract archive or copy files in case of personal inputs 
     119    [ -z "${TRUS_TARF}" ] && get_io="cp ${TRUS_FORC}/* ." || get_io="tar -vxf ${TRUS_FORC}/${TRUS_TARF}" 
     120 
     121    ${get_io} > /dev/null 
     122    [ $? -ne 0 ] && get_out 3 || echo 'Success' 
     123    [ $( find -name '*.gz' -print -quit ) ] && gunzip *.gz 
     124 
     125    ls -lh > inputs_list.txt 
    128126} 
    129127 
     
    137135 
    138136   ## Continue even if input file is not in here (see after) 
    139    if [ -e ${TRUS_BHMK}/$file ]; then dif=$( diff -q $file ${TRUS_BHMK}/$file ); else dif=0; fi 
     137   if [ -e ${TRUS_STOR}/$file ]; then dif=$( diff -q $file ${TRUS_STOR}/$file ); else dif=0; fi 
    140138 
    141139   ## Pass over useless file omission in benckmark directory 
     
    180178    for file in 'ocean.output' *.stat; do 
    181179   ## Stop if no benchmark files (ocean.output, eventual stat files) 
    182    [ ! -e ${TRUS_BHMK}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; } 
    183  
    184    diff -q $file ${TRUS_BHMK}/$file 
     180   [ ! -e ${TRUS_STOR}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; } 
     181 
     182   diff -q $file ${TRUS_STOR}/$file 
    185183 
    186184   ## Continue even if it differs 
     
    200198 
    201199    ## Stop if no benchmark files (ie time.step) 
    202     [ ! -e ${TRUS_BHMK}/time.step ] && { TRUS_RSLT='FAILED'; get_out 7; } 
    203     time_step=$( cat ${TRUS_BHMK}/time.step | tr -d [:space:] ) 
     200    [ ! -e ${TRUS_STOR}/time.step ] && { TRUS_RSLT='FAILED'; get_out 7; } 
     201    time_step=$( cat ${TRUS_STOR}/time.step | tr -d [:space:] ) 
    204202 
    205203    ## Find all restart files to rebuild 
     
    222220          ${TRUS_NGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo -t ${TRUS_NPRO} $file ${nb_dom} \ 
    223221         > /dev/null 
    224           [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc \ 
    225                         > /dev/null 
    226222      elif [ ${nb_dom} -eq 0 ]; then 
    227223          TRUS_RSLT='FAILED' && get_out 8 
     
    232228 
    233229                    ## Stop if no benchmark files (restart file) 
    234           if [ -e ${TRUS_BHMK}/$file.nc ]; then 
     230          if [ -e ${TRUS_STOR}/$file.nc ]; then 
    235231 
    236232                   ## UNIX `cmp` not suitable (timestamp in .nc file) 
    237          dif=$( $TRUS_CDOD $file.nc ${TRUS_BHMK}/$file.nc 2> /dev/null          \ 
     233         dif=$( $TRUS_CDOD $file.nc ${TRUS_STOR}/$file.nc 2> /dev/null          \ 
    238234                | awk '/records/ {print $0}' | sed '2 s/^/,/' | tr -d '\n' ) 
    239235 
     
    325321 
    326322   ## Create or append trusting logfile 
    327    if [ -f ${TRUS_BHMK}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi 
    328  
    329    $cmd ${TRUS_FILE}                           \ 
    330        >> ${TRUS_BHMK}/trusting_$PATTERNAME.txt 
     323   if [ -f ${TRUS_STOR}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi 
     324 
     325   $cmd ${TRUS_FILE}                            \ 
     326       >> ${TRUS_STOR}/trusting_$PATTERNAME.txt 
    331327 
    332328        ## Send mail only when FAILED 
     
    347343${TRUS_USER}.cfg & ${TRUS_HPCC}.cfg 
    348344 
    349 For more details, look into the testing directory at: 
    350 ${TRUS_TEST} 
     345For more details, look into the testing folder at: 
     346${TRUS_SCRA} 
    351347 
    352348An archive has been created to share the questionable configuration for further studies: 
    353 ${TRUS_BHMK}/${TRUS_ARCH} 
     349${TRUS_STOR}/${TRUS_ARCH} 
    354350 
    355351END_MAIL 
     
    371367 
    372368    ## In case of compilation error 
    373     cd ${TRUS_TEST} 
     369    cd ${TRUS_SCRA} 
    374370 
    375371    if [ ${TRUS_RSLT} == 'FAILED' ]; then 
     
    410406    ## Save tested configuration if trusting failed in production mode (-p|--prod) 
    411407    if [[ ${TRUS_RSLT} == 'FAILED' && ${TRUS_PROD} -eq 1 ]]; then 
    412    echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_BHMK} 
    413    tar -czf ${TRUS_BHMK}/${TRUS_ARCH}               *                    \ 
     408   echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_STOR} 
     409   tar -czf ${TRUS_STOR}/${TRUS_ARCH}               *                    \ 
    414410       -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/MY_SRC .                    \ 
    415411       -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}        cpp_${TRUS_CONF}.fcm 
Note: See TracChangeset for help on using the changeset viewer.