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

Changeset 5629 for branches/2015


Ignore:
Timestamp:
2015-07-23T16:47:33+02:00 (9 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Adjustements for running under CURIE cron

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

Legend:

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

    r5472 r5629  
    22 
    33 
    4 # Time-stamp 
     4## Time-stamp 
    55date_test=$( date ) 
    66export DATESTR=$( date -ud "${date_test}" +%Y%m%d%Z%H%M ) 
    77 
    8 # Sourcing user configuration 
    9 #-------------------------------------- 
     8## Sourcing user configuration 
     9##-------------------------------------- 
    1010. ${NEMO_TRUS}/config/${CFG_USER}.cfg 
    1111export NEMO_HOME NEMO_BRAN 
     
    1515export EMAIL 
    1616 
    17 # Only interest for essential NEMO directories 
     17## Only interest for essential NEMO directories 
    1818NEMO_ARCH=${NEMO_HOME}/ARCH              ; NEMO_CONF=${NEMO_HOME}/CONFIG       ; NEMO_ENGI=${NEMO_HOME}/NEMO 
    1919NEMO_EIOI=${NEMO_HOME}/EXTERNAL/IOIPSL   ; NEMO_EFCM=${NEMO_HOME}/EXTERNAL/fcm 
     
    2323export NEMO_TRBD NEMO_TCMP 
    2424 
    25 # Sourcing super-computer configuration 
    26 #-------------------------------------- 
     25## Sourcing super-computer configuration 
     26##-------------------------------------- 
    2727. ${NEMO_TRUS}/config/${CFG_ARCH}.cfg 
    2828export CDO      COMPILER MPI      NETCDF 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh

    r5627 r5629  
    22 
    33 
    4 # Set defaults 
    5 #--------------------------------------------------- 
     4## Set defaults 
     5##--------------------------------------------------- 
    66NEMO_TRUS=$( pwd $( dirname $0 ) ) 
    77DEBUG=0; PUBLISH=0 
    8 ST='FAILED' # 'FAILED' by default 
     8ST='FAILED' ## 'FAILED' by default 
    99 
    10 # Get options for replacing some initials settings 
    11 #--------------------------------------------------- 
     10## Get options for replacing some initials settings 
     11##--------------------------------------------------- 
    1212while [ $# -ne 0 ]; do 
    1313    case $1 in 
     
    2222done 
    2323 
    24 # Initialization (super-computer & user environment) 
    25 #--------------------------------------------------- 
     24## Initialization (super-computer & user environment) 
     25##--------------------------------------------------- 
    2626if [[ ! -z "${CFG_ARCH}" && ! -z "${CFG_USER}" ]]; then 
    2727 
     
    4040. ./trusting_func.sh 
    4141 
    42 #  
    43 #--------------------------------------------------- 
     42##  
     43##--------------------------------------------------- 
    4444mkdir -p ${TEST_DIR} ${REFE_DIR} 
    4545echo ${TEST_DIR} && cd ${TEST_DIR} 
     
    4747printf "Date\n${date_str}\n" > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt 
    4848 
    49 # SVN action on XIOS & NEMO essentials directories 
    50 #--------------------------------------------------- 
     49## SVN action on XIOS & NEMO essentials directories 
     50##--------------------------------------------------- 
    5151print_step 'SVN actions on NEMO directories' 
    5252get_nemo_rev 
    5353 
    54 # Check softwares versions (source arch environment) 
    55 #--------------------------------------------------- 
     54## Check softwares versions (source arch environment) 
     55##--------------------------------------------------- 
    5656print_step 'Get softwares release' 
    5757[ -e ${ARCH_ENV} ] && . ${ARCH_ENV} > /dev/null 
     
    5959cat model.log 
    6060 
    61 # XIOS compiling 
    62 #--------------------------------------------------- 
     61## XIOS compiling 
     62##--------------------------------------------------- 
    6363print_step 'Compiling XIOS' 
    6464cd ${DIR_XIOS} 
     
    6767[ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out 1 
    6868 
    69 # NEMO config compiled from scratch 
    70 #--------------------------------------------------- 
     69## NEMO config compiled from scratch 
     70##--------------------------------------------------- 
    7171print_step "Compiling ${REFE_CONF} configuration" 
    7272cd ${NEMO_CONF} 
     
    7575[ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out 2 
    7676 
    77 # Get namelists, xml & forcing files for running 
    78 #--------------------------------------------------- 
     77## Get namelists, xml & forcing files for running 
     78##--------------------------------------------------- 
    7979print_step "Preparing job by copying ${REFE_CONF} input files" 
    8080cd ${TEST_DIR} 
     
    8484[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz 
    8585 
    86 # Check input files in all cases 
    87 #--------------------------------------------------- 
     86## Check input files in all cases 
     87##--------------------------------------------------- 
    8888print_step 'Difference with standard input files list' 
    8989diff_inputs 
    9090 
    91 # Job submission & computing 
    92 #--------------------------------------------------- 
     91## Job submission & computing 
     92##--------------------------------------------------- 
    9393print_step 'Submitting job' 
    9494JOB_ID=$( eval ${JOB_SUBM} ) 
     
    9898print_step 'Job finished' 
    9999 
    100 # Job state 
    101 #--------------------------------------------------- 
     100## Job state 
     101##--------------------------------------------------- 
    102102print_step 'Test job state' 
    103103if   [[ ! -e time.step || $( grep -q 'E R R O R' ocean.output ) ]]; then 
     
    105105    get_out 5 
    106106else 
    107     # Get time computation 
    108     #--------------------------------------------------- 
     107    ## Get time computation 
     108    ##--------------------------------------------------- 
    109109    print_step 'Get real CPU time' 
    110110    get_cpu_time 
    111111fi 
    112112 
    113 ST='OK' # 'OK' by default 
     113ST='OK' ## 'OK' by default 
    114114 
    115 # Inspect output text files 
    116 #--------------------------------------------------- 
     115## Inspect output text files 
     116##--------------------------------------------------- 
    117117print_step 'Test ASCII output files diff' 
    118118diff_results 
    119119[ "$ST" == 'FAILED' ] && get_out 8 
    120120 
    121 # Inspect output NetCDF files 
    122 #--------------------------------------------------- 
     121## Inspect output NetCDF files 
     122##--------------------------------------------------- 
    123123print_step 'Test last restart NetCDF files diff' 
    124124diff_restart 
    125125[ "$ST" == 'FAILED' ] && get_out 10 
    126126 
    127 # Get comments (ocean.output & diff model.log) 
    128 #--------------------------------------------------- 
     127## Get comments (ocean.output & diff model.log) 
     128##--------------------------------------------------- 
    129129comments 'W A R N I N G' 
    130130 
    131 # End 
    132 #--------------------------------------------------- 
     131## End 
     132##--------------------------------------------------- 
    133133get_out 'Code is reliable' 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh

    r5627 r5629  
    6161 
    6262       if [ -e ${REFE_DIR}/$file.nc ]; then 
    63        # UNIX `cmp` not suitable (filename & timestamp in .nc file) 
     63       ## UNIX `cmp` not suitable (filename & timestamp in .nc file) 
    6464      nc_diff=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null \ 
    6565                 | awk '/records/ {print $1}'                           ) 
     
    100100 
    101101get_soft_rel() { 
    102     for rel in $CDO $COMPILER $MPI $NETCDF; do 
    103                                      arch_rel=$( echo $LOADEDMODULES | sed  "s#.*$rel/\([^:]*\).*#\1#" ) 
    104    [ -z "${arch_rel}"  ]     && arch_rel=$( echo $PATH          | sed  "s#.*$rel/\([^/]*\).*#\1#" ) 
    105    [ "$rel" == "$COMPILER" ] && arch_rel=$( $rel --version      | grep -m1 -o ' [0-9.]* '         ) 
    106    echo $rel ${arch_rel} >> model.log 
     102    for soft in $CDO $COMPILER $MPI $NETCDF; do 
     103                                     soft_rel=$( echo $LOADEDMODULES | grep -o "$soft[^:]*"  ) 
     104   [ -z "${soft_rel}"  ]     && soft_rel=$( echo $PATH          | grep -o "$soft/[^/]*" ) 
     105   ## Not working inside CURIE cron (no modules command && cdo embedded in netcdf-*) 
     106   #[ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version      | grep -m1 -o ' [0-9.]* '         ) 
     107   [[ "$soft" == "$CDO"    && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf-utils[^/]*" ) 
     108   [[ "$soft" == "$NETCDF" && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf[^/]*"  | sort | head -1 ) 
     109   echo $soft ${soft_rel} >> model.log 
    107110    done 
    108111 
     
    115118    svn_opt='status' 
    116119 
    117     # If -v|--version option has been set, modify svn command 
     120    ## If -v|--version option has been set, modify svn command 
    118121    if   [ $( echo ${NEMO_VERS} | grep  "HEAD\|up\|update"                     ) ]; then 
    119122   svn_cmd='svn update -r HEAD' 
     
    132135          ${DIR_XIOS}                             ; do 
    133136 
    134    # For time being, just get revision number from XIOS 
     137   ## For time being, just get revision number from XIOS 
    135138   if [ "$dir" == "${DIR_XIOS}" ]; then 
    136139       rev_loc=$( svn info $dir | awk '(NR == 9) {print $NF}' ) 
     
    166169  $cmd trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt >> ${REFE_DIR}/trusting_${CFG_USER}_${CFG_ARCH}.txt 
    167170 
    168   # Send mail only when FAILED 
     171  ## Send mail only when FAILED 
    169172  if [[ ! -z $EMAIL && "$ST" == 'FAILED' ]]; then 
    170173      cat << END_MAIL > trusting.mail 
     
    206209   [ ! -e $file ] && printf "Comments\n\n"      > $file 
    207210 
    208         # Error identification 
     211        ## Error identification 
    209212   case $ERR in 
    210        # Compilation 
     213       ## Compilation 
    211214       1) ERR='XIOS compilation failed'             ;;  2) ERR='NEMO compilation failed'            ;; 
    212        # Submission 
     215       ## Submission 
    213216       3) ERR='Missing input files'                  ;;  4) ERR='Job submission error'               ;; 
    214        # Running 
     217       ## Running 
    215218       5) ERR='nemo.exe crashed at '${LAST_TIME_STEP};;  6) ERR='Exceeded time limit '${TIME_LIMI}'h';; 
    216        # Results 
     219       ## Results 
    217220       7) ERR='Missing previous outputs '            ;;  8) ERR='New outputs  differ/missing'        ;; 
    218221       9) ERR='Missing previous restarts'            ;; 10) ERR='New restarts differ/missing'        ;; 
    219        # Undefined 
     222       ## Undefined 
    220223       *) ERR='Unknown error'                        ;; 
    221224   esac 
     
    226229    printf "Result\n$ERR\n" > mesg_03_result_${CFG_USER}_${CFG_ARCH}.txt 
    227230 
    228     # Save tested configuration if trusting failed 
     231    ## Save tested configuration if trusting failed 
    229232    [[ "$ST" == 'FAILED' && $DEBUG -eq 0 ]] && tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz * 
    230233 
Note: See TracChangeset for help on using the changeset viewer.