New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10819 – NEMO

Changeset 10819


Ignore:
Timestamp:
2019-04-01T15:10:17+02:00 (6 years ago)
Author:
mathiot
Message:

update README and add comments in param.cfg (ticket #2239)

Location:
NEMO/branches/2019/fix_sette_ticket2239
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_sette_ticket2239/README

    r10769 r10819  
    11usage of SETTE package: 
    22 
     3INSTALLATION: 
     4The sette directory have to be located in the main directory (at the same level as src/ or cfg/). 
     5 
    36PRINCIPAL SCRIPT: sette.sh  
    4  * sette.sh is a simple wrapper running test on the reference configuration, test cases and generate the report at the end. 
    5  * sette.sh is able to take a list of configuration in argument (sette.sh -t "CFG1 CFG2 CFG3"). The list of available configurations is available in running ./sette_list_avail_cfg.sh. 
    6    The default for sette is to run all of the reference and test configurations. 
    7  * User need to set up the param.cfg file correctly and download input file before running the script. 
     7 * sette.sh is a simple wrapper that runs tests on the reference configurations, test cases and generates the report at the end. 
     8 * sette.sh is able to take a list of configurations in argument (sette.sh -t "CFG1 CFG2 CFG3").  
     9       - The list of available configurations is available in running ./sette_list_avail_cfg.sh. 
     10       - The default for sette is to run all of the reference and test configurations. 
     11 * Users need to set up the param.cfg file correctly and download input files before running the script. 
    812 
    913SECONDARY SCRIPT 
    1014 * sette_reference-configuration.sh: run sette tests on the reference configurations 
    1115 * sette_test-cases.sh             : run sette tests on test cases 
    12  * sette_rpt.sh                    : generate the sette report on reproducibility, restartability and compare result with a reference (if there is one specified in param.cfg).  
    13                                      See below in USER MODIFICATIONS the usage of the script 
    14  * sette_list_avail_rev.sh         : generate a listing on all the revision available in the validation directory for each configuration. 
     16 * sette_list_avail_rev.sh         : generate a listing on all the revisions available in the validation directory for each configuration. 
    1517 * sette_list_avail_cfg.sh         : generate a listing of all the available configurations. 
    1618 
    17 VERY IMPORTANT : for a verbose debug do: 
    18 ./sette.sh 2>&1 | tee out.sette 
    19 this create out.sette file in ${SETTE_DIR} 
    20  
    21 USER MODIFICATIONS 
    22  * in sette_reference-configuration.sh and sette_test-cases.sh script : 
    23                OPTIONAL ARGUMENT : compiler among those available in NEMOGCM/ARCH (if nothing will use the one specified in paramd.cfg) 
    24           BATCH_COMMAND_PAR : command for job submission in batch mode parallel (MMIÂ) specified in param.cfg 
    25           BATCH_COMMAND_SEQ : command for job submission in batch mode sequential (NB_PROC = 1) 
    26                                    default value is the BATCH_COMMAND_PAR value 
    27           INTERACT_FLAG : "yes" if you want to run in interactive mode  
    28                       "no" if you want to run in batch mode 
    29           MPIRUN_FLAG   : "yes" if you want to run in parallel (MPI) 
    30                 "no" if you want to run in sequential mode (NB_PROC = 1) 
    31  
    32                makenemo -m : machine (compilator); see ./makenemo -m help (in NEMOGCM/CONFIG directory) 
    33                         -n : config name (in examples config_name_nproci_nprocj), see ./makenemo -n help 
    34                         -r : reference configuration (if you don't give it you have to choise directories to install) 
    35                         add_key : to add list of keys 
    36                         del_key : to del list of keys 
    37                and for more details and options of makenemo see ./makenemo -h 
    38  
    39           set_namelist : to set namelist values  
    40          (example : to set 75 time steps for one test : namelist nn_itend 75) 
    41          (        : to change cn_icerst_in name : namelist_ice cn_icerst_in  \"test_00101231_restart_icemod\") 
    42          (      : to activate control print : namelist ln_ctl false ) 
    43           prepare_exe_dir.sh creates execution directory for each test 
    44                     : NOTE for EACH JOB EXECUTION it is needed to set TEST_NAME variable 
    45                 TEST_NAME variable gives name to execution directory (created in prepare_exe_dir.sh) 
    46                 IT is mandatory to have different TEST_NAME for each job run if not existing files are re-written (for example namelist) 
    47  
    48                prepare_job.sh generates the script to be executed  
    49          input: INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPIRUN_FLAG JOB_FILE 
    50  
    51                fcm_job.sh needs input: TOTAL_NUMBER_OF_PROCS_used JOB_FILE_NAME INTERACT_FLAG MPIRUN_FLAG  
    52          (for example if you run with 4 procs JOB_FILE batch parallel  
    53          and only run short test ===> ./fcm_job 4 SHORT no    yes   ) 
    54  
     19USER SETUP (recommended) 
    5520 * in param.cfg : 
     21      - variables (COMPILER, NEMO_VALIDATION_REF, NEMO_REV_REF) have to be specified in param.cfg 
     22      - variables (BATCH_CMD, BATCH_STAT, BATCH_NAME, FORCING_DIR, SVN_CMD, ADD_NOSIGNEDZERO) 
     23           can be exported from your shell startup files. It is advise to setup the default value in your startup file if it doesn't fit your need. 
     24           If you prefer not doing so, you need to update the default initialisation 
     25      - variable NEMO_VALIDATION_DIR is sette by default in MAIN_DIR/NEMO_VALIDATION (this is to avoid overwritting results when running sette on different branches). 
     26      - description of variables listed in param.cfg: 
    5627               COMPILER            : compiler among those available in NEMOGCM/ARCH 
    57                FORCING_DIR       : directory in which will be found input.tar file (same name in input_CONFIG_NAME.cfg) 
    58                INPUT_DIR         : directory in which store input files (tar file) 
    59                                      reference configuration input tar file could be found here : https://zenodo.org/record/1472245 
    60                TEST_CONFIGS        : the list of all the configuration to test in sette.sh (without any arguments) 
    61                TMPDIR            : temporary directory NEEDED ONLY FOR IBM machines (put EXP00 directory) 
    62           NEMO_VALIDATION_DIR : directory in which create NEMO_VALIDATION tree, and store restart, run.stat, tracer.stat and ocean.output files in 
    63                             tree NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
    64                BATCH_CMD           : command for job submission in batch mode 
    65                SVN_CMD             : svn command use to do svn info (default svn). Could be useful if you are using git svn 
     28               # 
     29               # reference version for bit reproducibility results 
    6630               NEMO_VALIDATION_REF : reference directory 
    6731               NEMO_REV_REF        : reference revision 
    68                                      reference directory for result comparison will be NEMO_VALIDATION_REF/COMPILER/NEMO_REV_REF 
     32               # 
     33               # batch command needed 
     34               BATCH_CMD           : command for job submission in batch mode 
     35               BATCH_STAT          : command to check job status 
     36               BATCH_NAME          : generic sette job name (as it appears with $BATCH_STAT command) 
     37               # 
     38               # file storing 
     39               FORCING_DIR         : directory in which will be found input.tar file (same name in input_CONFIG_NAME.cfg) 
     40                                     reference configuration input tar file could be found here : https://zenodo.org/record/1472245 
     41               NEMO_VALIDATION_DIR : directory in which will be stored restart, run.stat, tracer.stat and ocean.output files for each configuration 
     42                                     ( NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) ) 
     43               INPUT_DIR           : directory in which store input files (DO NOT CHANGE IT) 
     44               # 
     45               # misc. 
     46               SVN_CMD             : svn command use to do svn info (default svn). Could be useful if you are using git svn 
     47                                   : Reference directory for result comparison will be NEMO_VALIDATION_REF/COMPILER/NEMO_REV_REF 
    6948               ADD_NODIGNEDZERO    : set "yes" if you need key_nosignedzero to run nemo 
    70                As a lot of this settings are user dependent or computer dependant, it is possible to set by default most of these value in your .bashrc  
    71                (it facilitates the installation of sette for a new branch) 
    7249 
    73  * in fcm_job.sh : 
    74                IMPORTANT : control that name of tar file in FORCING directory 
    75                is the same of that in input_REF_CONFIG.cfg, if not change one. 
     50USAGE of main scripts: 
     51 * sette.sh                : it is a simple wrapper to run tests on the reference configurations, test-cases and generate the report at the end. 
     52          - if no argument is given, sette run all the reference configurations and test cases  
     53          - if a list of argument is provided (sette.sh -t "CFG1 CFG2 CFG3"), sette will only run these configurations.  
     54             The list of available configurations is available in running ./sette_list_avail_cfg.sh. 
     55          - user need to set up the param.cfg file correctly and download input file before running the script. 
     56 * sette_rpt.sh            : it generates the sette report. 
     57          - if no argument is given, the report will be generated on the last changed revision. 
     58          - if an argument is given (revision number) the report will be generated for this revision only 
     59          - if 'old' is given as argument the former behavior is applied (the latest revision is check whatever the current revision 
     60          - it is possible to retreive all the available revision test using sette_list_avail_rev.sh 
     61          - it is NOT possible to run sette_rpt.sh for a single configuration. 
     62 * sette_list_avail_rev.sh : generate a listing on all the revisions available in the validation directory for each configuration. 
     63          - no argument needed 
     64 * sette_list_avail_cfg.sh : generate a listing of all the available configurations. 
     65          - no argument needed 
    7666 
    77                change in "RUN OPA" if [ ${INTERACT_FLAG} == "yes" ] mpirun command line (some examples are already written) 
    78           NOTE: if INTERACT_FLAG="no" it is needed a batch_file (see below to create a new one) 
    79  
    80  * in sette_rpt.sh : - if no argument are given, the report will be generated on the last changed revision. 
    81                      - if an argument is given (revision number) the report will be generated for this revision 
    82                      - if 'old' is given as argument the former behavior is applied (the latest revision is check whatever the current revision 
    83                      - it is possible to retreive all the available revision test using sette_list_avail_rev.sh 
    84  
    85 NOTE: 
    86 in case of error you can remove you NEW_CONF directory and all files doing : 
    87 ./makenemo -n MY_CONFIG clean_config 
    88  
    89 if you want recompile nemo but before you want to clean compiled code do : 
    90 ./makenemo clean 
    91  
    92 and if you have already compiled you can re-run all sette.sh and compilation part will be by-passed. 
    93  
    94 NOTE 2:  
    95 if you want a completly verbose makenemo you can uncomment "set -x" in makenemo script 
    96 and then launch ./sette.sh 2>&1 | tee out.sette 
     67NOTES: 
     68 * compilation issues: 
     69   - in case of error you can remove you NEW_CONF directory and all files doing : 
     70     ./makenemo -n MY_CONFIG clean_config 
     71   - if you want recompile nemo but before you want to clean compiled code do : 
     72     ./makenemo clean 
     73   - if you have already compiled you can re-run all sette.sh and compilation part will be by-passed. 
     74 * verbose sette output: 
     75   - if you want a completly verbose makenemo you can uncomment "set -x" in makenemo script 
     76     and then launch ./sette.sh 2>&1 | tee out.sette . This creates out.sette file in ${SETTE_DIR} 
    9777 
    9878TO ADD NEW CONFIGURATION: 
     
    100802. makenemo -n NEW_CONFIG -r REF_CONFIG (if it is based on another reference configuration) 
    101813. for fcm_job.sh creates a new input_NEW_CONFIG.cfg if you need tar file (if you use same tar file of GYRE, ORCA2_LIM or ORCA2_LIM_PISCES you can use it) 
     824. add a bloc in one of the sette_reference-configuration.sh or sette_test-cases.sh script  
     835. add your configuration to the list in param.cfg 
    10284 
    10385TO ADD NEW MACHINE: 
     
    110922. create you own batch file like: batch-${COMPILER} 
    11193   (note: sette_test-cases.sh and sette_cfg-ref.sh will copy it in job_batch_template if you run tests in INTERACT_FLAG="no") 
     94 
     95 
     96 
     97 
     98 
     99USER MODIFICATIONS (sequential/parrallel (default), interacive or not (default) and mpi (default) or not ) 
     100 * in sette_cfg-ref.sh and sette_test-cases.sh script : 
     101     - BATCH_COMMAND_PAR is the command for job submission in batch mode parallel (MMIÂ) specified in param.cfg 
     102     - BATCH_COMMAND_SEQ is the command for job submission in batch mode sequential (NB_PROC = 1) 
     103                                 the default value is the BATCH_COMMAND_PAR value 
     104          - INTERACT_FLAG : "yes" if you want to run in interactive mode  
     105                            "no"  if you want to run in batch mode (default)      
     106     - MPIRUN_FLAG   : "yes" if you want to run in parallel (MPI) (default) 
     107                  "no"  if you want to run in sequential mode (NB_PROC = 1) 
     108 
     109USAGE of internal function/script 
     110 * makenemo -m : machine (compilator); see ./makenemo -m help (in NEMOGCM/CONFIG directory) 
     111            -n : config name (in examples config_name_nproci_nprocj), see ./makenemo -n help 
     112            -r : reference configuration (if you don't give it you have to choise directories to install) 
     113       add_key : to add list of keys 
     114       del_key : to del list of keys 
     115       and for more details and options of makenemo see ./makenemo -h 
     116 * set_namelist       : to set namelist values 
     117                          (example : to set 75 time steps for one test : namelist nn_itend 75) 
     118                          (        : to change cn_icerst_in name : namelist_ice cn_icerst_in  \"test_00101231_restart_icemod\") 
     119                          (        : to activate control print : namelist ln_ctl false ) 
     120 * prepare_exe_dir.sh : creates execution directory for each test 
     121                          - for EACH JOB EXECUTION it is needed to set TEST_NAME variable 
     122                          - TEST_NAME variable gives name to execution directory (created in prepare_exe_dir.sh) 
     123                          - It is mandatory to have different TEST_NAME for each job run if not existing files are re-written (for example namelist) 
     124 * prepare_job.sh     : generates the script to be executed 
     125                          - input arguments are INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPIRUN_FLAG JOB_FILE 
     126 * fcm_job.sh         : input arguments are TOTAL_NUMBER_OF_PROCS_used JOB_FILE_NAME INTERACT_FLAG MPIRUN_FLAG 
     127                        (for example if you run with 4 procs JOB_FILE batch parallel 
     128                        and only run short test ===> ./fcm_job 4 SHORT no    yes   ) 
     129                          - IMPORTANT control that name of tar file in FORCING directory 
     130                            is the same of that in input_REF_CONFIG.cfg, if not change one. 
     131                          - change in "RUN OPA" if [ ${INTERACT_FLAG} == "yes" ] mpirun command line (some examples are already written) 
     132                          - if INTERACT_FLAG="no" it is needed a batch_file (see below to create a new one) 
  • NEMO/branches/2019/fix_sette_ticket2239/param.cfg

    r10769 r10819  
    1 # Computer dependant variable needed to run sette 
     1# Computer/user dependant variable needed to run sette 
    22# 
    33# Compiler among those in NEMOGCM/ARCH 
     
    99NEMO_REV_REF=0000 
    1010# 
    11 # IF SETTE_* variable mentioned below are exported from your initialisation, nothing to do 
    12 # otherwise, please update the default iniitialisation or overwrite it 
     11# ------------------------------------------------------------------------------------------ 
     12# IMPORTANT: 
     13# variables (BATCH_CMD, BATCH_STAT, BATCH_NAME, FORCING_DIR, SVN_CMD, ADD_NOSIGNEDZERO) 
     14# can be exported from your shell startup files.  
     15# If it is the case, nothing to do 
     16# otherwise, you need to update the default initialisation 
     17# 
     18# ADVISE: setup the default value in your startup file if it doesn't fit your need. 
    1319# 
    1420# BATCH command 
     
    1723# command to check job status 
    1824BATCH_STAT=${SETTE_BATCH_STAT:-llq} 
    19 # generic sette job name 
     25# generic sette job name (as it appears with $BATCH_STAT command) 
    2026BATCH_NAME=${SETTE_BATCH_NAME:-sette} 
    21 # List of test configurations 
    22 TEST_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"} 
    2327# 
    24 #- FORCING files storing 
     28# 
     29# FILES STORING 
     30# forcing files storing 
    2531FORCING_DIR=${SETTE_FORCING_DIR:-$WORKDIR/FORCING} 
     32# validation files storing 
     33NEMO_VALIDATION_DIR=${WORKDIR:-$MAIN_DIR}/NEMO_VALIDATION 
     34# input files storing (namelist, iodef ...) (DO NOT CHANGE) 
     35INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    2636# 
    27 # CMD for svn (some people use git svn)  
     37# 
     38# MISCELENIOUS 
     39# command for svn (some people use git svn)  
    2840# used in sette_rpt and in all_function to display revision and build correct repository name 
    2941SVN_CMD=${SETTE_SVN_CMD:-svn} 
    30 # 
     42# add key key_nosignedzero at the compilation step 
     43ADD_NOSIGNEDZERO=${SETTE_ADD_NOSIGNEDZERO:-"yes"} 
    3144#- only for IBM 
    3245#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    3346# 
    34 #- key_nosignedzero 
    35 ADD_NOSIGNEDZERO=${SETTE_ADD_NOSIGNEDZERO:-"yes"} 
    3647# 
    37 #- INPUT files storing 
    38 INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    39 # 
    40 #- VALIDATION files storing 
    41 NEMO_VALIDATION_DIR=${WORKDIR:-$MAIN_DIR}/NEMO_VALIDATION 
    42 # 
     48# LIST OF CONFIGURATIONS 
     49# to be updated if you added an new configuration in sette_test-cases.sh or sette_reference-configuration.sh 
     50TEST_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"} 
Note: See TracChangeset for help on using the changeset viewer.