Changeset 11161


Ignore:
Timestamp:
2019-06-20T18:55:23+02:00 (15 months ago)
Author:
mathiot
Message:

merge fix_sette_ticket2239 : major simplification/improvement of SETTE (see README.rst for all the details), tested with the latest version of the trunk (r11160) (ticket #2239)

Location:
utils/CI/sette
Files:
5 deleted
7 edited
5 copied

Legend:

Unmodified
Added
Removed
  • utils/CI/sette/all_functions.sh

    r10632 r11161  
    9090usage=" Usage : set_namelist input_namelist variable_name value" 
    9191usage=" if value is a string ths is neede syntax : ./set_namelist namelist_name var_name \"new_value\" " 
     92 
     93# define validation dir 
     94set_valid_dir () { 
     95    LANG=en_US 
     96    REVISION_NB=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${SETTE_DIR}/.. | grep "Last Changed Rev" | awk '{print $NF}'` 
     97    if [ ${#REVISION_NB} -eq 0 ] 
     98    then 
     99        echo "some problems with ${SVN_CMD} info command" 
     100        echo "some problems with ${SVN_CMD} info command" >> ${SETTE_DIR}/output.sette 
     101        REVISION_NB=`date +%Y%m%d` 
     102        echo "put in ${REVISION_NB} date" 
     103        echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette 
     104    else 
     105    echo "value of revision number of NEMOGCM: ${REVISION_NB}" 
     106    fi 
     107    [ `${SVN_CMD} status -q ${SETTE_DIR}/../{cfg,tests,src} | wc -l` -ge 1 ] && REVISION_NB=${REVISION_NB}+ 
     108    NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME} 
     109} 
     110 
     111# clean valid dir (move old ocean_output/run.stat and tracer to avoid checking them in case something wrong happen. 
     112clean_valid_dir () { 
     113#   set_valid_dir # already done in sette_ref/sette_test 
     114   echo "validation directory is : $NEMO_VALID" 
     115   if [ -d $NEMO_VALID ] ; then 
     116      [ -f ${NEMO_VALID}/ocean.output ] && mv ${NEMO_VALID}/ocean.output ${NEMO_VALID}/ocean.output_old 
     117      [ -f ${NEMO_VALID}/run.stat ]     && mv ${NEMO_VALID}/run.stat     ${NEMO_VALID}/run.stat_old 
     118      [ -f ${NEMO_VALID}/tracer.stat ]  && mv ${NEMO_VALID}/tracer.stat  ${NEMO_VALID}/tracer.stat_old 
     119   fi 
     120} 
    92121 
    93122# function to set namelists parameters 
     
    141170   fi 
    142171 
    143         sed -e "s:${VAR_NAME}.*:${VAR_NAME}:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     172        ARGS_LST="${@:3}" 
     173        sed -e "s;${VAR_NAME}.*;${VAR_NAME};" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
    144174        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
    145         sed -e "s:${VAR_NAME}:$2=$3:"  ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     175        sed -e "s;${VAR_NAME};$2=${ARGS_LST};"  ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
    146176        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
    147177 
     
    154184# function to tidy up after each test and populate the NEMO_VALIDATION store 
    155185post_test_tidyup () { 
     186# Save current exit status of caller script  
     187    RUN_STATUS=$?  
     188    echo "Exit status: ${RUN_STATUS}"  
    156189# 
    157190# requires the following variables defined and exported from the calling script: 
     
    168201echo "EXECUTION directory is : ${EXE_DIR}" 
    169202echo "CONFIG directory is : ${CONFIG_DIR}" 
    170 echo "VALIDATION directory is : ${NEMO_VALIDATION_DIR}" 
     203echo "VALIDATION directory is : ${NEMO_VALID}" 
    171204echo "NEW CONFIGURATION is : ${NEW_CONF}" 
    172205echo "COMPILER is : ${CMP_NAM}" 
     
    175208################################################################ 
    176209# SMALL DEBUG 
     210    EXIT_STATUS=${RUN_STATUS} 
    177211    if [ ! -r ${EXE_DIR}/ocean.output ] 
    178212        then 
    179213        grep "E R R O R" ${EXE_DIR}/ocean.output && echo "Some ERRORS at execution time, see ${EXE_DIR}/ocean.output" 
    180         exit 2 
     214        EXIT_STATUS=2 
     215        # exit 2 Error now catch in the report  
    181216    fi 
    182217 
     
    185220        echo "file time.step does not exist"   >> ${SETTE_DIR}/output.sette 
    186221        echo "some problems during execution of model"  >> ${SETTE_DIR}/output.sette  
    187         exit 1 
     222        EXIT_STATUS=1 
     223        # exit 1 Error now catch in the report 
    188224    else 
    189225        echo "file time.step exists"  >> ${SETTE_DIR}/output.sette 
     
    194230 
    195231################################################################ 
     232# 
    196233# Creation of NEMO_VALIDATION tree 
    197     export LANG=en_US  
    198     REVISION_NB=`svn info ${SETTE_DIR}/../.. | grep -i "Last Changed Rev:" | sed -e "s/ //g" | cut -d ":" -f 2` 
    199     if [ ${#REVISION_NB} -eq 0 ] 
    200     then 
    201       echo "some problems with svn info command" 
    202       echo "some problems with svn info command" >> ${SETTE_DIR}/output.sette 
    203       REVISION_NB=`date +%Y%m%d` 
    204       echo "put in ${REVISION_NB} date" 
    205       echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette 
    206     else 
    207     echo "value of revision number of NEMOGCM: ${REVISION_NB}" 
    208     fi 
    209     cd ${NEMO_VALIDATION_DIR} 
    210     `mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}` 
    211     NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME} 
    212     if [ -d ${NEMO_VALID} ] ; then 
    213    echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
     234#    set_valid_dir already done in sette_reference_config 
     235    mkdir -p ${NEMO_VALIDATION_DIR} 
     236    if [ -d ${NEMO_VALIDATION_DIR} ] ; then 
     237   echo "created ${NEMO_VALIDATION_DIR} directory"   >> ${SETTE_DIR}/output.sette 
    214238    else  
    215    echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
     239   echo "problems in creating ${NEMO_VALIDATION_DIR} directory"   >> ${SETTE_DIR}/output.sette 
    216240   echo "EXIT," 
    217241   exit 1 
    218242    fi 
    219     # Save output & debug files in NEMO_VALIDATION tree 
     243#  
     244# Exit before populating validation directory if the model run has  
     245# returned a non-zero exit status  
     246# On CRAY NEMO exit is not the expected 999 or 123456 (let this bloc in case useful later on). 
     247#    case ${EXIT_STATUS} in 
     248#        0|123456|999) echo " NEMO finished with exit code $EXIT_STATUS " ; post_test_tidyup ;; 
     249#        *) echo " NEMO abort on an unexpected error (segmentation fault or whatever) $EXIT_STATUS " 
     250#    esac 
     251 
     252    [ ${EXIT_STATUS} -ne 0 ] && exit ${EXIT_STATUS}   
     253# 
     254# Save output & debug files in NEMO_VALIDATION tree 
    220255    echo "saving ocean & ice output, run.stat, tracer.stat files ...." >> ${SETTE_DIR}/output.sette 
    221256    echo "            " >> ${SETTE_DIR}/output.sette 
    222     [ -f ${EXE_DIR}/ocean.output ] && cp ${EXE_DIR}/*ocean.output ${NEMO_VALID}/. 
    223     [ -f ${EXE_DIR}/run.stat ] && cp ${EXE_DIR}/*run.stat ${NEMO_VALID}/. 
    224     [ -f ${EXE_DIR}/output.namelist.dyn ] && cp ${EXE_DIR}/*output.nam* ${NEMO_VALID}/. 
    225     [ -f ${EXE_DIR}/tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALID}/. 
    226  
    227     if [ -n "$(ls ${NEMO_VALID}/*run*)" ] ; then 
    228    echo "moved run.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    229    echo "moved run.stat in ${NEMO_VALID} directory"   
     257    [ -f ${EXE_DIR}/ocean.output ] && cp ${EXE_DIR}/*ocean.output ${NEMO_VALIDATION_DIR}/. 
     258    [ -f ${EXE_DIR}/run.stat ] && cp ${EXE_DIR}/*run.stat ${NEMO_VALIDATION_DIR}/. 
     259    [ -f ${EXE_DIR}/output.namelist.dyn ] && cp ${EXE_DIR}/*output.nam* ${NEMO_VALIDATION_DIR}/. 
     260    [ -f ${EXE_DIR}/tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALIDATION_DIR}/. 
     261 
     262    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*run*)" ] ; then 
     263   echo "moved run.stat in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     264   echo "moved run.stat in ${NEMO_VALIDATION_DIR} directory"   
    230265    else 
    231    echo "problem in looking for run.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    232    echo "run.stat IS NOT in ${NEMO_VALID} directory"  
    233     fi 
    234     if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then 
    235    echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    236    echo "moved ocean.output in ${NEMO_VALID} directory"  
     266   echo "problem in looking for run.stat file in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     267   echo "run.stat IS NOT in ${NEMO_VALIDATION_DIR} directory"  
     268    fi 
     269    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*ocean.output*)" ] ; then 
     270   echo "moved ocean.output in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     271   echo "moved ocean.output in ${NEMO_VALIDATION_DIR} directory"  
    237272    else 
    238    echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    239    echo "ocean.output IS NOT in ${NEMO_VALID} directory"  
    240     fi 
    241     if [ -n "$(ls ${NEMO_VALID}/*tracer.stat*)" ] ; then 
    242         echo "moved tracer.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    243         echo "moved tracer.stat in ${NEMO_VALID} directory" 
     273   echo "problem in looking for ocean.output file in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     274   echo "ocean.output IS NOT in ${NEMO_VALIDATION_DIR} directory"  
     275    fi 
     276    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*tracer.stat*)" ] ; then 
     277        echo "moved tracer.stat in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     278        echo "moved tracer.stat in ${NEMO_VALIDATION_DIR} directory" 
    244279    else 
    245         echo "problem in looking for tracer.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    246         echo "tracer.stat IS NOT in ${NEMO_VALID} directory" 
     280        echo "problem in looking for tracer.stat file in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     281        echo "tracer.stat IS NOT in ${NEMO_VALIDATION_DIR} directory" 
    247282    fi 
    248283} 
  • utils/CI/sette/param.cfg

    r10632 r11161  
    1 #- forcing files storing 
    2 FORCING_DIR=$WORKDIR/FORCING 
    3 #- input files storing 
     1# Computer/user dependant variable needed to run sette 
     2# 
     3# REFERENCE run.stat tracer.stat you want to compare with 
     4# (if no change to the default, no check on result change will be done) 
     5NEMO_VALIDATION_REF=/path/to/reference/sette/results 
     6NEMO_REV_REF=0000 
     7# 
     8# ------------------------------------------------------------------------------------------ 
     9# IMPORTANT: 
     10# variables (COMPILER, USING_XIOS, USING_MPMD, BATCH_CMD, BATCH_STAT, BATCH_NAME, FORCING_DIR, SVN_CMD, ADD_NOSIGNEDZERO) 
     11# can be exported from your shell startup files.  
     12# If it is the case, nothing to do 
     13# otherwise, you need to update the default initialisation 
     14# 
     15# ADVISE: setup the default value in your startup file if it doesn't fit your need for at least 
     16# SETTE_COMPILER, SETTE_BATCH_CMD, SETTE_BATCH_STAT, SETTE_BATCH_NAME, SETTE_FORCING_DIR,  
     17# 
     18# ------------------------------------------------------------------------------------------ 
     19# COMPILER setting 
     20# Compiler among those in NEMOGCM/ARCH 
     21COMPILER=${SETTE_COMPILER:-XXXXXXXX} 
     22# ------------------------------------------------------------------------------------------ 
     23# 
     24# BATCH command 
     25# command to submit a job 
     26BATCH_CMD=${SETTE_BATCH_CMD:-llsubmit} 
     27# command to check job status 
     28BATCH_STAT=${SETTE_BATCH_STAT:-llq} 
     29# generic sette job name (as it appears with $BATCH_STAT command) 
     30BATCH_NAME=${SETTE_BATCH_NAME:-sette} 
     31# ------------------------------------------------------------------------------------------ 
     32# 
     33# FILES STORING paths 
     34# forcing files storing 
     35FORCING_DIR=${SETTE_FORCING_DIR:-$WORKDIR/FORCING} 
     36# validation files storing 
     37NEMO_VALIDATION_DIR=${SETTE_NEMO_VALIDATION_DIR:-$MAIN_DIR}/NEMO_VALIDATION 
     38# input files storing (namelist, iodef ...) (DO NOT CHANGE) 
    439INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
     40# ------------------------------------------------------------------------------------------ 
     41# 
     42# RUN set up 
     43# USING_XIOS        : flag to control the activation of key_iomput 
     44#                      "yes" to compile using key_iomput and link to the external XIOS library 
     45#                      "no"  to compile without key_iomput and link to the old IOIPSL library 
     46USING_XIOS=${SETTE_XIOS:-"yes"} 
     47# USING_MPMD        : flag to control the use of stand-alone IO servers 
     48#                     requires USING_XIOS="yes" 
     49#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers 
     50#                      "no"  to run in SPMD (attached) mode without separate IO servers  
     51# MPMD 
     52USING_MPMD=${SETTE_MPMD:-"no"} 
     53# generique batch scrip prefix name if MPMD set to true/false 
     54JOB_PREFIX_MPMD=${SETTE_JOB_PREFIX_MPMD:-batch-mpmd} 
     55JOB_PREFIX_NOMPMD=${SETTE_JOB_PREFIX_NOMPMD:-batch} 
     56# ------------------------------------------------------------------------------------------ 
     57# 
     58# MISCELENIOUS 
     59# command for svn (some people use git svn)  
     60# used in sette_rpt and in all_function to display revision and build correct repository name 
     61SVN_CMD=${SETTE_SVN_CMD:-svn} 
     62# add key key_nosignedzero at the compilation step 
     63ADD_NOSIGNEDZERO=${SETTE_ADD_NOSIGNEDZERO:-"yes"} 
    564#- only for IBM 
    665#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    7 #- VALIDATION files storing 
    8 NEMO_VALIDATION_DIR=$WORKDIR/NEMO_VALIDATION 
     66# ------------------------------------------------------------------------------------------ 
     67# 
     68# LIST OF CONFIGURATIONS 
     69# to be updated if you added an new configuration in sette_test-cases.sh or sette_reference-configuration.sh 
     70TEST_CONFIGS=${SETTE_TEST_CONFIGS:-"ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF SPITZ12 GYRE_PISCES SAS ORCA2_ICE_OBS ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP"} 
     71# ------------------------------------------------------------------------------------------ 
  • utils/CI/sette/prepare_exe_dir.sh

    r10631 r11161  
    6868mkdir -p ${NEW_CONF}/${TEST_NAME} 
    6969 
     70# PREPARE EXEC_DIR 
     71#================== 
    7072export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} 
    7173 
  • utils/CI/sette/prepare_job.sh

    r9663 r11161  
    9494JOB_FILE=$5 
    9595NXIO_PROC=$6 
     96NEMO_VALID=$7 
    9697 
    9798# export EXE_DIR. This directory is used to execute model  
     
    303304             -e"s:DEF_TOOLS_DIR:${TOOLS_DIR}:" \ 
    304305             -e"s:MPI_FLAG:${MPI_FLAG}:" \ 
    305              -e"s:DEF_NEMO_VALIDATION:${NEMO_VALIDATION_DIR}:" -e"s:DEF_NEW_CONF:${NEW_CONF}:" \ 
     306             -e"s:DEF_NEMO_VALIDATION:${NEMO_VALID}:" -e"s:DEF_NEW_CONF:${NEW_CONF}:" \ 
    306307             -e"s:DEF_CMP_NAM:${CMP_NAM}:" -e"s:DEF_TEST_NAME:${TEST_NAME}:" > run_sette_test.job 
    307308 
  • utils/CI/sette/sette.sh

    r10779 r11161  
    1 #!/bin/bash 
    2 ############################################################ 
    3 # Author : Simona Flavoni for NEMO 
    4 # Contact: sflod@locean-ipsl.upmc.fr 
    5 # 2013   : A.C. Coward added options for testing with XIOS in dettached mode 
     1#!/bin/sh 
     2# initialise user dependent variable 
     3SETTE_DIR=$(cd $(dirname "$0"); pwd) 
     4MAIN_DIR=$(dirname $SETTE_DIR) 
     5 
     6# Parse command-line arguments 
    67# 
    7 # sette.sh   : principal script of SET TEsts for NEMO (SETTE) 
    8 # ---------------------------------------------------------------------- 
    9 # NEMO/SETTE , NEMO Consortium (2010) 
    10 # Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    11 # ---------------------------------------------------------------------- 
    12 # 
    13 ############################################################# 
    14 #set -vx 
    15 set -o posix 
    16 #set -u 
    17 #set -e 
    18 # =========== 
    19 # DESCRIPTION 
    20 # =========== 
    21 # 
    22 # Variables to be checked by user: 
    23 # 
    24 # COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory  
    25 # BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs 
    26 # BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs   
    27 # INTERACT_FLAG     : flag to run in interactive mode "yes" 
    28 #                           to run in batch mode "no" 
    29 # MPIRUN_FLAG       : flag to run in parallel (MPI) "yes" 
    30 #                           to run in sequential mode (NB_PROC = 1) "no" 
    31 # USING_XIOS        : flag to control the activation of key_iomput 
    32 #                      "yes" to compile using key_iomput and link to the external XIOS library 
    33 #                      "no"  to compile without key_iomput and link to the old IOIPSL library 
    34 # USING_MPMD        : flag to control the use of stand-alone IO servers 
    35 #                     requires USING_XIOS="yes" 
    36 #                      "yes" to run in MPMD (detached) mode with stand-alone IO servers 
    37 #                      "no"  to run in SPMD (attached) mode without separate IO servers  
    38 # NUM_XIOSERVERS    : number of stand-alone IO servers to employ 
    39 #                     set to zero if USING_MPMD="no" 
    40 # 
    41 # Principal script is sette.sh, that calls  
    42 # 
    43 #  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe  
    44 #              and links to nemo in ${CONFIG_NAME}/EXP00) 
    45 # 
    46 #  param.cfg : sets and loads following directories: 
    47 # 
    48 #   FORCING_DIR         : is the directory for forcing files (tarfile) 
    49 #   INPUT_DIR           : is the directory for input files storing  
    50 #   TMPDIR              : is the temporary directory (if needed) 
    51 #   NEMO_VALIDATION_DIR : is the validation directory 
    52 # 
    53 #   (NOTE: this file is the same for all configrations to be tested with sette) 
    54 # 
    55 #   all_functions.sh : loads functions used by sette (note: new functions can be added here) 
    56 #   set_namelist     : function declared in all_functions that sets namelist parameters  
    57 #   post_test_tidyup : creates validation storage directory and copies required output files  
    58 #                      (run.stat and ocean.output) in it after execution of test. 
    59 # 
    60 #  VALIDATION tree is: 
    61 # 
    62 #   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
    63 # 
    64 #  prepare_exe_dir.sh : defines and creates directory where the test is executed 
    65 #                       execution directory takes name of TEST_NAME defined for every test  
    66 #                       in sette.sh. (each test in executed in its own directory) 
    67 # 
    68 #  prepare_job.sh     : to generate the script run_job.sh 
    69 # 
    70 #  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") 
    71 #                        see sette.sh and BATCH_TEMPLATE directory 
    72 # 
    73 #  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which  
    74 #        can be found paths to the input tar file) 
    75 #  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}  
    76 #        directory 
    77 #  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists  
    78 #        remain in ${NEW_CONF}/EXP00 
    79 #  
    80 #  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of  
    81 #        executed commands 
    82 # 
    83 #  NOTE: if sette.sh is stopped in output.sette there is written the last command  
    84 #        executed by sette.sh 
    85 # 
    86 # example use: ./sette.sh  
    87 ######################################################################################### 
    88 # 
    89 # Compiler among those in NEMOGCM/ARCH 
    90 COMPILER=X64_ADA 
     8#  -t "test configurations": select active test configurations 
     9#                            (overrides selection made using 
     10#                            environment variable SETTE_TEST_CONFIGS) 
    9111 
    92 export BATCH_COMMAND_PAR="llsubmit" 
    93 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR  
    94 export INTERACT_FLAG="no" 
    95 export MPIRUN_FLAG="yes" 
    96 export USING_XIOS="yes" 
    97 export USING_ICEBERGS="yes" 
    98 # 
    99 export DEL_KEYS="key_iomput" 
    100 if [ ${USING_XIOS} == "yes" ]  
    101  then  
    102    export DEL_KEYS="" 
    103 fi 
    104 # 
    105 # Settings which control the use of stand alone servers (only relevant if using xios) 
    106 # 
    107 export USING_MPMD="no" 
    108 export NUM_XIOSERVERS=4 
    109 export JOB_PREFIX=batch-mpmd 
    110 # 
    111 if [ ${USING_MPMD} == "no" ]  
    112  then 
    113    export NUM_XIOSERVERS=0 
    114    export JOB_PREFIX=batch 
    115 fi 
    116 # 
    117 # 
    118 if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ] 
    119  then 
    120    echo "Incompatible choices. MPMD mode requires the XIOS server" 
    121    exit 
     12if [ $# -gt 0 ]; then 
     13  while getopts :ht: option; do  
     14     case $option in 
     15        t) export SETTE_TEST_CONFIGS=$OPTARG 
     16           echo "" 
     17           echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available" 
     18           echo "" ;; 
     19        h | *) echo 'sette.sh allow no arguments (all configuration will be tested or -t "CFG1_to_test CFG2_to_test ..."'; exit 42 ;; 
     20     esac 
     21  done 
     22  shift $((OPTIND - 1)) 
    12223fi 
    12324 
    124 # Directory to run the tests 
    125 SETTE_DIR=$(cd $(dirname "$0"); pwd) 
    126 MAIN_DIR=$(dirname $SETTE_DIR) 
    127 CONFIG_DIR0=${MAIN_DIR}/cfgs 
    128 TOOLS_DIR=${MAIN_DIR}/tools 
     25. ./param.cfg 
    12926 
    130 CMP_NAM=${1:-$COMPILER} 
    131 # Copy job_batch_COMPILER file for specific compiler into job_batch_template 
    132 cd ${SETTE_DIR} 
    133 cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit 
    134 # Description of configuration tested: 
    135 # GYRE_PISCES       :  1  
    136 # ORCA2_ICE_PISCES  :  2  
    137 # ORCA2_OFF_PISCES  :  3  
    138 # AMM12             :  4  
    139 # SAS               :  5 
    140 # ORCA2_ICE_OBS     :  6 
    141 # AGRIF             :  7 & 8  test AGRIF in a double zoom configuration in the nordic seas + 1 zoom in the eq. Pacific (AGRIF_DEMO) 
    142 #                               and check that key_agrif without zoom = no key_agrif 
    143 # SPITZ12           :  9      regional configuration including sea-ice and tides (Spitzbergen) 
    144  
    145 for config in 1 2 3 4 5 6 7 8 9 
    146 do 
    147  
    148 # ----------- 
    149 # GYRE_PISCES 
    150 # ----------- 
    151 if [ ${config} -eq 1 ] ;  then 
    152 ## Restartability tests for GYRE_PISCES 
    153     export TEST_NAME="LONG" 
    154     cd ${MAIN_DIR} 
    155     . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 del_key ${DEL_KEYS} 
    156     cd ${SETTE_DIR} 
    157     . ./param.cfg 
    158     . ./all_functions.sh 
    159     . ./prepare_exe_dir.sh 
    160     JOB_FILE=${EXE_DIR}/run_job.sh 
    161     NPROC=8 
    162     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    163     cd ${EXE_DIR}   
    164     set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\" 
    165     set_namelist namelist_cfg nn_it000 1 
    166     set_namelist namelist_cfg nn_itend 1080 
    167     set_namelist namelist_cfg nn_stock  540 
    168     set_namelist namelist_cfg ln_linssh .true. 
    169     set_namelist namelist_cfg jpni 2 
    170     set_namelist namelist_cfg jpnj 4 
    171     set_namelist namelist_cfg ln_ctl .false. 
    172     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    173     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    174     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    175     if [ ${USING_MPMD} == "yes" ] ; then 
    176        set_xio_using_server iodef.xml true 
    177     else 
    178        set_xio_using_server iodef.xml false 
    179     fi 
    180     cd ${SETTE_DIR} 
    181     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    182  
    183     cd ${SETTE_DIR} 
    184     export TEST_NAME="SHORT" 
    185     . ./prepare_exe_dir.sh 
    186     cd ${EXE_DIR} 
    187     set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\" 
    188     set_namelist namelist_cfg nn_it000 541 
    189     set_namelist namelist_cfg nn_itend 1080 
    190     set_namelist namelist_cfg nn_stock 540 
    191     set_namelist namelist_cfg ln_rstart .true. 
    192     set_namelist namelist_cfg nn_rstctl 2 
    193     set_namelist namelist_cfg ln_linssh .true. 
    194     set_namelist namelist_cfg jpni 2 
    195     set_namelist namelist_cfg jpnj 4 
    196     set_namelist namelist_cfg ln_ctl .false. 
    197     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    198     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    199     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    200     set_namelist namelist_top_cfg ln_rsttr .true. 
    201     set_namelist namelist_top_cfg nn_rsttr 2 
    202     set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000540_restart\" 
    203     set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000540_restart_trc\" 
    204     if [ ${USING_MPMD} == "yes" ] ; then 
    205        set_xio_using_server iodef.xml true 
    206     else 
    207        set_xio_using_server iodef.xml false 
    208     fi 
    209     for (( i=1; i<=$NPROC; i++)) ; do 
    210         L_NPROC=$(( $i - 1 )) 
    211         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    212         ln -sf ../LONG/GYREPIS_LONG_00000540_restart_${L_NPROC}.nc . 
    213         ln -sf ../LONG/GYREPIS_LONG_00000540_restart_trc_${L_NPROC}.nc . 
    214     done 
    215     cd ${SETTE_DIR} 
    216     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    217     cd ${SETTE_DIR} 
    218     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    219  
    220 ## Reproducibility tests for GYRE_PISCES 
    221     export TEST_NAME="REPRO_2_4" 
    222     cd ${MAIN_DIR} 
    223     cd ${SETTE_DIR} 
    224     . ./param.cfg 
    225     . ./all_functions.sh 
    226     . ./prepare_exe_dir.sh 
    227     JOB_FILE=${EXE_DIR}/run_job.sh 
    228     NPROC=8 
    229     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    230     cd ${EXE_DIR} 
    231     set_namelist namelist_cfg cn_exp \"GYREPIS_48\" 
    232     set_namelist namelist_cfg nn_it000 1 
    233     set_namelist namelist_cfg nn_itend 1080 
    234     set_namelist namelist_cfg ln_linssh .true. 
    235     set_namelist namelist_cfg jpni 2 
    236     set_namelist namelist_cfg jpnj 4 
    237     set_namelist namelist_cfg ln_ctl .false. 
    238     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    239     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    240     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    241     if [ ${USING_MPMD} == "yes" ] ; then 
    242        set_xio_using_server iodef.xml true 
    243     else 
    244        set_xio_using_server iodef.xml false 
    245     fi 
    246     cd ${SETTE_DIR} 
    247     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    248     cd ${SETTE_DIR} 
    249     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    250  
    251     cd ${SETTE_DIR} 
    252     export TEST_NAME="REPRO_4_2" 
    253     . ./prepare_exe_dir.sh 
    254     JOB_FILE=${EXE_DIR}/run_job.sh 
    255     NPROC=8 
    256     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    257     cd ${EXE_DIR} 
    258     set_namelist namelist_cfg cn_exp \"GYREPIS_84\" 
    259     set_namelist namelist_cfg nn_it000 1 
    260     set_namelist namelist_cfg nn_itend 1080 
    261     set_namelist namelist_cfg ln_linssh .true. 
    262     set_namelist namelist_cfg jpni 4 
    263     set_namelist namelist_cfg jpnj 2 
    264     set_namelist namelist_cfg ln_ctl .false. 
    265     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    266     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    267     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    268     if [ ${USING_MPMD} == "yes" ] ; then 
    269        set_xio_using_server iodef.xml true 
    270     else 
    271        set_xio_using_server iodef.xml false 
    272     fi 
    273     cd ${SETTE_DIR} 
    274     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    275     cd ${SETTE_DIR} 
    276     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    277  
     27# run sette on reference configuration 
     28./sette_reference-configurations.sh 
     29if [[ $? != 0 ]]; then 
     30   echo "" 
     31   echo "--------------------------------------------------------------" 
     32   echo "./sette_cfg-ref.sh didn't finish properly, need investigations" 
     33   echo "--------------------------------------------------------------" 
     34   echo "" 
     35   exit 42 
    27836fi 
    27937 
    280 # ----------------- 
    281 # ORCA2_ICE_PISCES 
    282 # ----------------- 
    283 if [ ${config} -eq 2 ] ;  then 
    284 ## Restartability tests for ORCA2_ICE_PISCES 
    285     export TEST_NAME="LONG" 
    286     cd ${MAIN_DIR} 
    287     . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_PISCES_ST -r ORCA2_ICE_PISCES -j 8 del_key ${DEL_KEYS} 
    288     cd ${SETTE_DIR} 
    289     . ./param.cfg 
    290     . ./all_functions.sh 
    291     . ./prepare_exe_dir.sh 
    292     JOB_FILE=${EXE_DIR}/run_job.sh 
    293     NPROC=32 
    294     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    295     cd ${EXE_DIR} 
    296     set_namelist namelist_cfg cn_exp \"O2L3P_LONG\" 
    297     set_namelist namelist_cfg nn_it000 1 
    298     set_namelist namelist_cfg nn_itend 1000 
    299     set_namelist namelist_cfg nn_stock 500 
    300     set_namelist namelist_cfg jpni 4 
    301     set_namelist namelist_cfg jpnj 8 
    302     set_namelist namelist_cfg ln_ctl .false. 
    303     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    304     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    305     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    306     set_namelist namelist_cfg ln_use_calving .true. 
    307     set_namelist namelist_cfg ln_wave .true. 
    308     set_namelist namelist_cfg ln_cdgw .true. 
    309     set_namelist namelist_cfg ln_sdw  .true. 
    310     set_namelist namelist_cfg nn_sdrift 1 
    311     set_namelist namelist_cfg ln_stcor .true. 
    312     set_namelist namelist_cfg ln_tauwoc .true. 
    313     # 
    314     if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
    315     # 
    316     set_namelist namelist_ice_cfg ln_icediachk .true. 
    317     set_namelist namelist_top_cfg ln_trcdta .false. 
    318     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    319     # if not you need input files, and for tests is not necessary 
    320     set_namelist namelist_pisces_cfg ln_presatm .false. 
    321     set_namelist namelist_pisces_cfg ln_varpar .false. 
    322     set_namelist namelist_pisces_cfg ln_dust .false. 
    323     set_namelist namelist_pisces_cfg ln_solub .false. 
    324     set_namelist namelist_pisces_cfg ln_river .false. 
    325     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    326     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    327     set_namelist namelist_pisces_cfg ln_ironice .false. 
    328     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    329     # put ln_pisdmp to false : no restoring to global mean value 
    330     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    331     if [ ${USING_MPMD} == "yes" ] ; then 
    332        set_xio_using_server iodef.xml true 
    333     else 
    334        set_xio_using_server iodef.xml false 
    335     fi 
    336     cd ${SETTE_DIR} 
    337     . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    338      
    339     cd ${SETTE_DIR} 
    340     export TEST_NAME="SHORT" 
    341     . ./prepare_exe_dir.sh 
    342     cd ${EXE_DIR} 
    343     set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\" 
    344     set_namelist namelist_cfg nn_it000 501 
    345     set_namelist namelist_cfg nn_itend 1000 
    346     set_namelist namelist_cfg nn_stock 500 
    347     set_namelist namelist_cfg ln_rstart .true. 
    348     set_namelist namelist_cfg nn_rstctl 2 
    349     set_namelist namelist_cfg jpni 4 
    350     set_namelist namelist_cfg jpnj 8 
    351     set_namelist namelist_cfg ln_ctl .false. 
    352     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    353     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    354     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    355     set_namelist namelist_cfg nn_test_icebergs -1 
    356     set_namelist namelist_cfg ln_wave .true. 
    357     set_namelist namelist_cfg ln_cdgw .true. 
    358     set_namelist namelist_cfg ln_sdw  .true. 
    359     set_namelist namelist_cfg nn_sdrift 1 
    360     set_namelist namelist_cfg ln_stcor .true. 
    361     set_namelist namelist_cfg ln_tauwoc .true. 
    362     # 
    363     if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
    364     # 
    365     set_namelist namelist_ice_cfg ln_icediachk .true. 
    366     set_namelist namelist_top_cfg ln_rsttr .true. 
    367     set_namelist namelist_top_cfg nn_rsttr 2 
    368     set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000500_restart\" 
    369     set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000500_restart_trc\" 
    370     set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000500_restart_ice\" 
    371     set_namelist namelist_top_cfg ln_trcdta .false. 
    372     # put ln_ironsed, ln_river, ln_ndepo, ln_dust 
    373     # if not you need input files, and for tests is not necessary 
    374     set_namelist namelist_pisces_cfg ln_presatm .false. 
    375     set_namelist namelist_pisces_cfg ln_varpar .false. 
    376     set_namelist namelist_pisces_cfg ln_dust .false. 
    377     set_namelist namelist_pisces_cfg ln_solub .false. 
    378     set_namelist namelist_pisces_cfg ln_river .false. 
    379     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    380     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    381     set_namelist namelist_pisces_cfg ln_ironice .false. 
    382     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    383     # put ln_pisdmp to false : no restoring to global mean value 
    384     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    385     for (( i=1; i<=$NPROC; i++)) ; do 
    386         L_NPROC=$(( $i - 1 )) 
    387         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    388         ln -sf ../LONG/O2L3P_LONG_00000500_restart_${L_NPROC}.nc . 
    389         ln -sf ../LONG/O2L3P_LONG_00000500_restart_trc_${L_NPROC}.nc . 
    390         ln -sf ../LONG/O2L3P_LONG_00000500_restart_ice_${L_NPROC}.nc . 
    391         if [ ${USING_ICEBERGS} == "yes" ] 
    392             then 
    393              ln -sf ../LONG/O2L3P_LONG_icebergs_00000500_restart_${L_NPROC}.nc O2L3P_LONG_00000500_restart_icebergs_${L_NPROC}.nc 
    394         fi 
    395     done 
    396     if [ ${USING_MPMD} == "yes" ] ; then 
    397        set_xio_using_server iodef.xml true 
    398     else 
    399        set_xio_using_server iodef.xml false 
    400     fi 
    401     cd ${SETTE_DIR} 
    402     . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    403     cd ${SETTE_DIR} 
    404     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    405  
    406 ## Reproducibility tests for ORCA2_ICE_PISCES 
    407     export TEST_NAME="REPRO_4_8" 
    408     cd ${MAIN_DIR} 
    409     cd ${SETTE_DIR} 
    410     . ./param.cfg 
    411     . ./all_functions.sh 
    412     . ./prepare_exe_dir.sh 
    413     JOB_FILE=${EXE_DIR}/run_job.sh 
    414     NPROC=32 
    415     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    416     cd ${EXE_DIR} 
    417     set_namelist namelist_cfg cn_exp \"O2L3P_48\" 
    418     set_namelist namelist_cfg nn_it000 1 
    419     set_namelist namelist_cfg nn_itend 1000 
    420     set_namelist namelist_cfg jpni 4 
    421     set_namelist namelist_cfg jpnj 8 
    422     set_namelist namelist_cfg ln_ctl .false. 
    423     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    424     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    425     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    426     set_namelist namelist_cfg ln_wave .true. 
    427     set_namelist namelist_cfg ln_cdgw .true. 
    428     set_namelist namelist_cfg ln_sdw  .true. 
    429     set_namelist namelist_cfg nn_sdrift 1 
    430     set_namelist namelist_cfg ln_stcor .true. 
    431     set_namelist namelist_cfg ln_tauwoc .true. 
    432  
    433     if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
    434     set_namelist namelist_top_cfg ln_trcdta .false. 
    435     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    436     # if not you need input files, and for tests is not necessary 
    437     set_namelist namelist_pisces_cfg ln_presatm .false. 
    438     set_namelist namelist_pisces_cfg ln_varpar .false. 
    439     set_namelist namelist_pisces_cfg ln_dust .false. 
    440     set_namelist namelist_pisces_cfg ln_solub .false. 
    441     set_namelist namelist_pisces_cfg ln_river .false. 
    442     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    443     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    444     set_namelist namelist_pisces_cfg ln_ironice .false. 
    445     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    446     # put ln_pisdmp to false : no restoring to global mean value 
    447     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    448     if [ ${USING_MPMD} == "yes" ] ; then 
    449        set_xio_using_server iodef.xml true 
    450     else 
    451        set_xio_using_server iodef.xml false 
    452     fi 
    453     cd ${SETTE_DIR} 
    454     . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    455     cd ${SETTE_DIR} 
    456     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    457  
    458     cd ${SETTE_DIR} 
    459     export TEST_NAME="REPRO_8_4" 
    460     . ./prepare_exe_dir.sh 
    461     JOB_FILE=${EXE_DIR}/run_job.sh 
    462     NPROC=32 
    463     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    464     cd ${EXE_DIR} 
    465     set_namelist namelist_cfg cn_exp \"O2L3P_84\" 
    466     set_namelist namelist_cfg nn_it000 1 
    467     set_namelist namelist_cfg nn_itend 1000 
    468     set_namelist namelist_cfg jpni 8 
    469     set_namelist namelist_cfg jpnj 4 
    470     set_namelist namelist_cfg ln_ctl .false. 
    471     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    472     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    473     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    474     set_namelist namelist_cfg ln_wave .true. 
    475     set_namelist namelist_cfg ln_cdgw .true. 
    476     set_namelist namelist_cfg ln_sdw  .true. 
    477     set_namelist namelist_cfg nn_sdrift 1 
    478     set_namelist namelist_cfg ln_stcor .true. 
    479     set_namelist namelist_cfg ln_tauwoc .true. 
    480     if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi 
    481     set_namelist namelist_top_cfg ln_trcdta .false. 
    482     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    483     # if not you need input files, and for tests is not necessary 
    484     set_namelist namelist_pisces_cfg ln_presatm .false. 
    485     set_namelist namelist_pisces_cfg ln_varpar .false. 
    486     set_namelist namelist_pisces_cfg ln_dust .false. 
    487     set_namelist namelist_pisces_cfg ln_solub .false. 
    488     set_namelist namelist_pisces_cfg ln_river .false. 
    489     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    490     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    491     set_namelist namelist_pisces_cfg ln_ironice .false. 
    492     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    493     # put ln_pisdmp to false : no restoring to global mean value 
    494     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    495     if [ ${USING_MPMD} == "yes" ] ; then 
    496        set_xio_using_server iodef.xml true 
    497     else 
    498        set_xio_using_server iodef.xml false 
    499     fi 
    500     cd ${SETTE_DIR} 
    501     . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    502     cd ${SETTE_DIR} 
    503     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     38# run sette on test cases 
     39./sette_test-cases.sh 
     40if [[ $? != 0 ]]; then 
     41   echo "" 
     42   echo "-----------------------------------------------------------------" 
     43   echo "./sette_test-cases.sh didn't finish properly, need investigations" 
     44   echo "-----------------------------------------------------------------" 
     45   echo "" 
     46   exit 42 
    50447fi 
    50548 
    506 # ---------------- 
    507 # ORCA2_OFF_PISCES 
    508 # ---------------- 
    509 if [ ${config} -eq 3 ] ;  then 
    510 ## Restartability tests for ORCA2_OFF_PISCES 
    511     export TEST_NAME="LONG" 
    512     cd ${MAIN_DIR} 
    513     . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS} 
    514     cd ${SETTE_DIR} 
    515     . ./param.cfg 
    516     . ./all_functions.sh 
    517     . ./prepare_exe_dir.sh 
    518     JOB_FILE=${EXE_DIR}/run_job.sh 
    519     NPROC=32 
    520     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    521     cd ${EXE_DIR} 
    522     set_namelist namelist_cfg cn_exp \"OFFP_LONG\" 
    523     set_namelist namelist_cfg nn_it000 1 
    524     set_namelist namelist_cfg nn_itend 380 
    525     set_namelist namelist_cfg nn_stock 190 
    526     set_namelist namelist_cfg jpni 4 
    527     set_namelist namelist_cfg jpnj 8 
    528     set_namelist namelist_cfg ln_ctl .false. 
    529     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    530     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    531     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    532     set_namelist namelist_cfg ln_qsr_rgb .true. 
    533     set_namelist namelist_top_cfg ln_trcdta .false. 
    534     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    535     # if not you need input files, and for tests is not necessary 
    536     set_namelist namelist_pisces_cfg ln_presatm .false. 
    537     set_namelist namelist_pisces_cfg ln_varpar .false. 
    538     set_namelist namelist_pisces_cfg ln_dust .false. 
    539     set_namelist namelist_pisces_cfg ln_solub .false. 
    540     set_namelist namelist_pisces_cfg ln_river .false. 
    541     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    542     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    543     set_namelist namelist_pisces_cfg ln_ironice .false. 
    544     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    545     # put ln_pisdmp to false : no restoring to global mean value 
    546     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    547     if [ ${USING_MPMD} == "yes" ] ; then 
    548        set_xio_using_server iodef.xml true 
    549     else 
    550        set_xio_using_server iodef.xml false 
    551     fi 
    552     cd ${SETTE_DIR} 
    553     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    554      
    555     cd ${SETTE_DIR} 
    556     export TEST_NAME="SHORT" 
    557     . ./prepare_exe_dir.sh 
    558     cd ${EXE_DIR} 
    559     set_namelist namelist_cfg cn_exp \"OFFP_SHORT\" 
    560     set_namelist namelist_cfg nn_it000 191 
    561     set_namelist namelist_cfg nn_itend 380 
    562     set_namelist namelist_cfg nn_stock 190 
    563     set_namelist namelist_cfg jpni 4 
    564     set_namelist namelist_cfg jpnj 8 
    565     set_namelist namelist_cfg ln_ctl .false. 
    566     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    567     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    568     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    569     set_namelist namelist_cfg ln_qsr_rgb .true. 
    570     set_namelist namelist_top_cfg ln_rsttr .true. 
    571     set_namelist namelist_top_cfg nn_rsttr 2 
    572     set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000190_restart_trc\" 
    573     for (( i=1; i<=$NPROC; i++)) ; do 
    574         L_NPROC=$(( $i - 1 )) 
    575         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    576         ln -sf ../LONG/OFFP_LONG_00000190_restart_trc_${L_NPROC}.nc . 
    577     done 
    578     # put ln_ironsed, ln_river, ln_ndepo, ln_dust 
    579     # if not you need input files, and for tests is not necessary 
    580     set_namelist namelist_pisces_cfg ln_presatm .false. 
    581     set_namelist namelist_pisces_cfg ln_varpar .false. 
    582     set_namelist namelist_pisces_cfg ln_dust .false. 
    583     set_namelist namelist_pisces_cfg ln_solub .false. 
    584     set_namelist namelist_pisces_cfg ln_river .false. 
    585     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    586     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    587     set_namelist namelist_pisces_cfg ln_ironice .false. 
    588     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    589     # put ln_pisdmp to false : no restoring to global mean value 
    590     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    591     if [ ${USING_MPMD} == "yes" ] ; then 
    592        set_xio_using_server iodef.xml true 
    593     else 
    594        set_xio_using_server iodef.xml false 
    595     fi 
    596     cd ${SETTE_DIR} 
    597     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    598     cd ${SETTE_DIR} 
    599     . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    600  
    601 ## Reproducibility tests for ORCA2_OFF_PISCES 
    602     export TEST_NAME="REPRO_4_8" 
    603     cd ${MAIN_DIR} 
    604     cd ${SETTE_DIR} 
    605     . ./param.cfg 
    606     . ./all_functions.sh 
    607     . ./prepare_exe_dir.sh 
    608     JOB_FILE=${EXE_DIR}/run_job.sh 
    609     NPROC=32 
    610     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    611     cd ${EXE_DIR} 
    612     set_namelist namelist_cfg cn_exp \"OFFP_48\" 
    613     set_namelist namelist_cfg nn_it000 1 
    614     set_namelist namelist_cfg nn_itend 380 
    615     set_namelist namelist_cfg jpni 4 
    616     set_namelist namelist_cfg jpnj 8 
    617     set_namelist namelist_cfg ln_ctl .false. 
    618     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    619     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    620     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    621     set_namelist namelist_cfg ln_qsr_rgb .true. 
    622     set_namelist namelist_top_cfg ln_trcdta .false. 
    623     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    624     # if not you need input files, and for tests is not necessary 
    625     set_namelist namelist_pisces_cfg ln_presatm .false. 
    626     set_namelist namelist_pisces_cfg ln_varpar .false. 
    627     set_namelist namelist_pisces_cfg ln_dust .false. 
    628     set_namelist namelist_pisces_cfg ln_solub .false. 
    629     set_namelist namelist_pisces_cfg ln_river .false. 
    630     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    631     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    632     set_namelist namelist_pisces_cfg ln_ironice .false. 
    633     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    634     # put ln_pisdmp to false : no restoring to global mean value 
    635     set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    636     if [ ${USING_MPMD} == "yes" ] ; then 
    637        set_xio_using_server iodef.xml true 
    638     else 
    639        set_xio_using_server iodef.xml false 
    640     fi 
    641     cd ${SETTE_DIR} 
    642     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    643     cd ${SETTE_DIR} 
    644     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    645  
    646     cd ${SETTE_DIR} 
    647     export TEST_NAME="REPRO_8_4" 
    648     . ./prepare_exe_dir.sh 
    649     JOB_FILE=${EXE_DIR}/run_job.sh 
    650     NPROC=32 
    651     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    652     cd ${EXE_DIR} 
    653     set_namelist namelist_cfg cn_exp \"OFFP_84\" 
    654     set_namelist namelist_cfg nn_it000 1 
    655     set_namelist namelist_cfg nn_itend 380 
    656     set_namelist namelist_cfg jpni 8 
    657     set_namelist namelist_cfg jpnj 4 
    658     set_namelist namelist_cfg ln_ctl .false. 
    659     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    660     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    661     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    662     set_namelist namelist_cfg ln_qsr_rgb .true. 
    663     set_namelist namelist_top_cfg ln_trcdta .false. 
    664     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    665     # if not you need input files, and for tests is not necessary 
    666     set_namelist namelist_pisces_cfg ln_presatm .false. 
    667     set_namelist namelist_pisces_cfg ln_varpar .false. 
    668     set_namelist namelist_pisces_cfg ln_dust .false. 
    669     set_namelist namelist_pisces_cfg ln_solub .false. 
    670     set_namelist namelist_pisces_cfg ln_river .false. 
    671     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    672     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    673     set_namelist namelist_pisces_cfg ln_ironice .false. 
    674     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    675     # put ln_pisdmp to false : no restoring to global mean value 
    676     set_namelist namelist_pisces_cfg ln_pisdmp .false.  
    677     if [ ${USING_MPMD} == "yes" ] ; then 
    678        set_xio_using_server iodef.xml true 
    679     else 
    680        set_xio_using_server iodef.xml false 
    681     fi 
    682     cd ${SETTE_DIR} 
    683     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    684     cd ${SETTE_DIR} 
    685     . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    686 fi 
    687  
    688 # ----- 
    689 # AMM12 
    690 # ----- 
    691 if [ ${config} -eq 4 ] ;  then 
    692     ## Restartability tests for AMM12 
    693     export TEST_NAME="LONG" 
    694     cd ${MAIN_DIR} 
    695     . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 del_key ${DEL_KEYS} 
    696     cd ${SETTE_DIR} 
    697     . ./param.cfg 
    698     . ./all_functions.sh 
    699     . ./prepare_exe_dir.sh 
    700     JOB_FILE=${EXE_DIR}/run_job.sh 
    701     NPROC=32 
    702     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    703     cd ${EXE_DIR} 
    704     set_namelist namelist_cfg cn_exp \"AMM12_LONG\" 
    705     set_namelist namelist_cfg nn_it000 1 
    706     set_namelist namelist_cfg nn_itend 576 
    707     set_namelist namelist_cfg nn_stock 288 
    708     set_namelist namelist_cfg jpni 4 
    709     set_namelist namelist_cfg jpnj 8 
    710     set_namelist namelist_cfg ln_ctl .false. 
    711     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    712     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    713     if [ ${USING_MPMD} == "yes" ] ; then 
    714        set_xio_using_server iodef.xml true 
    715     else 
    716        set_xio_using_server iodef.xml false 
    717     fi 
    718     cd ${SETTE_DIR} 
    719     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    720  
    721     cd ${SETTE_DIR} 
    722     export TEST_NAME="SHORT" 
    723     . ./prepare_exe_dir.sh 
    724     cd ${EXE_DIR} 
    725     set_namelist namelist_cfg cn_exp \"AMM12_SHORT\" 
    726     set_namelist namelist_cfg nn_it000 289 
    727     set_namelist namelist_cfg nn_itend 576 
    728     set_namelist namelist_cfg jpni 4 
    729     set_namelist namelist_cfg jpnj 8 
    730     set_namelist namelist_cfg ln_ctl .false. 
    731     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    732     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    733     set_namelist namelist_cfg ln_rstart .true. 
    734     set_namelist namelist_cfg nn_rstctl 2 
    735     set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\" 
    736     set_namelist namelist_cfg nn_date0 20120102 
    737     for (( i=1; i<=$NPROC; i++)) ; do 
    738         L_NPROC=$(( $i - 1 )) 
    739         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    740         ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc . 
    741     done 
    742     if [ ${USING_MPMD} == "yes" ] ; then 
    743        set_xio_using_server iodef.xml true 
    744     else 
    745        set_xio_using_server iodef.xml false 
    746     fi 
    747     cd ${SETTE_DIR} 
    748     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    749     cd ${SETTE_DIR} 
    750     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    751  
    752 ## Reproducibility tests for AMM12 
    753     export TEST_NAME="REPRO_8_4" 
    754     cd ${MAIN_DIR} 
    755     cd ${SETTE_DIR} 
    756     . ./param.cfg 
    757     . ./all_functions.sh 
    758     . ./prepare_exe_dir.sh 
    759     JOB_FILE=${EXE_DIR}/run_job.sh 
    760     NPROC=32 
    761     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    762     cd ${EXE_DIR} 
    763     set_namelist namelist_cfg cn_exp \"AMM12_84\" 
    764     set_namelist namelist_cfg nn_it000 1 
    765     set_namelist namelist_cfg nn_itend 576 
    766     set_namelist namelist_cfg jpni 8 
    767     set_namelist namelist_cfg jpnj 4 
    768     set_namelist namelist_cfg ln_ctl .false. 
    769     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    770     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    771     if [ ${USING_MPMD} == "yes" ] ; then 
    772        set_xio_using_server iodef.xml true 
    773     else 
    774        set_xio_using_server iodef.xml false 
    775     fi 
    776     cd ${SETTE_DIR} 
    777     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    778     cd ${SETTE_DIR} 
    779     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    780  
    781     cd ${SETTE_DIR} 
    782     export TEST_NAME="REPRO_4_8" 
    783     . ./prepare_exe_dir.sh 
    784     JOB_FILE=${EXE_DIR}/run_job.sh 
    785     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    786     cd ${EXE_DIR} 
    787     set_namelist namelist_cfg cn_exp \"AMM12_48\" 
    788     set_namelist namelist_cfg nn_it000 1 
    789     set_namelist namelist_cfg nn_itend 576 
    790     set_namelist namelist_cfg jpni 4 
    791     set_namelist namelist_cfg jpnj 8 
    792     set_namelist namelist_cfg ln_ctl .false. 
    793     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    794     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    795     if [ ${USING_MPMD} == "yes" ] ; then 
    796        set_xio_using_server iodef.xml true 
    797     else 
    798        set_xio_using_server iodef.xml false 
    799     fi 
    800     cd ${SETTE_DIR} 
    801     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    802     cd ${SETTE_DIR} 
    803     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    804 fi 
    805  
    806  
    807 # --------- 
    808 # ORCA2_SAS 
    809 # --------- 
    810 if [ ${config} -eq 5 ] ;  then 
    811 ## Restartability tests 
    812     export TEST_NAME="LONG" 
    813     cd ${MAIN_DIR} 
    814     . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j 8 del_key ${DEL_KEYS} 
    815     cd ${SETTE_DIR} 
    816     . ./param.cfg 
    817     . ./all_functions.sh 
    818     . ./prepare_exe_dir.sh 
    819     JOB_FILE=${EXE_DIR}/run_job.sh 
    820     NPROC=32 
    821     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    822     cd ${EXE_DIR} 
    823     set_namelist namelist_cfg cn_exp \"SAS\" 
    824     set_namelist namelist_cfg nn_it000 1 
    825     set_namelist namelist_cfg nn_itend 240 
    826     set_namelist namelist_cfg nn_stock 120 
    827     set_namelist namelist_cfg jpni 4 
    828     set_namelist namelist_cfg jpnj 8 
    829     set_namelist namelist_cfg ln_ctl .false. 
    830     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    831     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    832     set_namelist namelist_ice_cfg ln_icediachk .true. 
    833     if [ ${USING_MPMD} == "yes" ] ; then 
    834        set_xio_using_server iodef.xml true 
    835     else 
    836        set_xio_using_server iodef.xml false 
    837     fi 
    838     cd ${SETTE_DIR} 
    839     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    840  
    841     cd ${SETTE_DIR} 
    842     export TEST_NAME="SHORT" 
    843     . ./prepare_exe_dir.sh 
    844     cd ${EXE_DIR} 
    845     set_namelist namelist_cfg cn_exp \"SAS\" 
    846     set_namelist namelist_cfg nn_it000 121 
    847     set_namelist namelist_cfg nn_itend 240 
    848     set_namelist namelist_cfg jpni 4 
    849     set_namelist namelist_cfg jpnj 8 
    850     set_namelist namelist_cfg ln_ctl .false. 
    851     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    852     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    853     set_namelist namelist_cfg ln_rstart .true. 
    854     set_namelist namelist_cfg nn_rstctl 2 
    855     set_namelist namelist_cfg nn_date0 010109 
    856     set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\" 
    857     set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\" 
    858     if [ ${USING_MPMD} == "yes" ] ; then 
    859        set_xio_using_server iodef.xml true 
    860     else 
    861        set_xio_using_server iodef.xml false 
    862     fi 
    863     for (( i=1; i<=$NPROC; i++)) ; do 
    864         L_NPROC=$(( $i - 1 )) 
    865         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    866         ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc . 
    867         ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc . 
    868     done 
    869     cd ${SETTE_DIR} 
    870     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    871     cd ${SETTE_DIR} 
    872     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    873  
    874 ## Reproducibility tests 
    875     export TEST_NAME="REPRO_4_8" 
    876     cd ${MAIN_DIR} 
    877     cd ${SETTE_DIR} 
    878     . ./param.cfg 
    879     . ./all_functions.sh 
    880     . ./prepare_exe_dir.sh 
    881     JOB_FILE=${EXE_DIR}/run_job.sh 
    882     NPROC=32 
    883     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    884     cd ${EXE_DIR} 
    885     set_namelist namelist_cfg cn_exp \"SAS_48\" 
    886     set_namelist namelist_cfg nn_it000 1 
    887     set_namelist namelist_cfg nn_itend 75 
    888     set_namelist namelist_cfg jpni 4 
    889     set_namelist namelist_cfg jpnj 8 
    890     set_namelist namelist_cfg ln_ctl .false. 
    891     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    892     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    893     if [ ${USING_MPMD} == "yes" ] ; then 
    894        set_xio_using_server iodef.xml true 
    895     else 
    896        set_xio_using_server iodef.xml false 
    897     fi 
    898     cd ${SETTE_DIR} 
    899     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    900     cd ${SETTE_DIR} 
    901     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    902  
    903     cd ${SETTE_DIR} 
    904     export TEST_NAME="REPRO_8_4" 
    905     . ./prepare_exe_dir.sh 
    906     JOB_FILE=${EXE_DIR}/run_job.sh 
    907     NPROC=32 
    908     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    909     cd ${EXE_DIR} 
    910     set_namelist namelist_cfg cn_exp \"SAS_84\" 
    911     set_namelist namelist_cfg nn_it000 1 
    912     set_namelist namelist_cfg nn_itend 75 
    913     set_namelist namelist_cfg jpni 8 
    914     set_namelist namelist_cfg jpnj 4 
    915     set_namelist namelist_cfg ln_ctl .false. 
    916     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    917     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    918     if [ ${USING_MPMD} == "yes" ] ; then 
    919        set_xio_using_server iodef.xml true 
    920     else 
    921        set_xio_using_server iodef.xml false 
    922     fi 
    923     cd ${SETTE_DIR} 
    924     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    925     cd ${SETTE_DIR} 
    926     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    927  
    928 fi 
    929  
    930  
    931 # -------------- 
    932 # ORCA2_ICE_OBS 
    933 # -------------- 
    934 ## Test assimilation interface code, OBS and ASM for reproducibility 
    935 ## Restartability not tested (ASM code not restartable while increments are being applied) 
    936 if [ ${config} -eq 6 ] ; then 
    937 ## Reproducibility tests 
    938     export TEST_NAME="REPRO_4_8" 
    939     cd ${MAIN_DIR} 
    940     . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_OBS_ST -r ORCA2_ICE_PISCES -d "OCE ICE"  -j 8 add_key "key_asminc" del_key "key_top" 
    941     cd ${SETTE_DIR} 
    942     . ./param.cfg 
    943     . ./all_functions.sh 
    944     . ./prepare_exe_dir.sh 
    945     JOB_FILE=${EXE_DIR}/run_job.sh 
    946     NPROC=32 
    947     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    948     cd ${EXE_DIR} 
    949     set_namelist namelist_cfg cn_exp \"O2L3OBS_48\" 
    950     set_namelist namelist_cfg nn_it000 1 
    951     set_namelist namelist_cfg nn_itend 75 
    952     set_namelist namelist_cfg ln_read_cfg .true. 
    953     set_namelist namelist_cfg jpni 4 
    954     set_namelist namelist_cfg jpnj 8 
    955     set_namelist namelist_cfg ln_ctl .false. 
    956     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    957     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    958     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    959     set_namelist namelist_cfg ln_diaobs .true. 
    960     set_namelist namelist_cfg ln_t3d .true. 
    961     set_namelist namelist_cfg ln_s3d .true. 
    962     set_namelist namelist_cfg ln_sst .true. 
    963     set_namelist namelist_cfg ln_sla .true. 
    964     set_namelist namelist_cfg ln_sic .true. 
    965     set_namelist namelist_cfg ln_vel3d .true. 
    966     set_namelist namelist_cfg ln_bkgwri .true. 
    967     set_namelist namelist_cfg ln_trainc .true. 
    968     set_namelist namelist_cfg ln_dyninc .true. 
    969     set_namelist namelist_cfg ln_sshinc .true. 
    970     set_namelist namelist_cfg ln_asmiau .true. 
    971     #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration) 
    972     set_namelist namelist_top_cfg ln_trcdta .false.  
    973     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    974     # if not you need input files, and for tests is not necessary 
    975     set_namelist namelist_pisces_cfg ln_presatm .false. 
    976     set_namelist namelist_pisces_cfg ln_varpar .false. 
    977     set_namelist namelist_pisces_cfg ln_dust .false. 
    978     set_namelist namelist_pisces_cfg ln_solub .false. 
    979     set_namelist namelist_pisces_cfg ln_river .false. 
    980     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    981     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    982     set_namelist namelist_pisces_cfg ln_ironice .false. 
    983     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    984     if [ ${USING_MPMD} == "yes" ] ; then 
    985        set_xio_using_server iodef.xml true 
    986     else 
    987        set_xio_using_server iodef.xml false 
    988     fi 
    989     cd ${SETTE_DIR} 
    990     . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    991     cd ${SETTE_DIR} 
    992     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    993  
    994    cd ${SETTE_DIR} 
    995     export TEST_NAME="REPRO_8_4" 
    996     . ./prepare_exe_dir.sh 
    997     JOB_FILE=${EXE_DIR}/run_job.sh 
    998     NPROC=32 
    999     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1000     cd ${EXE_DIR} 
    1001     set_namelist namelist_cfg cn_exp \"O2L3OBS_84\" 
    1002     set_namelist namelist_cfg nn_it000 1 
    1003     set_namelist namelist_cfg nn_itend 75 
    1004     set_namelist namelist_cfg ln_read_cfg .true. 
    1005     set_namelist namelist_cfg jpni 8 
    1006     set_namelist namelist_cfg jpnj 4 
    1007     set_namelist namelist_cfg ln_ctl .false. 
    1008     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1009     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1010     set_namelist namelist_cfg sn_cfctl%l_trcstat .true. 
    1011     set_namelist namelist_cfg ln_diaobs .true. 
    1012     set_namelist namelist_cfg ln_t3d .true. 
    1013     set_namelist namelist_cfg ln_s3d .true. 
    1014     set_namelist namelist_cfg ln_sst .true. 
    1015     set_namelist namelist_cfg ln_sla .true. 
    1016     set_namelist namelist_cfg ln_sic .true. 
    1017     set_namelist namelist_cfg ln_vel3d .true. 
    1018     set_namelist namelist_cfg ln_bkgwri .true. 
    1019     set_namelist namelist_cfg ln_trainc .true. 
    1020     set_namelist namelist_cfg ln_dyninc .true. 
    1021     set_namelist namelist_cfg ln_sshinc .true. 
    1022     set_namelist namelist_cfg ln_asmiau .true. 
    1023     #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration) 
    1024     set_namelist namelist_top_cfg ln_trcdta .false. 
    1025     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
    1026     # if not you need input files, and for tests is not necessary 
    1027     set_namelist namelist_pisces_cfg ln_presatm .false. 
    1028     set_namelist namelist_pisces_cfg ln_varpar .false. 
    1029     set_namelist namelist_pisces_cfg ln_dust .false. 
    1030     set_namelist namelist_pisces_cfg ln_solub .false. 
    1031     set_namelist namelist_pisces_cfg ln_river .false. 
    1032     set_namelist namelist_pisces_cfg ln_ndepo .false. 
    1033     set_namelist namelist_pisces_cfg ln_ironsed .false. 
    1034     set_namelist namelist_pisces_cfg ln_ironice .false. 
    1035     set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    1036     if [ ${USING_MPMD} == "yes" ] ; then 
    1037        set_xio_using_server iodef.xml true 
    1038     else 
    1039        set_xio_using_server iodef.xml false 
    1040     fi 
    1041     cd ${SETTE_DIR} 
    1042     . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1043     cd ${SETTE_DIR} 
    1044     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1045 fi 
    1046  
    1047 # ------------ 
    1048 # AGRIF ICE 
    1049 # ----------- 
    1050 if [ ${config} -eq 7 ] ;  then 
    1051 ## Restartability tests 
    1052     export TEST_NAME="LONG" 
    1053     cd ${MAIN_DIR} 
    1054     . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j 8 del_key ${DEL_KEYS} 
    1055     cd ${SETTE_DIR} 
    1056     . ./param.cfg 
    1057     . ./all_functions.sh 
    1058     . ./prepare_exe_dir.sh 
    1059     JOB_FILE=${EXE_DIR}/run_job.sh 
    1060     NPROC=16 
    1061     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1062     cd ${EXE_DIR} 
    1063     set_namelist namelist_cfg cn_exp \"AGRIF_LONG\" 
    1064     set_namelist namelist_cfg nn_it000 1 
    1065     set_namelist namelist_cfg nn_itend 20 
    1066     set_namelist namelist_cfg nn_stock 10 
    1067     set_namelist namelist_cfg ln_ctl .false. 
    1068     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1069     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1070     set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\" 
    1071     set_namelist 1_namelist_cfg nn_it000 1 
    1072     set_namelist 1_namelist_cfg nn_itend 20 
    1073     set_namelist 1_namelist_cfg nn_stock 10 
    1074     set_namelist 1_namelist_cfg ln_ctl .false. 
    1075     set_namelist 1_namelist_cfg sn_cfctl%l_config .true. 
    1076     set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. 
    1077     set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\" 
    1078     set_namelist 2_namelist_cfg nn_it000 1 
    1079     set_namelist 2_namelist_cfg nn_itend 80 
    1080     set_namelist 2_namelist_cfg nn_stock 40 
    1081     set_namelist 2_namelist_cfg ln_ctl .false. 
    1082     set_namelist 2_namelist_cfg sn_cfctl%l_config .true. 
    1083     set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true. 
    1084     set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\" 
    1085     set_namelist 3_namelist_cfg nn_it000 1 
    1086     set_namelist 3_namelist_cfg nn_itend 240 
    1087     set_namelist 3_namelist_cfg nn_stock 120 
    1088     set_namelist 3_namelist_cfg ln_ctl .false. 
    1089     set_namelist 3_namelist_cfg sn_cfctl%l_config .true. 
    1090     set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true. 
    1091  
    1092     if [ ${USING_MPMD} == "yes" ] ; then 
    1093        set_xio_using_server iodef.xml true 
    1094     else 
    1095        set_xio_using_server iodef.xml false 
    1096     fi 
    1097     cd ${SETTE_DIR} 
    1098     . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1099      
    1100     cd ${SETTE_DIR} 
    1101     export TEST_NAME="SHORT" 
    1102     . ./prepare_exe_dir.sh 
    1103     cd ${EXE_DIR} 
    1104     set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\" 
    1105     set_namelist namelist_cfg nn_it000 11 
    1106     set_namelist namelist_cfg nn_itend 20 
    1107     set_namelist namelist_cfg nn_stock 10 
    1108     set_namelist namelist_cfg ln_ctl .false. 
    1109     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1110     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1111     set_namelist namelist_cfg ln_rstart .true. 
    1112     set_namelist namelist_cfg nn_rstctl 2 
    1113     set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\" 
    1114     set_namelist 1_namelist_cfg nn_it000 11 
    1115     set_namelist 1_namelist_cfg nn_itend 20 
    1116     set_namelist 1_namelist_cfg nn_stock 10 
    1117     set_namelist 1_namelist_cfg ln_ctl .false. 
    1118     set_namelist 1_namelist_cfg sn_cfctl%l_config .true. 
    1119     set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. 
    1120     set_namelist 1_namelist_cfg ln_rstart .true. 
    1121     set_namelist 1_namelist_cfg nn_rstctl 2 
    1122     set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\" 
    1123     set_namelist 2_namelist_cfg nn_it000 41 
    1124     set_namelist 2_namelist_cfg nn_itend 80 
    1125     set_namelist 2_namelist_cfg nn_stock 40 
    1126     set_namelist 2_namelist_cfg ln_ctl .false. 
    1127     set_namelist 2_namelist_cfg sn_cfctl%l_config .true. 
    1128     set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true. 
    1129     set_namelist 2_namelist_cfg ln_rstart .true. 
    1130     set_namelist 2_namelist_cfg nn_rstctl 2 
    1131     set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\" 
    1132     set_namelist 3_namelist_cfg nn_it000 121 
    1133     set_namelist 3_namelist_cfg nn_itend 240 
    1134     set_namelist 3_namelist_cfg nn_stock 120 
    1135     set_namelist 3_namelist_cfg ln_ctl .false. 
    1136     set_namelist 3_namelist_cfg sn_cfctl%l_config .true. 
    1137     set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true. 
    1138     set_namelist 3_namelist_cfg ln_rstart .true. 
    1139     set_namelist 3_namelist_cfg nn_rstctl 2 
    1140     set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\" 
    1141     set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\" 
    1142     set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\" 
    1143     set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\" 
    1144     set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\" 
    1145     set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\" 
    1146     set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\" 
    1147     set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\" 
    1148  
    1149     for (( i=1; i<=$NPROC; i++)) ; do 
    1150         L_NPROC=$(( $i - 1 )) 
    1151         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    1152         ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc . 
    1153         ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc . 
    1154         ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_${L_NPROC}.nc . 
    1155         ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc . 
    1156         ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_${L_NPROC}.nc . 
    1157         ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc . 
    1158         ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_${L_NPROC}.nc . 
    1159         ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc . 
    1160     done 
    1161     if [ ${USING_MPMD} == "yes" ] ; then 
    1162        set_xio_using_server iodef.xml true 
    1163     else 
    1164        set_xio_using_server iodef.xml false 
    1165     fi 
    1166     cd ${SETTE_DIR} 
    1167     . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1168     cd ${SETTE_DIR} 
    1169     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1170  
    1171 ## Reproducibility tests 
    1172     export TEST_NAME="REPRO_4_8" 
    1173     cd ${MAIN_DIR} 
    1174     cd ${SETTE_DIR} 
    1175     . ./param.cfg 
    1176     . ./all_functions.sh 
    1177     . ./prepare_exe_dir.sh 
    1178     JOB_FILE=${EXE_DIR}/run_job.sh 
    1179     NPROC=32 
    1180     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1181     cd ${EXE_DIR} 
    1182     set_namelist namelist_cfg cn_exp \"AGRIF_48\" 
    1183     set_namelist namelist_cfg nn_it000 1 
    1184     set_namelist namelist_cfg nn_itend 20 
    1185     set_namelist namelist_cfg jpni 4 
    1186     set_namelist namelist_cfg jpnj 8 
    1187     set_namelist namelist_cfg ln_ctl .false. 
    1188     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1189     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1190     set_namelist 1_namelist_cfg cn_exp \"AGRIF_48\" 
    1191     set_namelist 1_namelist_cfg nn_it000 1 
    1192     set_namelist 1_namelist_cfg nn_itend 20 
    1193     set_namelist 1_namelist_cfg jpni 4 
    1194     set_namelist 1_namelist_cfg jpnj 8 
    1195     set_namelist 1_namelist_cfg ln_ctl .false. 
    1196     set_namelist 1_namelist_cfg sn_cfctl%l_config .true. 
    1197     set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. 
    1198     set_namelist 2_namelist_cfg cn_exp \"AGRIF_48\" 
    1199     set_namelist 2_namelist_cfg nn_it000 1 
    1200     set_namelist 2_namelist_cfg nn_itend 80 
    1201     set_namelist 2_namelist_cfg jpni 4 
    1202     set_namelist 2_namelist_cfg jpnj 8 
    1203     set_namelist 2_namelist_cfg ln_ctl .false. 
    1204     set_namelist 2_namelist_cfg sn_cfctl%l_config .true. 
    1205     set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true. 
    1206     set_namelist 3_namelist_cfg cn_exp \"AGRIF_48\" 
    1207     set_namelist 3_namelist_cfg nn_it000 1 
    1208     set_namelist 3_namelist_cfg nn_itend 240 
    1209     set_namelist 3_namelist_cfg jpni 4 
    1210     set_namelist 3_namelist_cfg jpnj 8 
    1211     set_namelist 3_namelist_cfg ln_ctl .false. 
    1212     set_namelist 3_namelist_cfg sn_cfctl%l_config .true. 
    1213     set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true. 
    1214  
    1215     if [ ${USING_MPMD} == "yes" ] ; then 
    1216        set_xio_using_server iodef.xml true 
    1217     else 
    1218        set_xio_using_server iodef.xml false 
    1219     fi 
    1220     cd ${SETTE_DIR} 
    1221     . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1222     cd ${SETTE_DIR} 
    1223     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1224  
    1225     cd ${SETTE_DIR} 
    1226     export TEST_NAME="REPRO_8_4" 
    1227     . ./prepare_exe_dir.sh 
    1228     JOB_FILE=${EXE_DIR}/run_job.sh 
    1229     NPROC=32 
    1230     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1231     cd ${EXE_DIR} 
    1232     set_namelist namelist_cfg cn_exp \"AGRIF_84\" 
    1233     set_namelist namelist_cfg nn_it000 1 
    1234     set_namelist namelist_cfg nn_itend 20 
    1235     set_namelist namelist_cfg jpni 8 
    1236     set_namelist namelist_cfg jpnj 4 
    1237     set_namelist namelist_cfg ln_ctl .false. 
    1238     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1239     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1240     set_namelist 1_namelist_cfg cn_exp \"AGRIF_84\" 
    1241     set_namelist 1_namelist_cfg nn_it000 1 
    1242     set_namelist 1_namelist_cfg nn_itend 20 
    1243     set_namelist 1_namelist_cfg jpni 8 
    1244     set_namelist 1_namelist_cfg jpnj 4 
    1245     set_namelist 1_namelist_cfg ln_ctl .false. 
    1246     set_namelist 1_namelist_cfg sn_cfctl%l_config .true. 
    1247     set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. 
    1248     set_namelist 2_namelist_cfg cn_exp \"AGRIF_84\" 
    1249     set_namelist 2_namelist_cfg nn_it000 1 
    1250     set_namelist 2_namelist_cfg nn_itend 80 
    1251     set_namelist 2_namelist_cfg jpni 8 
    1252     set_namelist 2_namelist_cfg jpnj 4 
    1253     set_namelist 2_namelist_cfg ln_ctl .false. 
    1254     set_namelist 2_namelist_cfg sn_cfctl%l_config .true. 
    1255     set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true. 
    1256     set_namelist 3_namelist_cfg cn_exp \"AGRIF_84\" 
    1257     set_namelist 3_namelist_cfg nn_it000 1 
    1258     set_namelist 3_namelist_cfg nn_itend 240 
    1259     set_namelist 3_namelist_cfg jpni 8 
    1260     set_namelist 3_namelist_cfg jpnj 4 
    1261     set_namelist 3_namelist_cfg ln_ctl .false. 
    1262     set_namelist 3_namelist_cfg sn_cfctl%l_config .true. 
    1263     set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true. 
    1264  
    1265     if [ ${USING_MPMD} == "yes" ] ; then 
    1266        set_xio_using_server iodef.xml true 
    1267     else 
    1268        set_xio_using_server iodef.xml false 
    1269     fi 
    1270     cd ${SETTE_DIR} 
    1271     . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1272     cd ${SETTE_DIR} 
    1273     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1274  
    1275 ## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom 
    1276     export TEST_NAME="ORCA2" 
    1277     cd ${MAIN_DIR} 
    1278     cd ${SETTE_DIR} 
    1279     . ./param.cfg 
    1280     . ./all_functions.sh 
    1281     . ./prepare_exe_dir.sh 
    1282     JOB_FILE=${EXE_DIR}/run_job.sh 
    1283     NPROC=32 
    1284     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1285     cd ${EXE_DIR} 
    1286     set_namelist namelist_cfg cn_exp \"ORCA2\" 
    1287     set_namelist namelist_cfg nn_it000 1 
    1288     set_namelist namelist_cfg nn_itend 150 
    1289     set_namelist namelist_cfg ln_ctl .false. 
    1290     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1291     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1292  
    1293 #   Set the number of fine grids to zero:     
    1294     sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in 
    1295  
    1296     if [ ${USING_MPMD} == "yes" ] ; then 
    1297        set_xio_using_server iodef.xml true 
    1298     else 
    1299        set_xio_using_server iodef.xml false 
    1300     fi 
    1301     cd ${SETTE_DIR} 
    1302     . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1303     cd ${SETTE_DIR} 
    1304     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1305  
    1306 fi 
    1307  
    1308  
    1309 ## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2) 
    1310 if [ ${config} -eq 8 ] ;  then 
    1311     export TEST_NAME="ORCA2" 
    1312     cd ${MAIN_DIR} 
    1313     . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 del_key "key_agrif" 
    1314     cd ${SETTE_DIR} 
    1315     . ./param.cfg 
    1316     . ./all_functions.sh 
    1317     . ./prepare_exe_dir.sh 
    1318     JOB_FILE=${EXE_DIR}/run_job.sh 
    1319     NPROC=32 
    1320     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1321     cd ${EXE_DIR} 
    1322     set_namelist namelist_cfg cn_exp \"ORCA2\" 
    1323     set_namelist namelist_cfg nn_it000 1 
    1324     set_namelist namelist_cfg nn_itend 150 
    1325     set_namelist namelist_cfg ln_ctl .false. 
    1326     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1327     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1328 # 
    1329     if [ ${USING_MPMD} == "yes" ] ; then 
    1330        set_xio_using_server iodef.xml true 
    1331     else 
    1332        set_xio_using_server iodef.xml false 
    1333     fi 
    1334     cd ${SETTE_DIR} 
    1335     . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1336     cd ${SETTE_DIR} 
    1337     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1338  
    1339 fi 
    1340  
    1341 # ------- 
    1342 # SPITZ12 
    1343 # ------- 
    1344 if [ ${config} -eq 9 ] ;  then 
    1345 ## Restartability tests 
    1346     export TEST_NAME="LONG" 
    1347     cd ${MAIN_DIR} 
    1348     . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 del_key ${DEL_KEYS} 
    1349     cd ${SETTE_DIR} 
    1350     . ./param.cfg 
    1351     . ./all_functions.sh 
    1352     . ./prepare_exe_dir.sh 
    1353     JOB_FILE=${EXE_DIR}/run_job.sh 
    1354     NPROC=32 
    1355     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1356     cd ${EXE_DIR} 
    1357     set_namelist namelist_cfg cn_exp \"S12_LONG\" 
    1358     set_namelist namelist_cfg nn_it000 1 
    1359     set_namelist namelist_cfg nn_itend 240 
    1360     set_namelist namelist_cfg nn_stock 120 
    1361     set_namelist namelist_cfg nn_date0 20020101 
    1362     set_namelist namelist_cfg jpni 4 
    1363     set_namelist namelist_cfg jpnj 8 
    1364     set_namelist namelist_cfg ln_ctl .false. 
    1365     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1366     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1367     #set_namelist namelist_ice_cfg ln_icediachk .true. 
    1368     if [ ${USING_MPMD} == "yes" ] ; then 
    1369        set_xio_using_server iodef.xml true 
    1370     else 
    1371        set_xio_using_server iodef.xml false 
    1372     fi 
    1373     cd ${SETTE_DIR} 
    1374     . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1375      
    1376     cd ${SETTE_DIR} 
    1377     export TEST_NAME="SHORT" 
    1378     . ./prepare_exe_dir.sh 
    1379     cd ${EXE_DIR} 
    1380     set_namelist namelist_cfg cn_exp \"S12_SHORT\" 
    1381     set_namelist namelist_cfg nn_it000 121 
    1382     set_namelist namelist_cfg nn_itend 240 
    1383     set_namelist namelist_cfg nn_stock 120 
    1384     set_namelist namelist_cfg ln_rstart .true. 
    1385     set_namelist namelist_cfg nn_rstctl 2 
    1386     set_namelist namelist_cfg jpni 4 
    1387     set_namelist namelist_cfg jpnj 8 
    1388     set_namelist namelist_cfg ln_ctl .false. 
    1389     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1390     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1391     set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000120_restart\" 
    1392     set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000120_restart_ice\" 
    1393     for (( i=1; i<=$NPROC; i++)) ; do 
    1394         L_NPROC=$(( $i - 1 )) 
    1395         L_NPROC=`printf "%04d\n" ${L_NPROC}` 
    1396         ln -sf ../LONG/S12_LONG_00000120_restart_${L_NPROC}.nc . 
    1397         ln -sf ../LONG/S12_LONG_00000120_restart_ice_${L_NPROC}.nc . 
    1398     done 
    1399     if [ ${USING_MPMD} == "yes" ] ; then 
    1400        set_xio_using_server iodef.xml true 
    1401     else 
    1402        set_xio_using_server iodef.xml false 
    1403     fi 
    1404     cd ${SETTE_DIR} 
    1405     . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1406     cd ${SETTE_DIR} 
    1407     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1408  
    1409 ## Reproducibility tests 
    1410     export TEST_NAME="REPRO_4_8" 
    1411     cd ${MAIN_DIR} 
    1412     cd ${SETTE_DIR} 
    1413     . ./param.cfg 
    1414     . ./all_functions.sh 
    1415     . ./prepare_exe_dir.sh 
    1416     JOB_FILE=${EXE_DIR}/run_job.sh 
    1417     NPROC=32 
    1418     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1419     cd ${EXE_DIR} 
    1420     set_namelist namelist_cfg cn_exp \"S12_48\" 
    1421     set_namelist namelist_cfg nn_it000 1 
    1422     set_namelist namelist_cfg nn_itend 120 
    1423     set_namelist namelist_cfg nn_date0 20020101 
    1424     set_namelist namelist_cfg jpni 4 
    1425     set_namelist namelist_cfg jpnj 8 
    1426     set_namelist namelist_cfg ln_ctl .false. 
    1427     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1428     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1429     if [ ${USING_MPMD} == "yes" ] ; then 
    1430        set_xio_using_server iodef.xml true 
    1431     else 
    1432        set_xio_using_server iodef.xml false 
    1433     fi 
    1434     cd ${SETTE_DIR} 
    1435     . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1436     cd ${SETTE_DIR} 
    1437     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1438  
    1439     cd ${SETTE_DIR} 
    1440     export TEST_NAME="REPRO_8_4" 
    1441     . ./prepare_exe_dir.sh 
    1442     JOB_FILE=${EXE_DIR}/run_job.sh 
    1443     NPROC=32 
    1444     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    1445     cd ${EXE_DIR} 
    1446     set_namelist namelist_cfg cn_exp \"S12_84\" 
    1447     set_namelist namelist_cfg nn_it000 1 
    1448     set_namelist namelist_cfg nn_itend 120 
    1449     set_namelist namelist_cfg nn_date0 20020101 
    1450     set_namelist namelist_cfg jpni 8 
    1451     set_namelist namelist_cfg jpnj 4 
    1452     set_namelist namelist_cfg ln_ctl .false. 
    1453     set_namelist namelist_cfg sn_cfctl%l_config .true. 
    1454     set_namelist namelist_cfg sn_cfctl%l_runstat .true. 
    1455     if [ ${USING_MPMD} == "yes" ] ; then 
    1456        set_xio_using_server iodef.xml true 
    1457     else 
    1458        set_xio_using_server iodef.xml false 
    1459     fi 
    1460     cd ${SETTE_DIR} 
    1461     . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    1462     cd ${SETTE_DIR} 
    1463     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    1464 fi 
    1465  
    1466  
     49# run sette report 
     50echo "" 
     51echo "-------------------------------------------------------------" 
     52echo "./sette_rpt.sh (script will wait all nemo_sette run are done)" 
     53echo "-------------------------------------------------------------" 
     54echo "" 
     55NRUN=999 
     56NIT=0 
     57while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do 
     58   nit=$((nit+1)) 
     59   NRUN=$( ${BATCH_STAT} | grep nemo_sette | wc -l )  
     60   if [[ $NRUN -ne 0 ]]; then  
     61      printf "%-3d %s\r" $NRUN 'nemo_sette run still in queue or running ...'; 
     62   else 
     63      printf "%-50s\n" " " 
     64      ./sette_rpt.sh 
     65      exit 
     66   fi 
     67   sleep 10 
    146768done 
     69printf "\n" 
     70echo "" 
     71echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests" 
     72echo "" 
  • utils/CI/sette/sette_rpt.sh

    r10517 r11161  
    1111## 
    1212 
    13 function restfile() { 
    14 # Rebuild ice restart for SAS CONFIG, and restartability checks. Expects LONG and SHORT run directories. 
    15 # For Stand Alone Surface configuration ocean is not running, just run ice model; so no outputs ocean files. 
    16 # Compares LONG rebuild restart ice file with equivalent entry from the SHORT rebuild restart ice file. 
    17 # 
    18 # check nco module loaded, and load it if not 
    19 if [ ! $( echo $LOADEDMODULES | grep cdo ) ]; then module load cdo >& /dev/null ; fi 
     13function get_dorv() { 
     14  if [ $lastchange == 'old' ] ; then  
     15    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
     16    dorv=`echo $dorv | sed -e 's:.*/::'` 
     17  else 
     18    dorv=$lastchange 
     19  fi 
     20} 
     21 
     22function get_ktdiff() { 
     23  ktdiff=`diff ${1} ${2} | head -2 | grep it | awk '{ print $4 }'` 
     24} 
     25 
     26function resttest() {  
     27# 
     28# Restartability checks. Expects LONG and SHORT run directories 
     29# Compares end of LONG stat files with equivalent entries from the SHORT stat files. 
    2030# 
    2131  vdir=$1 
    2232  nam=$2 
    2333  pass=$3 
    24  
    25 # 
    26   if [ -d $vdir/$nam ]; then 
    27     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    28     dorv=`echo $dorv | sed -e 's:.*/::'` 
    29     rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 ` 
    30     rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l` 
    31     cd ${SAS_RESTART_DIR}/LONG 
    32     #SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files 
    33     cd ${TOOLS_DIR} 
    34     ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1 
    35     cd ${TOOLS_DIR}/REBUILD_NEMO 
    36     #SF echo "REBUILD LONG restart SAS files, without standard output" 
    37     ./rebuild_nemo -t 4 ../../cfgs/ORCA2_SAS_ICE_ST/LONG/SAS_00000240_restart_ice  $NPROC > /dev/null 2>&1 
    38     #SF echo "REBUILD SHORT restart SAS files, without standard output" 
    39     ./rebuild_nemo -t 4 ../../cfgs/ORCA2_SAS_ICE_ST/SHORT/SAS_00000240_restart_ice $NPROC >&- 
    40     cd ${SAS_RESTART_DIR}/LONG 
    41     #SF echo "COPY rebuild restart files" 
    42     cp SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/. 
    43     cp ../SHORT/SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/. 
    44  
    45     f1o=$vdir/$nam/$mach/$dorv/LONG/SAS_00000240_restart_ice.nc 
    46     f2o=$vdir/$nam/$mach/$dorv/SHORT/SAS_00000240_restart_ice.nc 
    47     if  [ ! -f $f1o ] &&  [ ! -f $f2o ] ; then 
    48       printf "%-27s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test"; 
    49       return; 
    50     fi 
     34# 
     35# get $dorv 
     36  get_dorv 
     37# 
     38# check if directory is here 
     39  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     40    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv 
     41    return 
     42  fi 
     43 
     44  if [ -d $vdir/$nam/$mach/$dorv ]; then 
     45    # check ocean output 
     46    runtest $vdir $nam $pass RST 
    5147    # 
    52     done_oce=0 
    53     # 
    54   if  [  -f $f1o ] && [  -f $f2o ]; then 
    55 ## Compare the two netcdf files 
    56     cdo diffn $f1o $f2o > cdo_diff.out 2> /dev/null 
    57 ## Identical if cdo_diff.out exists but has zero size 
    58     if [ ! -s cdo_diff.out ]; then 
    59        difi=0 
    60     else 
    61 ## Identical if first character of $dif ==0 
    62        dif=$( grep -om1 '[0-9]* of [0-9]* records differ' cdo_diff.out ) 
    63 # difi contains the first character of summary of cdo dif. if = 0, then 0 record differ between the 2 files     
    64        if [ -n "$dif" ]; then 
    65            difi=`echo $dif | cut -c -1` 
    66        fi 
    67     fi 
    68     \rm cdo_diff.out  
    69  
    70     if [ $difi == 0 ]; then    
    71        if [ $pass == 0 ]; then 
    72          printf "%-27s %s %s\n" $nam  " ice restarts are IDENTICAL  passed : " $dorv 
    73        fi 
    74     else 
    75        printf "%-27s %s %s\n" $nam  " ice restarts are DIFFERENT  FAILED : " $dorv  
    76         # 
    77    # Offer view of differences on the second pass 
    78    # 
    79         if [ $pass == 1 ]; then 
    80           echo "<return> to view restart_ice.nc differences" 
    81           read y 
    82           cdo -diffv $f1o $f2o 
    83           done_oce=1 
    84           #echo "<return> to continue" 
    85           #read y 
    86         fi 
    87     fi 
    88   else 
    89       printf "%-27s %s\n" $nam " incomplete test"; 
    90       return; 
    91   fi 
    92 # 
    93 fi 
    94 } 
    95  
    96 function resttest() {  
    97 # 
    98 # Restartability checks. Expects LONG and SHORT run directories 
    99 # Compares end of LONG stat files with equivalent entries from the SHORT stat files. 
    100 # 
    101   vdir=$1 
    102   nam=$2 
    103   pass=$3 
    104 # 
    105   if [ -d $vdir/$nam ]; then 
    106     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    107     dorv=`echo $dorv | sed -e 's:.*/::'` 
     48    # run restartibility test 
    10849    f1o=$vdir/$nam/$mach/$dorv/LONG/ocean.output 
    10950    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat 
     
    13374        fi 
    13475      else 
    135         printf "%-27s %s %s\n" $nam  " run.stat    restartability  FAILED : " $dorv  
     76        get_ktdiff f1.tmp$$ $f2s 
     77        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " run.stat    restartability  FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
    13678# 
    13779# Offer view of differences on the second pass 
     
    162104        fi 
    163105      else 
    164         printf "%-27s %s %s\n" $nam  " tracer.stat restartability  FAILED : " $dorv  
     106        get_ktdiff f1.tmp$$ $f2t 
     107        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat    restartability  FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
    165108# 
    166109# Offer view of differences on the second pass 
     
    196139  pass=$3 
    197140# 
    198   if [ -d $vdir/$nam ]; then 
    199     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    200     dorv=`echo $dorv | sed -e 's:.*/::'` 
     141# get $dorv 
     142  get_dorv 
     143# 
     144# check if directory is here 
     145  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     146    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv 
     147    return 
     148  fi 
     149# 
     150  if [ -d $vdir/$nam/$mach/$dorv ]; then 
     151    # check ocean output 
     152    runtest $vdir $nam $pass REPRO 
     153    # 
     154    # check reproducibility 
    201155    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 ` 
    202156    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -1l` 
     
    226180        fi 
    227181      else 
    228         printf "%-27s %s %s\n" $nam  " run.stat    reproducibility FAILED : " $dorv  
     182        get_ktdiff $f1s $f2s 
     183        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " run.stat    reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
    229184# 
    230185# Offer view of differences on the second pass 
     
    252207        fi 
    253208      else 
    254         printf "%-27s %s %s\n" $nam  " tracer.stat reproducibility  FAILED : " $dorv 
     209        get_ktdiff $f1t $f2t 
     210        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat    reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
    255211# 
    256212# Offer view of differences on the second pass 
     
    275231  fi 
    276232} 
     233function runcmpres(){ 
     234# 
     235# compare *.stat file with reference file from a previous sette test or previous version 
     236# store in NEMO_VALID_REF at revision NEMO_REV_REF 
     237# Compares end of stat files from each 
     238# 
     239  vdir=$1 
     240  nam=$2 
     241  vdirref=$3 
     242  dorvref=$4 
     243  pass=$5 
     244# 
     245# get $dorv 
     246  get_dorv 
     247# 
     248# check if reference directory is present 
     249  if [ ! -d $vdirref/$nam/$mach/$dorvref ]; then 
     250    printf "%-27s %s\n" $nam " REFERENCE directory at $dorvref is MISSING" 
     251    return 
     252  fi 
     253  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     254    printf "%-27s %s\n" $nam " VALID     directory at $dorv is MISSING" 
     255    return 
     256  fi 
     257 
     258# 
     259  if [ -d $vdir/$nam/$mach/$dorv ]; then 
     260    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat 
     261    f1t=$vdir/$nam/$mach/$dorv/LONG/tracer.stat 
     262    f2s=$vdirref/$nam/$mach/$dorvref/LONG/run.stat 
     263    f2t=$vdirref/$nam/$mach/$dorvref/LONG/tracer.stat 
     264    if  [ ! -f $f1s ] && [ ! -f $f1t ] ; then 
     265      printf "%-20s %s\n" $nam " incomplete test"; 
     266      return; 
     267    fi 
     268    if  [ ! -f $f2s ] && [ ! -f $f2t ] ; then 
     269      printf "%-20s %s\n" $nam " incomplete test"; 
     270      return; 
     271    fi 
     272# 
     273    done_oce=0 
     274 
     275    if  [ -f $f1s ] && [ -f $f2s ] ; then 
     276      cmp -s $f1s $f2s 
     277      if [ $? == 0 ]; then 
     278        if [ $pass == 0 ]; then 
     279          printf "%-20s %s %s\n" $nam  " run.stat    files are identical " 
     280        fi 
     281      else 
     282        printf "%-20s %s %s\n" $nam  " run.stat    files are DIFFERENT " 
     283# 
     284# Offer view of differences on the second pass 
     285# 
     286        if [ $pass == 1 ]; then 
     287          echo "<return> to view run.stat differences" 
     288          read y 
     289          sdiff $f1s $f2s 
     290          done_oce=1 
     291          echo "<return> to continue" 
     292          read y 
     293        fi 
     294      fi 
     295    fi 
     296    # Check tracer.stat files (if they exist) 
     297# 
     298    if  [ -f $f1t ] && [ -f $f2t ] ; then 
     299      cmp -s $f1t $f2t 
     300      if [ $? == 0 ]; then 
     301        if [ $pass == 0 ]; then           
     302          printf "%-20s %s %s\n" $nam  " tracer.stat files are identical " 
     303        fi 
     304      else 
     305        printf "%-20s %s %s\n" $nam  " tracer.stat files are DIFFERENT " 
     306# 
     307# Offer view of differences on the second pass 
     308# 
     309        if [ $pass == 1 ]; then 
     310          echo "<return> to view tracer.stat differences" 
     311          read y 
     312          sdiff $f1t $f2t 
     313        fi 
     314      fi 
     315    fi 
     316  fi 
     317} 
    277318 
    278319function runtest(){ 
     
    284325  nam=$2 
    285326  pass=$3 
    286 # 
    287   if [ -d $vdir/$nam ]; then 
    288     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    289     dorv=`echo $dorv | sed -e 's:.*/::'` 
    290     rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep LONG | head -1 ` 
    291     if  [  -z $rep1 ] ; then 
    292       # Not all configurations test restartability (LONG/SHORT);  
    293       # check for a reproducibility directory instead (REPRO) 
    294       rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | head -1 ` 
    295     fi 
    296     f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output 
    297     if  [ ! -f $f1o ] ; then 
    298       printf "%-27s %s %s\n" $nam " ocean.output is MISSING            : " $dorv 
    299       return; 
    300     else  
    301       nerr=`grep 'E R R O R' $f1o | wc -l` 
    302       if [[ $nerr > 0 ]]; then 
    303         printf "%-27s %s %s\n" $nam " run FAILED : " $dorv 
    304         if [ $pass == 1 ]; then 
    305           echo "<return> to view end of ocean.output" 
    306           read y 
    307           tail -100 $f1o 
    308           echo '' 
    309           echo "full ocean.output available here: $f1o" 
    310         fi 
    311       fi 
    312     fi 
     327  ttype=$4 
     328  [[ $ttype == 'RST' ]] && ttype="LONG|SHORT" 
     329# 
     330# get $dorv 
     331  get_dorv 
     332# 
     333# no print needed if the repository is not here (already catch before) 
     334# 
     335  if [ -d $vdir/$nam/$mach/$dorv/ ]; then 
     336    # 
     337    # apply check for all ttype directory 
     338    rep1=$(ls -rt $vdir/$nam/$mach/$dorv/ | grep -E $ttype) 
     339    for tdir in $rep1 ; do 
     340       f1o=$vdir/$nam/$mach/$dorv/$tdir/ocean.output 
     341       if  [ ! -f $f1o ] ; then 
     342          if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam " ocean.output               MISSING : " $dorv ; fi 
     343          return; 
     344       else  
     345          nerr=`grep 'E R R O R' $f1o | wc -l` 
     346          if [[ $nerr > 0 ]]; then 
     347             printf "\e[38;5;196m%-27s %s %s %s\e[0m\n" $nam " run                         FAILED : " $dorv " ( E R R O R in ocean.output) "  
     348             if [ $pass == 1 ]; then 
     349                echo "<return> to view end of ocean.output" 
     350                read y 
     351                tail -100 $f1o 
     352                echo '' 
     353                echo "full ocean.output available here: $f1o" 
     354             fi 
     355             return; 
     356          fi 
     357       fi 
     358    done 
    313359  else 
    314     printf "%-27s %s %s\n" $nam  " directory is MISSING               : " $dorv 
     360    if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv ; fi 
    315361  fi 
    316362} 
     
    352398        fi 
    353399      else 
    354         printf "%-5s %s %-5s %s %s %s\n" $rep1 "AGRIF vs" $rep2 "NOAGRIF run.stat    changed  -     FAILED : " $dorv1 $dorv2 
     400        get_ktdiff $f1s $f2s 
     401        printf "\e[38;5;196m%-5s %s %-5s %s %s %s %s %-5s %s\e[0m\n" $rep1 "AGRIF vs" $rep2 "NOAGRIF run.stat    changed  -     FAILED : " $dorv1 $dorv2 " (results are different after " $ktdiff " time steps)" 
    355402# 
    356403# Offer view of differences on the second pass 
     
    376423######################################################################################### 
    377424# 
    378   mach=`grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'` 
    379   NEMO_VALID=`grep "NEMO_VALIDATION_DIR=" ./param.cfg | sed -e 's/NEMO_VALIDATION_DIR=//'` 
    380   NEMO_VALID=`eval "echo $NEMO_VALID"` 
     425# LOAD param variable (COMPILER, NEMO_VALIDATION_DIR, SVN_CMD) 
     426  SETTE_DIR=$(cd $(dirname "$0"); pwd) 
     427  MAIN_DIR=$(dirname $SETTE_DIR) 
     428  . ./param.cfg 
     429 
     430  mach=${COMPILER} 
     431  NEMO_VALID=${NEMO_VALIDATION_DIR} 
     432  NEMO_VALID_REF=${NEMO_VALIDATION_REF} 
     433  LANG=en_US 
    381434# 
    382435  if [ ! -d $NEMO_VALID ]; then 
     
    386439# 
    387440# Directory to run the tests 
    388   SETTE_DIR=$(cd $(dirname "$0"); pwd) 
    389   MAIN_DIR=${SETTE_DIR}/.. 
    390441  CONFIG_DIR0=${MAIN_DIR}/cfgs 
    391442  TOOLS_DIR=${MAIN_DIR}/tools 
     
    395446# Show current revision tag and branch name 
    396447# 
    397 cmd="svn" 
    398 [ ! -d "$MAIN_DIR/.svn" ] && cmd="git $cmd" 
    399 echo $cmd  
    400 echo "$MAIN_DIR/.svn" 
    401 lastchange=`$cmd info ${MAIN_DIR} | grep -i "Last Changed Rev:" | sed -e "s/ //g" | cut -d ":" -f 2` 
    402 revision=`$cmd info | grep Revision | cut -d ":" -f 2 | tr -d ' '` 
    403 branchname=`$cmd info | grep URL | rev | cut -d "/" -f 3 | rev` 
    404 echo "SETTE validation report : $branchname @ r$revision  ( last change @ r$lastchange )" 
     448echo "" 
     449lastchange=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'` 
     450revision=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'` 
     451branchname=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'` 
     452echo "Current code is : $branchname @ r$revision  ( last change @ r$lastchange )" 
     453[ `${SVN_CMD} status -q ${MAIN_DIR}/{cfg,tests,src} | wc -l` -ge 1 ] && lastchange=${lastchange}+ 
     454 
     455# overwrite revision is argument 1 present 
     456[[ $# -eq 1 ]] && lastchange=$1 
     457 
     458echo "" 
     459echo "SETTE validation report generated for : " 
     460echo "" 
     461echo "       $branchname @ r$lastchange (last changed revision)" 
     462echo "" 
     463echo "       on $COMPILER arch file" 
     464echo "" 
     465 
    405466# 
    406467# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 
     
    419480# 
    420481 
    421 # Rebuild and restartability test for SAS 
    422 # clem: not needed anymore 
    423 # for restart_file in WORCA2_SAS_ICE_ST 
    424 # do 
    425 #   restfile $NEMO_VALID $restart_file $pass 
    426 # done 
    427 # 
    428482# Restartability test 
    429483 echo "" 
     
    432486 do 
    433487   resttest $NEMO_VALID $restart_test $pass 
    434    runtest $NEMO_VALID $restart_test $pass 
    435488 done 
    436489# 
     
    441494 do 
    442495   reprotest $NEMO_VALID $repro_test $pass 
    443    runtest $NEMO_VALID $repro_test $pass 
    444496 done 
    445497 
     
    450502 dir2=WAGRIF_DEMO_ST 
    451503 identictest $NEMO_VALID $dir1 $dir2 $pass  
    452  
     504# 
     505# before/after tests 
     506 if [ $lastchange == 'old' ] ; then 
     507    echo "" 
     508    echo "   !---- 'old' specified as revision => no comparison with reference results ----!   " 
     509    echo "" 
     510 else 
     511   echo "" 
     512   echo "   !----result comparison check----!   " 
     513   if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ]; then 
     514     echo '' 
     515     echo 'check result differences between :' 
     516     echo "VALID directory : $NEMO_VALID at rev $lastchange" 
     517     echo 'and' 
     518     echo "REFERENCE directory : $NEMO_VALID_REF at rev $NEMO_REV_REF" 
     519     echo '' 
     520     for repro_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WISOMIP_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WVORTEX_ST WICE_AGRIF_ST 
     521     do 
     522       runcmpres $NEMO_VALID $repro_test $NEMO_VALID_REF $NEMO_REV_REF $pass 
     523     done 
     524   else 
     525     echo '' 
     526     echo ' No path for comparison specified. Result are not compare with any other revision. ' 
     527     echo ' To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg. ' 
     528     echo '' 
     529   fi 
     530 fi 
    453531done 
    454532# 
    455  
    456533exit 
  • utils/CI/sette/sette_test-cases.sh

    r10575 r11161  
    1212# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    1313# ---------------------------------------------------------------------- 
    14 # 
    1514# 
    1615############################################################# 
     
    6968#                       in sette_test-cases.sh. (each test in executed in its own directory) 
    7069# 
     70#  set_valid_dir       : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report  
     71# 
     72#  clean_valid_dir    : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report  
     73#                       ( not doing it could lead to false positive ) 
     74# 
    7175#  prepare_job.sh     : to generate the script run_job.sh 
    7276# 
     
    9094######################################################################################### 
    9195# 
    92 # Compiler among those in NEMOGCM/ARCH 
    93 COMPILER=X64_ADA 
    94  
    95 export BATCH_COMMAND_PAR="llsubmit" 
    96 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 
     96# LOAD param value 
     97SETTE_DIR=$(cd $(dirname "$0"); pwd) 
     98MAIN_DIR=$(dirname $SETTE_DIR) 
     99. ./param.cfg 
     100 
     101export BATCH_COMMAND_PAR=${BATCH_CMD} 
     102export BATCH_COMMAND_SEQ=${BATCH_CMD} 
    97103export INTERACT_FLAG="no" 
    98104export MPIRUN_FLAG="yes" 
    99 export USING_XIOS="yes" 
    100105# 
    101106export DEL_KEYS="key_iomput" 
     
    105110fi 
    106111# 
     112export ADD_KEYS="" 
     113if [ ${ADD_NOSIGNEDZERO} == "yes" ] 
     114 then 
     115   export ADD_KEYS="key_nosignedzero" 
     116fi 
     117# 
    107118# Settings which control the use of stand alone servers (only relevant if using xios) 
    108119# 
    109 export USING_MPMD="no" 
    110120export NUM_XIOSERVERS=4 
    111 export JOB_PREFIX=batch-mpmd 
     121export JOB_PREFIX=${JOB_PREFIX_MPMD} 
    112122# 
    113123if [ ${USING_MPMD} == "no" ]  
    114124 then 
    115125   export NUM_XIOSERVERS=0 
    116    export JOB_PREFIX=batch 
     126   export JOB_PREFIX=${JOB_PREFIX_NOMPMD} 
    117127fi 
    118128# 
    119129# 
    120 if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"] 
     130if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ] 
    121131 then 
    122132   echo "Incompatible choices. MPMD mode requires the XIOS server" 
     
    125135 
    126136# Directory to run the tests 
    127 SETTE_DIR=$(cd $(dirname "$0"); pwd) 
    128 MAIN_DIR=$(dirname $SETTE_DIR) 
    129137CONFIG_DIR0=${MAIN_DIR}/cfgs 
    130138TOOLS_DIR=${MAIN_DIR}/tools 
     
    135143cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit 
    136144# Description of configuration tested: 
    137 # OVERFLOW       : TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs  
    138 #                                        & (dynamics) advection schemes: flux form (ubs, centered), vector form (een) 
    139 #                          zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs 
    140 #                                        & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction) 
    141 # LOCK_EXCHANGE  : 2 
    142 # VORTEX         : 3 
    143 # ICE_AGRIF      : 4 
    144 # ISOMIP         : 5 
     145# OVERFLOW       : TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs  
     146#                                     & (dynamics) advection schemes: flux form (ubs, centered), vector form (een) 
     147#                       zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs 
     148#                                     & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction) 
     149# LOCK_EXCHANGE  :  
     150# VORTEX         :  
     151# ICE_AGRIF      :  
     152# ISOMIP         :  
    145153# WAD 
    146154 
    147155 
    148 for config in 1 2 3 4 5  
     156for config in ${TEST_CONFIGS} 
    149157do 
    150158 
     
    152160#  OVERFLOW 
    153161# --------- 
    154 if [ ${config} -eq 1 ] ;  then 
     162if [ ${config} == "OVERFLOW" ] ;  then 
    155163    ## Restartability tests for OVERFLOW 
    156164    export TEST_NAME="LONG" 
    157165    cd ${MAIN_DIR} 
    158     . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 del_key ${DEL_KEYS} 
     166    . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key ${ADD_KEYS} del_key ${DEL_KEYS} 
    159167    cd ${SETTE_DIR} 
    160168    . ./param.cfg 
    161169    . ./all_functions.sh 
    162170    . ./prepare_exe_dir.sh 
     171    set_valid_dir 
     172    clean_valid_dir 
    163173    JOB_FILE=${EXE_DIR}/run_job.sh 
    164174    NPROC=1 
     
    178188    fi 
    179189    cd ${SETTE_DIR} 
    180     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     190    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    181191 
    182192    cd ${SETTE_DIR} 
    183193    export TEST_NAME="SHORT" 
    184194    . ./prepare_exe_dir.sh 
     195    set_valid_dir 
     196    clean_valid_dir 
    185197    cd ${EXE_DIR} 
    186198    set_namelist namelist_cfg cn_exp \"OVF_SHORT\" 
     
    202214 
    203215    cd ${SETTE_DIR} 
    204     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     216    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    205217    cd ${SETTE_DIR} 
    206218    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    221233        . ./all_functions.sh 
    222234        . ./prepare_exe_dir.sh 
     235        set_valid_dir 
     236        clean_valid_dir 
    223237        JOB_FILE=${EXE_DIR}/run_job.sh 
    224238        NPROC=1 
     
    233247        fi 
    234248        cd ${SETTE_DIR} 
    235         . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     249        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    236250        cd ${SETTE_DIR} 
    237251        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    243257#  LOCK_EXCHANGE 
    244258# -------------- 
    245 if [ ${config} -eq 2 ] ;  then 
     259if [ ${config} == "LOCK_EXCHANGE" ] ;  then 
    246260    ## Restartability tests for LOCK_EXCHANGE 
    247261    export TEST_NAME="LONG" 
    248262    cd ${MAIN_DIR} 
    249     . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 del_key ${DEL_KEYS} 
     263    . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key ${ADD_KEYS} del_key ${DEL_KEYS} 
    250264    cd ${SETTE_DIR} 
    251265    . ./param.cfg 
    252266    . ./all_functions.sh 
    253267    . ./prepare_exe_dir.sh 
     268    set_valid_dir 
     269    clean_valid_dir 
    254270    JOB_FILE=${EXE_DIR}/run_job.sh 
    255271    NPROC=1 
     
    269285    fi 
    270286    cd ${SETTE_DIR} 
    271     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     287    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    272288 
    273289    cd ${SETTE_DIR} 
    274290    export TEST_NAME="SHORT" 
    275291    . ./prepare_exe_dir.sh 
     292    set_valid_dir 
     293    clean_valid_dir 
    276294    cd ${EXE_DIR} 
    277295    set_namelist namelist_cfg cn_exp \"LOCK_SHORT\" 
     
    293311 
    294312    cd ${SETTE_DIR} 
    295     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     313    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    296314    cd ${SETTE_DIR} 
    297315    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    312330        . ./all_functions.sh 
    313331        . ./prepare_exe_dir.sh 
     332        set_valid_dir 
     333        clean_valid_dir 
    314334        JOB_FILE=${EXE_DIR}/run_job.sh 
    315335        NPROC=1 
     
    324344        fi 
    325345        cd ${SETTE_DIR} 
    326         . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     346        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    327347        cd ${SETTE_DIR} 
    328348        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    335355# VORTEX 
    336356# --------- 
    337 if [ ${config} -eq 3 ] ;  then  
     357if [ ${config} == "VORTEX" ] ;  then  
    338358## Restartability tests for VORTEX 
    339359    export TEST_NAME="LONG" 
    340360    cd ${MAIN_DIR} 
    341     . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  del_key ${DEL_KEYS} 
     361    . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  add_key ${ADD_KEYS} del_key ${DEL_KEYS} 
    342362    cd ${SETTE_DIR} 
    343363    . ./param.cfg 
    344364    . ./all_functions.sh 
    345365    . ./prepare_exe_dir.sh 
     366    set_valid_dir 
     367    clean_valid_dir 
    346368    JOB_FILE=${EXE_DIR}/run_job.sh 
    347369    NPROC=6 
     
    370392    fi 
    371393    cd ${SETTE_DIR} 
    372     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     394    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    373395     
    374396    cd ${SETTE_DIR} 
    375397    export TEST_NAME="SHORT" 
    376398    . ./prepare_exe_dir.sh 
     399    set_valid_dir 
     400    clean_valid_dir 
    377401    cd ${EXE_DIR} 
    378402    set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\" 
     
    415439    fi 
    416440    cd ${SETTE_DIR} 
    417     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     441    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    418442    cd ${SETTE_DIR} 
    419443    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    426450    . ./all_functions.sh 
    427451    . ./prepare_exe_dir.sh 
     452    set_valid_dir 
     453    clean_valid_dir 
    428454    JOB_FILE=${EXE_DIR}/run_job.sh 
    429455    NPROC=6 
     
    456482    fi 
    457483    cd ${SETTE_DIR} 
    458     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     484    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    459485    cd ${SETTE_DIR} 
    460486    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    463489    export TEST_NAME="REPRO_3_2" 
    464490    . ./prepare_exe_dir.sh 
     491    set_valid_dir 
     492    clean_valid_dir 
    465493    JOB_FILE=${EXE_DIR}/run_job.sh 
    466494    NPROC=6 
     
    494522    fi 
    495523    cd ${SETTE_DIR} 
    496     . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     524    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    497525    cd ${SETTE_DIR} 
    498526    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    504532# ICE_AGRIF 
    505533# --------- 
    506 if [ ${config} -eq 4 ] ;  then  
     534if [ ${config} == "ICE_AGRIF" ] ;  then  
    507535## Restartability tests for ICE_AGRIF 
    508536    export TEST_NAME="LONG" 
    509537    cd ${MAIN_DIR} 
    510     . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  del_key ${DEL_KEYS} 
     538    . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  add_key ${ADD_KEYS} del_key ${DEL_KEYS} 
    511539    cd ${SETTE_DIR} 
    512540    . ./param.cfg 
    513541    . ./all_functions.sh 
    514542    . ./prepare_exe_dir.sh 
     543    set_valid_dir 
     544    clean_valid_dir 
    515545    JOB_FILE=${EXE_DIR}/run_job.sh 
    516546    NPROC=6 
     
    539569    fi 
    540570    cd ${SETTE_DIR} 
    541     . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     571    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    542572     
    543573    cd ${SETTE_DIR} 
    544574    export TEST_NAME="SHORT" 
    545575    . ./prepare_exe_dir.sh 
     576    set_valid_dir 
     577    clean_valid_dir 
    546578    cd ${EXE_DIR} 
    547579    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_SHORT\" 
     
    592624 
    593625    cd ${SETTE_DIR} 
    594     . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     626    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    595627    cd ${SETTE_DIR} 
    596628    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    604636    . ./all_functions.sh 
    605637    . ./prepare_exe_dir.sh 
     638    set_valid_dir 
     639    clean_valid_dir 
    606640    JOB_FILE=${EXE_DIR}/run_job.sh 
    607641    NPROC=6 
     
    634668    fi 
    635669    cd ${SETTE_DIR} 
    636     . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     670    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    637671    cd ${SETTE_DIR} 
    638672    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    641675    export TEST_NAME="REPRO_3_2" 
    642676    . ./prepare_exe_dir.sh 
     677    set_valid_dir 
     678    clean_valid_dir 
    643679    JOB_FILE=${EXE_DIR}/run_job.sh 
    644680    NPROC=6 
     
    672708    fi 
    673709    cd ${SETTE_DIR} 
    674     . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     710    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    675711    cd ${SETTE_DIR} 
    676712    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    681717# ISOMIP 
    682718# ------ 
    683 if [ ${config} -eq 5 ] ;  then 
     719if [ ${config} == "ISOMIP" ] ;  then 
    684720## Restartability tests 
    685721    export TEST_NAME="LONG" 
    686722    cd ${MAIN_DIR} 
    687     . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -a ISOMIP -j 8 del_key ${DEL_KEYS} 
     723    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -a ISOMIP -j 8 add_key ${ADD_KEYS} del_key ${DEL_KEYS} 
    688724    cd ${SETTE_DIR} 
    689725    . ./param.cfg 
    690726    . ./all_functions.sh 
    691727    . ./prepare_exe_dir.sh 
     728    set_valid_dir 
     729    clean_valid_dir 
    692730    JOB_FILE=${EXE_DIR}/run_job.sh 
    693731    NPROC=15 
     
    709747    fi 
    710748    cd ${SETTE_DIR} 
    711     . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     749    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    712750 
    713751    cd ${SETTE_DIR} 
    714752    export TEST_NAME="SHORT" 
    715753    . ./prepare_exe_dir.sh 
     754    set_valid_dir 
     755    clean_valid_dir 
    716756    cd ${EXE_DIR} 
    717757    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\" 
     
    739779 
    740780    cd ${SETTE_DIR} 
    741     . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     781    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    742782    cd ${SETTE_DIR} 
    743783    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    750790    . ./all_functions.sh 
    751791    . ./prepare_exe_dir.sh 
     792    set_valid_dir 
     793    clean_valid_dir 
    752794    JOB_FILE=${EXE_DIR}/run_job.sh 
    753795    NPROC=21 
     
    768810    fi 
    769811    cd ${SETTE_DIR} 
    770     . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     812    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    771813    cd ${SETTE_DIR} 
    772814    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    775817    export TEST_NAME="REPRO_8_4" 
    776818    . ./prepare_exe_dir.sh 
     819    set_valid_dir 
     820    clean_valid_dir 
    777821    JOB_FILE=${EXE_DIR}/run_job.sh 
    778822    NPROC=32 
     
    793837    fi 
    794838    cd ${SETTE_DIR} 
    795     . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     839    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} 
    796840    cd ${SETTE_DIR} 
    797841    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
Note: See TracChangeset for help on using the changeset viewer.