From ac0146d61a34e3a426f8eb55a63ee3fe454fc6ce Mon Sep 17 00:00:00 2001 From: Guillaume Samson <guillaume.samson@mercator-ocean.fr> Date: Mon, 16 Jan 2023 09:07:26 +0000 Subject: [PATCH] Resolve "continuous integration tests with SETTE" --- .gitlab-ci-cnrs.yml | 27 +++ .gitlab-ci-default.yml | 15 ++ .gitlab-ci-mercator.yml | 32 +++ .gitlab-ci.yml | 180 ++++++++++++++ README.md | 2 + README.rst | 133 ----------- arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI.fcm | 3 +- ext/FCM/bin/fcm_internal | 1 + makenemo | 8 +- mk/Fmake_config.sh | 7 +- mk/Fmake_tools_bld.sh | 4 +- sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI | 16 +- .../batch-X64_BELENOS_INTEL_IMPI | 4 +- .../batch-X64_BELENOS_INTEL_OMPI | 110 +++++++++ sette/all_functions.sh | 17 +- sette/fcm_job.sh | 9 +- .../{input_AGRIF.cfg => input_AGRIF_DEMO.cfg} | 0 ...{input_SAS.cfg => input_ORCA2_SAS_ICE.cfg} | 0 sette/param.default | 6 +- sette/sette.sh | 129 +++++----- sette/sette_reference-configurations.sh | 210 ++++++++++------- sette/sette_rpt.sh | 220 ++++++++++-------- sette/sette_test-cases.sh | 87 ++++--- 23 files changed, 761 insertions(+), 459 deletions(-) create mode 100644 .gitlab-ci-cnrs.yml create mode 100644 .gitlab-ci-default.yml create mode 100644 .gitlab-ci-mercator.yml create mode 100644 .gitlab-ci.yml create mode 100644 README.md delete mode 100644 README.rst create mode 100644 sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_OMPI rename sette/{input_AGRIF.cfg => input_AGRIF_DEMO.cfg} (100%) rename sette/{input_SAS.cfg => input_ORCA2_SAS_ICE.cfg} (100%) diff --git a/.gitlab-ci-cnrs.yml b/.gitlab-ci-cnrs.yml new file mode 100644 index 00000000..186de555 --- /dev/null +++ b/.gitlab-ci-cnrs.yml @@ -0,0 +1,27 @@ +# HPC & configs lists to be tested with SETTE +.parallel_HPC_CFG: + parallel: + matrix: + - HPC: [irene,jean-zay] + CONFIG: [ORCA2_ICE_PISCES,ORCA2_OFF_PISCES,AMM12,AGRIF,WED025,GYRE_PISCES,SAS,ORCA2_ICE_OBS] + +# HPC & testcases lists to be tested with SETTE +.parallel_HPC_TST: + parallel: + matrix: + - HPC: [irene,jean-zay] + CONFIG: [SWG,ICE_AGRIF,OVERFLOW,LOCK_EXCHANGE,VORTEX,ISOMIP+] + + +# variables declared hereafter will be avaible in all jobs +# these 2 variables are needed for each HPC to be tested: +# - SETTE_CFG: SETTE param.cfg file path +# - SETTE_MOD: SETTE modules list + +variables: + # JEAN-ZAY + JZ_SETTE_CFG: "/linkhome/rech/genloc01/reee217/nemo_CI/param.cfg" + JZ_SETTE_MOD: "intel-compilers/19.1.3 intel-mpi/2019.9 hdf5/1.12.0-mpi netcdf-c/4.7.4-mpi netcdf-fortran/4.5.3-mpi git/2.25.0" + # IRENE + IR_SETTE_CFG: "/ccc/cont005/dsku/leger/home/user/locean/massons/nemo_CI/param.cfg" + IR_SETTE_MOD: "intel/19.0.5.281 mpi/openmpi/4.0.2 flavor/hdf5/parallel flavor/buildmpi/openmpi/4.0 netcdf-c/4.6.0 netcdf-fortran/4.4.4 hdf5/1.8.20 boost/1.69.0 blitz/0.10 c++/gnu/7.3.0 c/gnu/7.3.0" diff --git a/.gitlab-ci-default.yml b/.gitlab-ci-default.yml new file mode 100644 index 00000000..0deb66fb --- /dev/null +++ b/.gitlab-ci-default.yml @@ -0,0 +1,15 @@ +# default (but willingly wrong) values + +# HPC & configs lists to be tested with SETTE +.parallel_HPC_CFG: + parallel: + matrix: + - HPC: [default] + CONFIG: [default] + +# HPC & testcases lists to be tested with SETTE +.parallel_HPC_TST: + parallel: + matrix: + - HPC: [default] + CONFIG: [default] diff --git a/.gitlab-ci-mercator.yml b/.gitlab-ci-mercator.yml new file mode 100644 index 00000000..b7a74c95 --- /dev/null +++ b/.gitlab-ci-mercator.yml @@ -0,0 +1,32 @@ +# HPC & configs lists to be tested with SETTE +.parallel_HPC_CFG: + parallel: + matrix: + - HPC: [aa,belenos] + #CONFIG: [ORCA2_ICE_PISCES,ORCA2_OFF_PISCES,AMM12,AGRIF_DEMO,WED025,GYRE_PISCES,ORCA2_SAS_ICE,ORCA2_ICE_OBS] + CONFIG: [ORCA2_ICE_PISCES,ORCA2_OFF_PISCES,AMM12,WED025,GYRE_PISCES,ORCA2_SAS_ICE,ORCA2_ICE_OBS] + +# HPC & testcases lists to be tested with SETTE +.parallel_HPC_TST: + parallel: + matrix: + - HPC: [aa,belenos] + #CONFIG: [SWG,ICE_AGRIF,OVERFLOW,LOCK_EXCHANGE,VORTEX,ISOMIP+] + CONFIG: [SWG,OVERFLOW,LOCK_EXCHANGE,VORTEX,ISOMIP+] + + +# variables declared hereafter will be avaible in all jobs +# these 2 variables are needed for each HPC to be tested: +# - SETTE_CFG: SETTE param.cfg file path +# - SETTE_MOD: SETTE modules list + +variables: + # METEO-FRANCE BELENOS (INTEL_2018+INTEL-MPI) + BL_SETTE_CFG: "/home/ext/mr/smer/samsong/SRC/NEMO/main/sette/param.ci" + BL_SETTE_MOD: "gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/r2320_intel-impi git/2.27.0" + # ECMWF AA (INTEL_2021+OPEN-MPI) + AA_SETTE_CFG: "/home/ar0s/SRC/NEMO/main/sette/param.ci" + AA_SETTE_MOD: "prgenv/intel intel/2021.4.0 openmpi/4.1.1.1 hdf5-parallel/1.10.6 netcdf4-parallel/4.7.4 xios/trunk/r2320_intel-ompi" + # MERCATOR KARA (TODO) + #KR_SETTE_CFG: "/kara/data1/gsamson/SRC/NEMO/nemo/sette/param.ci" + #KR_SETTE_MOD: "gcc/9.3.0 openmpi/4.0.5_gcc9.3.0 hdf5/1.8.18_gcc9.3.0 netcdf/4.7.1_gcc9.3.0 xios/trunk_rev2136_gcc9.3.0 git/2.34.1" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..d9496fce --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,180 @@ +#----------# +# SETTE CI # +#----------# + + +include: + # default values will be overwritten depending on commit author + - local: '.gitlab-ci-default.yml' + - local: '.gitlab-ci-cnrs.yml' + rules: + - if: '$CI_COMMIT_AUTHOR =~ /.*masson.*/' + - local: '.gitlab-ci-mercator.yml' + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + #- if: '$CI_COMMIT_AUTHOR =~ /.*samson.*/ || $CI_COMMIT_AUTHOR =~ /.*chanut.*/' + + +.cache: &cache_CFG + key: ${CONFIG}_${CI_COMMIT_SHORT_SHA}_${CI_PIPELINE_ID} + paths: + - cfgs/${CONFIG}_ST/EXP* + - cfgs/${CONFIG}_ST/BLD/bin + - cfgs/${CONFIG}_ST/cpp_${CONFIG}_ST.fcm + +.cache: &cache_TST + key: ${CONFIG}_${CI_COMMIT_SHORT_SHA}_${CI_PIPELINE_ID} + paths: + - tests/${CONFIG}_ST/EXP* + - tests/${CONFIG}_ST/BLD/bin + - tests/${CONFIG}_ST/cpp_${CONFIG}_ST.fcm + + +stages: + - compile + - run + - check + + +before_script: +# the following commands will be executed at the beginning of each job +# they are needed to copy param.cfg to SETTE directory and to load the modules + - declare -A HOST_NAME=( ["kara"]="KR" ["aa"]="AA" ["belenoslogin"]="BL" ["irene"]="IR" ["jean-zay"]="JZ" ) + - SETTE_MOD=${HOST_NAME[${HOSTNAME//[0-9,-,.]*}]}_SETTE_MOD + - if [ -d ${HOME}/modules ]; then module use ${HOME}/modules; fi + - module purge || true # force to always have 0 as error code (needed for irene) + - module load ${!SETTE_MOD} + - set -x # debug prints + - SETTE_CFG=${HOST_NAME[${HOSTNAME//[0-9,-,.]*}]}_SETTE_CFG + - cp -av ${!SETTE_CFG} sette/param.cfg + - git config core.filemode false # ignore git(lab) symlinks permissions changes when pushing then pulling cache ("old mode 100755 -> new mode 100644") + - SETTE_OPT="-b -u -w" + + +# JOBS +# sette_cmp_cfgs : compile reference configurations +# sette_cmp_tsts : compile test cases +# sette_run_cfgs : run reference configurations +# sette_run_tsts : run test cases +# sette_rpt_cfgs : check reference configurations results +# sette_rpt_tsts : check test cases results + +sette_cmp_cfgs: + stage: compile + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + extends: .parallel_HPC_CFG # HPC + configs loop + cache: + <<: *cache_CFG + policy: push + tags: + - $HPC + script: + - cd sette + - ./sette.sh ${SETTE_OPT} -n ${CONFIG} -x "COMPILE" | tee -a sette_cmp_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + - cd - + artifacts: + paths: + - sette/sette_cmp_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + when: always + +sette_cmp_tsts: + stage: compile + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + extends: .parallel_HPC_TST # HPC + tests loop + cache: + <<: *cache_TST + policy: push + tags: + - $HPC + script: + - cd sette + - ./sette.sh ${SETTE_OPT} -n ${CONFIG} -x "COMPILE" | tee -a sette_cmp_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + - cd - + artifacts: + paths: + - sette/sette_cmp_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + when: always + +sette_run_cfgs: + stage: run + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + needs: [sette_cmp_cfgs] # limited to 50 jobs + dependencies: [] # do not retrieve previous artifacts + extends: .parallel_HPC_CFG # HPC + configs loop + cache: + <<: *cache_CFG + policy: pull + tags: + - $HPC + script: + - cd sette + - ./sette.sh ${SETTE_OPT} -n ${CONFIG} -x "RESTART REPRO PHYOPTS CORRUPT" | tee -a sette_run_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + - cd - + artifacts: + paths: + - sette/sette_run_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + - cfgs/${CONFIG}_ST/*/sette.*.out + - cfgs/${CONFIG}_ST/*/sette.*.err + - cfgs/${CONFIG}_ST/*/ocean.output* + when: always + +sette_run_tsts: + stage: run + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + needs: [sette_cmp_tsts] # limited to 50 jobs + dependencies: [] # do not retrieve previous artifacts + extends: .parallel_HPC_TST # HPC + tests loop + cache: + <<: *cache_TST + policy: pull + tags: + - $HPC + script: + - cd sette + - ./sette.sh ${SETTE_OPT} -n ${CONFIG} -x "RESTART REPRO PHYOPTS CORRUPT" | tee -a sette_run_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + - cd - + artifacts: + paths: + - sette/sette_run_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + - tests/${CONFIG}_ST/*/sette.*.out + - tests/${CONFIG}_ST/*/sette.*.err + - tests/${CONFIG}_ST/*/ocean.output* + when: always + +sette_rpt_cfgs: + stage: check + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + needs: [sette_run_cfgs] # limited to 50 jobs + dependencies: [] # do not retrieve previous artifacts + extends: .parallel_HPC_CFG # HPC + configs loop + tags: + - $HPC + script: + - cd sette + - ./sette_rpt.sh -b -u -n "${CONFIG}" | tee -a sette_rpt_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + artifacts: + paths: + - sette/sette_rpt_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + when: always + +sette_rpt_tsts: + stage: check + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + needs: [sette_run_tsts] # limited to 50 jobs + dependencies: [] # do not retrieve previous artifacts + extends: .parallel_HPC_TST # HPC + tests loop + tags: + - $HPC + script: + - cd sette + - ./sette_rpt.sh -b -u -n "${CONFIG}" | tee -a sette_rpt_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + artifacts: + paths: + - sette/sette_rpt_${CONFIG}_${CI_COMMIT_SHORT_SHA}_${HPC}.log + when: always \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..e91919f0 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ + +[](https://forge.nemo-ocean.eu/nemo/nemo/-/commits/61-continuous-integration-tests-with-sette) diff --git a/README.rst b/README.rst deleted file mode 100644 index 789b823b..00000000 --- a/README.rst +++ /dev/null @@ -1,133 +0,0 @@ -**Contents** - -.. contents:: - :local: - - - - -.. _`Former web platform forge`: https://forge.ipsl.jussieu.fr/nemo -.. _`NEMO users' guide`: https://sites.nemo-ocean.io/user-guide -.. _`Migration Guide`: https://sites.nemo-ocean.io/user-guide/migration.html -.. _`Change list`: https://sites.nemo-ocean.io/user-guide/changes.html -.. _`Test case repository`: https://github.com/NEMO-ocean/NEMO-examples -.. _`How to cite`: https://www.nemo-ocean.eu/bibliography/how-to-cite/ -.. _`NEMO forums`: https://nemo-ocean.discourse.group -.. _`NEMO newsletter`: https://listes.ipsl.fr/sympa/subscribe/nemo-newsletter -.. _`NEMO publications`: https://www.nemo-ocean.eu/bibliography/publications/add -.. _`NEMO projects`: https://www.nemo-ocean.eu/projects/add -.. _`Special Issue`: https://gmd.copernicus.org/articles/special_issue40.html -.. _`NEMO System Team wiki`: https://forge.nemo-ocean.eu/developers/home/-/wikis/Home -.. _`NEMO ocean engine`: https://zenodo.org/record/1464816 -.. _`NEMO Tracers engine` : https://zenodo.org/record/1471700 -.. _`NEMO Sea Ice engine`: https://zenodo.org/record/1471689 -.. _`PISCES`: https://www.pisces-community.org/index.php/model-description/ - - -**Welcome to NEMO home page!** - -NEMO (*Nucleus for European Modelling of the Ocean*) is a state-of-the-art modelling -framework for research activities and forecasting services in ocean and climate sciences, -developed in a sustainable way by the NEMO European consortium since 2008. - -This page intends to help you to get started using the NEMO platform and to introduce you -to the different levels of information available. It starts here with NEMO release 4.2.0. - -Reminder: Our `Former web platform forge`_ (SVN+Trac) contains the previous documentation -and releases made available from the beginning of the project up to of NEMO 4.0. - -Getting started -=============== - -Getting your hands on NEMO: the first steps are described in detail in the -`NEMO users' guide`_ . This explains how to download the code, build the environment, -create the executable, and perform a first integration. - -If you are already using a previous release of NEMO, please refer to the -`Migration Guide`_ which aims to help you to make the move to 4.2.0. - -The above users guides cover in detail what is available from gitlab and supported by NEMO -System Team. Aside from this web platform, a set of test cases is also available from the -`Test case repository`_ . These test cases can be useful for students, outreach, and -exploring specific aspects of NEMO with light configurations. The web page also allows you -to submit test cases you have developed and want to share with the community. Feel free to -contribute! - - -Project documentation -===================== - -Reference manuals fully describing NEMO for the three main component - -* |OCE| models the ocean {thermo}dynamics and solves the primitive equations (`./src/OCE <./src/OCE>`_) - -* |ICE| simulates sea-ice {thermo}dynamics, brine inclusions and subgrid-scale thickness - variations (`./src/ICE <./src/ICE>`_) - -* |MBG| models the {on,off}line oceanic tracers transport - (`./src/TOP <./src/TOP>`_) ; and `PISCES`_ models the biogeochemical processes (`.src/TOP/PISCES <.src/TOP/PISCES>`_) - -are available from Zenodo: - -============ ======================== ===== - Component Reference Manual DOI -============ ======================== ===== - |NEMO-OCE| `NEMO ocean engine`_ .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.6334656.svg - :target: https://doi.org/10.5281/zenodo.6334656 - |NEMO-ICE| `NEMO Sea Ice engine`_ .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3878122.svg - :target: https://doi.org/10.5281/zenodo.3878122 - |NEMO-MBG| `NEMO Tracers engine`_ .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1471700.svg - :target: https://doi.org/10.5281/zenodo.1471700 -============ ======================== ===== - -These reference manuals are the publications that should be cited in your own -publications. Please visit `How to cite`_? for details. - -New features of 4.2.0 release are described in the `Change list`_ section of the `NEMO users' guide`_ - - -Asking questions, and exchanging information -============================================ -- Register once for all and use the `NEMO forums`_ on discourse to share and discuss with the NEMO community. - -- Register once for all and receive by mail the `NEMO newsletter`_ : recommended for all - users to receive the major announcements from the project (new releases, open meetings and - main informations). Low traffic: about ten messages a year. - - -Contributing to NEMO visibility: projects and publications -========================================================== -Please help us justifying the NEMO development efforts by - -- Adding your publications using NEMO and its outputs to the `NEMO publications`_ page - -- Describing your project using NEMO on the `NEMO projects`_ page - -NEMO also has a `Special Issue`_ in the open-access journal -Geoscientific Model Development (GMD) from the European Geosciences Union -The main scope is to collect relevant manuscripts covering various topics and -to provide a single portal to assess the model potential and evolution. - - - -Contributing to NEMO development -================================ - -NEMO strives to be written in a way which allows the easy incorporation of developments. -You are welcome to contribute to the development of the NEMO Shared reference. NEMO -development is driven by NEMO Consortium planning and producing NEMO's sustainable -development in order to keep a reliable evolving framework. Development is organised and -scheduled through a five years development strategy, Working groups and the activities of -the development team (named NEMO System Team) in a yearly workplan. More information is -available on the `NEMO System Team wiki`_ - - -Disclaimer -========== - -The NEMO source code is freely available and distributed under -`CeCILL v2.0 license <./LICENSE>`_ (GNU GPL compatible). - -You can use, modify and/or redistribute the software under its terms, -but users are provided only with a limited warranty and the software's authors and -the successive licensor's have only limited liability. diff --git a/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI.fcm b/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI.fcm index bb826c74..c0ace091 100644 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI.fcm +++ b/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI.fcm @@ -55,7 +55,8 @@ %CPP cpp %FC mpifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS %LD mpifort %LDFLAGS diff --git a/ext/FCM/bin/fcm_internal b/ext/FCM/bin/fcm_internal index 3c95240e..ccbedd48 100755 --- a/ext/FCM/bin/fcm_internal +++ b/ext/FCM/bin/fcm_internal @@ -9,6 +9,7 @@ use strict; use warnings; use Fcm::Timer qw{timestamp_command}; +use File::Spec; # Function declarations sub catfile; diff --git a/makenemo b/makenemo index f473c4e5..7e563da7 100755 --- a/makenemo +++ b/makenemo @@ -203,12 +203,12 @@ if [ -n "${x_n}" ]; then # Look for already-existing new config NEW_CONF=${x_n} if [ -n "${x_t}" ]; then - NEW_DIR=$( find ${x_t} -maxdepth 1 -type d -name ${x_n} 2>/dev/null ) + NEW_DIR=$( find -L ${x_t} -maxdepth 1 -type d -name ${x_n} 2>/dev/null ) else - NEW_DIR=$( find ${MAIN_DIR}/cfgs ${MAIN_DIR}/tests -maxdepth 1 -type d -name ${NEW_CONF} 2>/dev/null ) + NEW_DIR=$( find -L ${MAIN_DIR}/cfgs ${MAIN_DIR}/tests -maxdepth 1 -type d -name ${NEW_CONF} 2>/dev/null ) fi NEW_NB=$( echo ${NEW_DIR} | wc -w ) - NEW_CMP=$( grep -l "^${NEW_CONF} " ${MAIN_DIR}/cfgs/*_cfgs.txt ${MAIN_DIR}/tests/*_cfgs.txt ) + NEW_CMP=$( grep -l "^${NEW_CONF} " ${MAIN_DIR}/cfgs/*_cfgs.txt ${MAIN_DIR}/tests/*_cfgs.txt | tail -1 ) # Define if new config needs to be created or not if [[ ${NEW_NB:-0} -eq 0 || -z "${NEW_CMP}" ]]; then @@ -389,7 +389,7 @@ if [ "${NBR_PRC}" -gt 0 ]; then fcm build --ignore-lock -v ${x_v} -j ${NBR_PRC} ${NEMO_TDIR}/${CUR_CONF}/BLD/${USEBLD} || exit 1 if [ -f ${NEMO_TDIR}/${CUR_CONF}/BLD/bin/nemo.exe ]; then - ln -sfv ${NEMO_TDIR}/${CUR_CONF}/BLD/bin/nemo.exe ${NEMO_TDIR}/${CUR_CONF}/EXP00/nemo + (cd ${NEMO_TDIR}/${CUR_CONF}/EXP00; ln -sfv ../BLD/bin/nemo.exe ./nemo) else exit 1 fi diff --git a/mk/Fmake_config.sh b/mk/Fmake_config.sh index 22955c4d..ae844c40 100755 --- a/mk/Fmake_config.sh +++ b/mk/Fmake_config.sh @@ -66,7 +66,12 @@ then do if [[ -L ${f} && $( readlink -f ${f} ) =~ "SHARED" ]] then - \ln -sf $( readlink -f ${f} ) ${1}/EXP00/$( basename ${f} ) # keep link from SHARED + # create absolute(relative) symlinks if config directory is outside(inside) nemo directory + if [[ $(dirname ${1}) != $(dirname ${2}) ]]; then + \ln -sf $( readlink -f ${f} ) ${1}/EXP00/$( basename ${f} ) # keep link from SHARED + else + (cd ${1}/EXP00; \ln -sf ../../../cfgs/SHARED/$(basename $(readlink -f ${f}) ) $( basename ${f} )) + fi else \cp ${f} ${1}/EXP00/. fi diff --git a/mk/Fmake_tools_bld.sh b/mk/Fmake_tools_bld.sh index a2da0c90..71443a3a 100755 --- a/mk/Fmake_tools_bld.sh +++ b/mk/Fmake_tools_bld.sh @@ -57,10 +57,8 @@ set -o posix # * creation # #- -[ ! -d ${3}/${2} ] && \mkdir ${3}/${2} -[ ! -d ${3}/${2}/BLD ] && \mkdir ${3}/${2}/BLD +[ ! -d ${3}/${2}/BLD ] && \mkdir -p ${3}/${2}/BLD [ ! -d ${1}/${2}/BLD ] && ln -sf ${3}/${2}/BLD ${1}/${2}/BLD # enforce presence of cpp_tools.fcm (write a blank one if not present in the tools directory) # cp instead of ln to avoid overwiting previous tool cpp_XXX.fcm file when compiling a file without cpp_YYY.fcm file. [ -f ${3}/${2}/cpp_${2}.fcm ] && ln -sf -f ${3}/${2}/cpp_${2}.fcm ${3}/${2}/BLD/cpp_tools.fcm || echo 'bld::tool::fppkeys ' > ${3}/${2}/BLD/cpp_tools.fcm -rm -f ${1}/${CUR_CONF}/BLD/fcm.bld.lock diff --git a/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI b/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI index 3eca6d7c..3a2e37f4 100644 --- a/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI +++ b/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI @@ -3,12 +3,12 @@ #SBATCH -J sette #SBATCH -o sette.%j.out #SBATCH -e sette.%j.err +#SBATCH --parsable #SBATCH -N 1 -#SBATCH --time=0-00:20:00 +#SBATCH --time=0-00:30:00 #SBATCH --account=frtomerc #SBATCH --partition=par #SBATCH --qos=np -##SBATCH --ntasks=NPROCS #SBATCH --ntasks=TOTAL_NPROCS set -x @@ -73,23 +73,17 @@ module list sed -i "s/one_file/multiple_file/" file_def_nemo-*.xml # # Run the parallel MPI executable -# - echo "Running time ${MPIRUN} ./nemo" # if [ $XCORES -gt 0 ]; then # # Run MPMD case # #XIOS will run on a separate node so will run in parallel queue - if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then + if [ $XCORES -gt 0 ] && [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then cp ${XIO_HOME}/bin/xios_server.exe . fi - if [ ! -f ./xios_server.exe ]; then - echo "./xios_server.exe not found" - echo "run aborted" - exit - fi - cat > ./config.file <<-EOF + + cat > ./config.file <<-EOF 0-$((OCORES-1)) ./nemo ${OCORES}-$((TOTAL_NPROCS-1)) ./xios_server.exe EOF diff --git a/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI index 481b788c..d8239fe0 100644 --- a/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI +++ b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI @@ -41,8 +41,8 @@ # # modules to load module purge -module use /home/ext/mr/smer/samsong/modules -module load gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/rev2320-impi +module use ~samsong/modules +module load gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/r2320_intel-impi export XIO_HOME=${XIOS_DIR} # Don't remove neither change the following line diff --git a/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_OMPI b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_OMPI new file mode 100644 index 00000000..cf73cb0c --- /dev/null +++ b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_OMPI @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +#SBATCH -J sette +#SBATCH -o sette.%j.out +#SBATCH -e sette.%j.err +#SBATCH --parsable +#SBATCH --exclusive +#SBATCH -N 1 +#SBATCH -p normal256 +#SBATCH --time=01:00:00 +##SBATCH --time=00:15:00 +##SBATCH -A smer +#SBATCH -A cmems +##SBATCH --qos=normal +#SBATCH --qos=coper + +set -x + +# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these +# (via sed operating on this template job file). +# + echo " "; + OCORES=NPROCS + XCORES=NXIOPROCS + O_PER_NODE=32 + X_PER_NODE=8 + if [ $XCORES -le $X_PER_NODE ]; then X_PER_NODE=$XCORES; fi + if [ $OCORES -le $O_PER_NODE ]; then O_PER_NODE=$OCORES; fi + export SETTE_DIR=DEF_SETTE_DIR + +############################################################### +# +export MPIRUN="srun" +# +# load sette functions (only post_test_tidyup needed) +# + . ${SETTE_DIR}/all_functions.sh +############################################################### +# +# modules to load +module purge +module use ~samsong/modules +module load gcc/9.2.0 intel/2018.5.274 openmpi/intel/4.0.2.2 hdf5-1.8.18-ompi netcdf-4.7.1-ompi_V2 xios/trunk/r2320_intel-ompi +export OMPI_CC=icc +export OMPI_CXX=icpc +export OMPI_FC=ifort +export OMPI_F77=ifort +export OMPI_F90=ifort + +# Don't remove neither change the following line +# BODY +# +# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these +# (via sed operating on this template job file). Note that the number of compute nodes required +# is also set by the fcm_job.sh on the PBS select header line above. +# +# These variables are needed by post_test_tidyup function in all_functions.sh +# + export XIO_HOME=${XIOS_DIR} + export INPUT_DIR=DEF_INPUT_DIR + export CONFIG_DIR=DEF_CONFIG_DIR + export TOOLS_DIR=DEF_TOOLS_DIR + export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION + export NEW_CONF=DEF_NEW_CONF + export CMP_NAM=DEF_CMP_NAM + export TEST_NAME=DEF_TEST_NAME + export EXE_DIR=DEF_EXE_DIR + ulimit -a + ulimit -s unlimited +# +# end of set up +############################################################### +# +# change to the working directory +# + cd ${EXE_DIR} + echo Running on host `hostname` + echo Time is `date` + echo Directory is `pwd` +# +# Run the parallel MPI executable +# + if [ $XCORES -gt 0 ]; then +# +# Run MPMD case +# + #XIOS will run on a separate node so will run in parallel queue + if [ $XCORES -gt 0 ] && [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then + cp ${XIO_HOME}/bin/xios_server.exe . + fi + + cat > ./config.file <<-EOF +0-$((OCORES-1)) ./nemo +${OCORES}-$((TOTAL_NPROCS-1)) ./xios_server.exe +EOF + $MPIRUN --ntasks=TOTAL_NPROCS --multi-prog config.file + else +# +# Run SPMD case +# + $MPIRUN --ntasks=TOTAL_NPROCS ./nemo + fi +# + +# + post_test_tidyup + +# END_BODY +# Don't remove neither change the previous line + exit diff --git a/sette/all_functions.sh b/sette/all_functions.sh index cdfa8d9a..2c813429 100755 --- a/sette/all_functions.sh +++ b/sette/all_functions.sh @@ -175,24 +175,11 @@ clean_config() { # define validation dir set_valid_dir () { - if [ ${DETACHED_HEAD} == "no" ] ; then - REVISION_NB=`git -C ${MAIN_DIR} rev-parse --short HEAD` - else - REVISION_NB=${DETACHED_CMIT} - fi + REVISION_NB=`git -C ${MAIN_DIR} rev-parse --short HEAD` REV_DATE0="`git -C ${MAIN_DIR} log -1 | grep Date | sed -e 's/.*Date: *//' -e's/ +.*$//'`" REV_DATE=`${DATE_CONV}"${REV_DATE0}" +"%y%j"` - REVISION_NB=${REV_DATE}_${REVISION_NB} - if [ ${#REVISION_NB} -eq 0 ] - then - echo "some problems with git rev-list command" - echo "some problems with git rev-list command" >> ${SETTE_DIR}/output.sette - REVISION_NB=`date +%Y%m%d` - echo "put in ${REVISION_NB} date" - echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette - else + REVISION_NB=${REV_DATE}_${NEMO_REV} echo "value of revision number of NEMOGCM: ${REVISION_NB}" - fi localchanges=`git -C ${MAIN_DIR} status --short -uno | wc -l` if [[ $localchanges > 0 ]] ; then REVISION_NB=${REVISION_NB}+ diff --git a/sette/fcm_job.sh b/sette/fcm_job.sh index 9fe32fab..235fb9e9 100755 --- a/sette/fcm_job.sh +++ b/sette/fcm_job.sh @@ -93,11 +93,16 @@ cd ${EXE_DIR} if [ "${INTERACT_FLAG}" == "yes" ]; then eval ${JOB_FILE} else if [ "${INTERACT_FLAG}" == "no" ]; then + if [[ "${BATCH_COMMAND_PAR}" =~ "sbatch" ]]; then + BATCH_NAME0="${BATCH_NAME}_${config}_${TEST_NAME}" + BATCH_COMMAND_PAR="sbatch -J ${BATCH_NAME0} --parsable" + BATCH_COMMAND_SEQ=${BATCH_COMMAND_PAR} + fi # submit job to batch system if [ "${NB_PROC}" == "1" ]; then - eval ${BATCH_COMMAND_SEQ} ${JOB_FILE} ; echo ${BATCH_COMMAND_SEQ} ${JOB_FILE} + BATCH_LST+=( $( ${BATCH_COMMAND_SEQ} ${JOB_FILE} ) ) ; echo ${BATCH_COMMAND_SEQ} ${JOB_FILE} else - eval ${BATCH_COMMAND_PAR} ${JOB_FILE} ; echo ${BATCH_COMMAND_PAR} ${JOB_FILE} + BATCH_LST+=( $( ${BATCH_COMMAND_PAR} ${JOB_FILE} ) ) ; echo ${BATCH_COMMAND_PAR} ${JOB_FILE} fi fi fi diff --git a/sette/input_AGRIF.cfg b/sette/input_AGRIF_DEMO.cfg similarity index 100% rename from sette/input_AGRIF.cfg rename to sette/input_AGRIF_DEMO.cfg diff --git a/sette/input_SAS.cfg b/sette/input_ORCA2_SAS_ICE.cfg similarity index 100% rename from sette/input_SAS.cfg rename to sette/input_ORCA2_SAS_ICE.cfg diff --git a/sette/param.default b/sette/param.default index 92dba321..fe0b2d15 100644 --- a/sette/param.default +++ b/sette/param.default @@ -35,8 +35,6 @@ BATCH_NAME=${SETTE_BATCH_NAME:-sette} FORCING_DIR=${SETTE_FORCING_DIR:-$WORKDIR/FORCING} # validation files storing NEMO_VALIDATION_DIR=${SETTE_NEMO_VALIDATION_DIR:-$MAIN_DIR}/NEMO_VALIDATION -# input files storing (namelist, iodef ...) (DO NOT CHANGE) -INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 # optional custom SETTE tests directory #export CUSTOM_DIR=/path/to/custom/sette/tests # ------------------------------------------------------------------------------------------ @@ -72,11 +70,13 @@ fi # # TYPES OF TESTS TO PERFORM # Note an attempt will be made to compile each configuration even if none of these tests are activated +export DO_COMPILE=0 export DO_RESTART=0 export DO_REPRO=0 export DO_CORRUPT=0 export DO_PHYOPTS=0 -TEST_TYPES=(${SETTE_TEST_TYPES[@]:-"RESTART REPRO PHYOPTS CORRUPT"}) +TEST_TYPES=(${SETTE_TEST_TYPES[@]:-"COMPILE RESTART REPRO PHYOPTS CORRUPT"}) +if [[ ${TEST_TYPES[*]} =~ .*COMPILE.* ]]; then export DO_COMPILE=1 ;fi if [[ ${TEST_TYPES[*]} =~ .*RESTART.* ]]; then export DO_RESTART=1 ;fi if [[ ${TEST_TYPES[*]} =~ .*REPRO.* ]]; then export DO_REPRO=1 ;fi if [[ ${TEST_TYPES[*]} =~ .*CORRUPT.* ]]; then export DO_CORRUPT=1 ;fi diff --git a/sette/sette.sh b/sette/sette.sh index 5dcf8f26..72af6c16 100755 --- a/sette/sette.sh +++ b/sette/sette.sh @@ -9,7 +9,8 @@ export CMPL_CORES=8 # Number of threads to use for compiling export SETTE_STG="_ST" # Base suffix to append to configuration name NEMO_DEBUG="" dry_run=0 -NO_REPORT=0 +SETTE_REPORT=0 +WAIT_SETTE=0 # # controls for some common namelist, run-time options: # @@ -36,60 +37,36 @@ export USER_INPUT='yes' # Default: yes => request user input on decisions # 1. regarding mismatched options # 2. regardin incompatible options # 3. regarding creation of directories -# -# Check that git branch is usable -export DETACHED_HEAD="no" -git -C ${MAIN_DIR} branch --show-current >& /dev/null -if [[ $? == 0 ]] ; then - # subdirectory below NEMO_VALIDATION_DIR defaults to branchname - export SETTE_SUB_VAL="$(git -C ${MAIN_DIR} branch --show-current)" - if [ -z $SETTE_SUB_VAL ] ; then - # Probabably on a detached HEAD (possibly testing an old commit). - # Verify this and try to recover original commit - MORE_INFO="$(git branch -a | head -1l | sed -e's/.*(//' -e 's/)//' )" - if [[ "${MORE_INFO}" == *"detached"* ]] ; then - export DETACHED_HEAD="yes" - export DETACHED_CMIT=$( echo \\${MORE_INFO} | awk '{print $NF}' ) - # There is no robust way to recover a branch name in a detached state - # so just use the commit with a prefix - export SETTE_SUB_VAL="detached_"${DETACHED_CMIT} - else - export SETTE_SUB_VAL="Unknown" - fi - fi - export SETTE_THIS_BRANCH=${SETTE_SUB_VAL} -else - # subdirectory below NEMO_VALIDATION_DIR defaults to "MAIN" - export SETTE_SUB_VAL="MAIN" - export SETTE_THIS_BRANCH="Unknown" -fi +export SETTE_THIS_BRANCH=$(git log -1 --pretty=%D HEAD | sed 's|.*origin/||g;s|, .*||g;s|.*-> ||g' ) +export SETTE_SUB_VAL=${SETTE_THIS_BRANCH} +export NEMO_REV=$(git -C ${MAIN_DIR} rev-parse --short HEAD 2> /dev/null) # Parse command-line arguments if [ $# -gt 0 ]; then - while getopts n:x:v:g:cybrshTqQteiACFNXua option; do + while getopts n:x:v:g:cybrshTqQteiACFNXuaw option; do case $option in c) export SETTE_CLEAN_CONFIGS='yes' export SETTE_SYNC_CONFIGS='yes' - echo "-c: Configuration ${SETTE_TEST_CONFIGS[@]} will be cleaned; this option enforces also synchronisation" + echo "-c: Configuration(s) ${SETTE_TEST_CONFIGS[@]} will be cleaned; this option enforces also synchronisation" echo "";; y) dry_run=1 echo "";; b) NEMO_DEBUG="-b" - echo "-b: Nemo will be compiled with DEBUG options" + echo "-b: Nemo will be compiled with DEBUG options if available in ARCH file" + echo "";; + r) SETTE_REPORT=1 + echo "-r: Sette report will be printed once jobs are finished" + WAIT_SETTE=1 echo "";; - r) NO_REPORT=1 + w) WAIT_SETTE=1 + echo "-w: Sette will wait for jobs to finish" echo "";; s) export SETTE_SYNC_CONFIGS='yes' echo "-s: MY_SRC and EXP00 in ${SETTE_TEST_CONFIGS[@]} will be synchronised with the MY_SRC and EXPREF from the reference configuration" echo "";; n) OPTSTR="$OPTARG" - export SETTE_TEST_CONFIGS=(${OPTSTR}) - echo "==================================" - if [ ${#SETTE_TEST_CONFIGS[@]} -gt 1 ]; then - echo "-n: Configurations ${SETTE_TEST_CONFIGS[@]} will be tested if they are available" - else - echo "-n: Configuration ${SETTE_TEST_CONFIGS[@]} will be tested if it is available" - fi + SETTE_TEST_CONFIGS=(${OPTSTR}) + echo "-n: Configuration(s) ${SETTE_TEST_CONFIGS[@]} will be tested if they are available" echo "";; g) case $OPTARG in [0-9,a-z,A-Z] ) echo "-g: Using ${SETTE_STG}${OPTARG} as the configuration suffix";; @@ -154,7 +131,7 @@ if [ $# -gt 0 ]; then echo '-A to run tests in attached (SPMD) mode (default: MPMD with key_xios)' echo '-n "CFG1_to_test CFG2_to_test ..." to test some specific configurations' echo '-x "TEST_type TEST_type ..." to specify particular type(s) of test(s) to run after compilation' - echo ' TEST_type choices are: RESTART REPRO CORRUPT PHYSICS - anything else will COMPILE only' + echo ' TEST_type choices are: COMPILE RESTART REPRO CORRUPT PHYSICS - anything else will COMPILE only' echo '-v "subdir" optional validation record subdirectory to be created below NEMO_VALIDATION_DIR' echo '-g "group_suffix" single character suffix to be appended to the standard _ST suffix used' echo ' for SETTE-built configurations (needed if sette.sh invocations may overlap)' @@ -163,6 +140,8 @@ if [ $# -gt 0 ]; then echo '-b to compile Nemo with debug options (only if %DEBUG_FCFLAGS if defined in your arch file)' echo '-c to clean each configuration' echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF' + echo '-w to wait for Sette jobs to finish' + echo '-r to print Sette report after Sette jobs completion' echo '-u to run sette.sh without any user interaction. This means no checks on creating' echo ' directories etc. i.e. no safety net!' ; exit 42 ;; esac @@ -172,7 +151,6 @@ fi # # Get SETTE parameters . ./param.cfg - # # Set the common compile keys to add or delete based on command-line arguments: # @@ -222,6 +200,7 @@ fi echo "Carrying out the following tests : ${TEST_TYPES[@]}" echo "requested by the command : "$cmd $cmdargs echo "on branch : "$SETTE_THIS_BRANCH +echo "on revision : "$NEMO_REV printf "%-33s : %s\n" USING_TIMING $USING_TIMING printf "%-33s : %s\n" USING_ICEBERGS $USING_ICEBERGS printf "%-33s : %s\n" USING_ABL $USING_ABL @@ -243,7 +222,6 @@ echo "" # Option compatibility tests # if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ] ; then echo "Incompatible choices. MPMD mode requires the XIOS server" ; exit ; fi - if [ ${dry_run} -eq 1 ] ; then echo "dryrun only: no tests performed" ; exit ; fi # run sette on reference configuration @@ -268,28 +246,49 @@ if [[ $? != 0 ]]; then exit 42 fi -if [ ${NO_REPORT} -ne 0 ] ; then exit ; fi +# wait for sette jobs to finish +if [[ ${WAIT_SETTE} -eq 1 && "${TEST_TYPES[@]}" =~ (RESTART|REPRO|CORRUPT|PHYSICS) ]]; then + echo "" + echo "-------------------------------------------------------------" + echo "wait for sette jobs to finish..." + echo "-------------------------------------------------------------" + echo "" + NRUN=999 + NIT=0 + while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do + nit=$((nit+1)) + if [[ "${BATCH_STAT}" == "squeue" && -n "${BATCH_LST[@]}" ]]; then + BATCH_STAT="squeue -j $(echo ${BATCH_LST[@]} | tr ' ' ',') -h -o %j" + NRUN=$( ${BATCH_STAT} | wc -l ) + echo "currently running jobs: "$(${BATCH_STAT}) + else + NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) + fi + if [[ $NRUN -ne 0 ]]; then + echo $NRUN "sette jobs still in queue or running ..." + sleep 10 + else + echo "all sette runs completed" + break + fi + done +fi + # run sette report -echo "" -echo "-------------------------------------------------------------" -echo "./sette_rpt.sh (script will wait all nemo_sette run are done)" -echo "-------------------------------------------------------------" -echo "" -NRUN=999 -NIT=0 -while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do - nit=$((nit+1)) - NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) - if [[ $NRUN -ne 0 ]]; then - printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...'; - else - printf "%-50s\n" " " - ./sette_rpt.sh ${NEMO_DEBUG} ${SETTE_SUB_VAL:+-v ${SETTE_SUB_VAL}} - exit +if [ ${SETTE_REPORT} -eq 1 ] ; then + echo "" + echo "-------------------------------------------------------------" + echo "./sette_rpt.sh" + echo "-------------------------------------------------------------" + ./sette_rpt.sh ${NEMO_DEBUG} -n "${TEST_CONFIGS[*]}" + if [[ $? != 0 ]]; then + echo "" + echo "-----------------------------------------------------------------" + echo "./sette_rpt.sh didn't finish properly, need investigations" + echo "-----------------------------------------------------------------" + echo "" + exit 42 fi - sleep 10 -done -printf "\n" -echo "" -echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests" -echo "" +fi + +exit 0 diff --git a/sette/sette_reference-configurations.sh b/sette/sette_reference-configurations.sh index 4c3d1527..d6d11b9f 100755 --- a/sette/sette_reference-configurations.sh +++ b/sette/sette_reference-configurations.sh @@ -111,7 +111,7 @@ fi CONFIG_DIR0=${MAIN_DIR}/cfgs TOOLS_DIR=${MAIN_DIR}/tools if [ -n "${CUSTOM_DIR}" ]; then - NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) + #NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) CMP_NAM_L=$(echo ${CMP_NAM} | tr '[:upper:]' '[:lower:]') if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]]; then export CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}_DEBUG @@ -143,7 +143,7 @@ do # ----------- # GYRE_PISCES # ----------- -if [ ${config} == "GYRE_PISCES" ] ; then +if [ ${config} == "GYRE_PISCES" ] ; then SETTE_CONFIG="GYRE_PISCES"${SETTE_STG} if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then @@ -152,6 +152,8 @@ if [ ${config} == "GYRE_PISCES" ] ; then ITEND=1080 # 90 days fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -161,8 +163,9 @@ if [ ${config} == "GYRE_PISCES" ] ; then # GYRE uses linssh so remove key_qco if added by default ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r GYRE_PISCES ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi -if [ ${config} == "GYRE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests for GYRE_PISCES +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -228,8 +231,8 @@ if [ ${config} == "GYRE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "GYRE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests for GYRE_PISCES +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_2_4" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -287,10 +290,13 @@ if [ ${config} == "GYRE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then fi +fi # GYRE_PISCES + + # ----------------- # ORCA2_ICE_PISCES # ----------------- -if [ ${config} == "ORCA2_ICE_PISCES" ] ; then +if [ ${config} == "ORCA2_ICE_PISCES" ] ; then SETTE_CONFIG="ORCA2_ICE_PISCES"${SETTE_STG} if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then @@ -299,6 +305,8 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] ; then ITEND=992 # 62 days fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -307,8 +315,9 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] ; then # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests for ORCA2_ICE_PISCES +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -453,8 +462,8 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests for ORCA2_ICE_PISCES +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_4_8" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -574,10 +583,13 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi # ORCA2_ICE_PISCES + + # ---------------- # ORCA2_OFF_PISCES # ---------------- -if [ ${config} == "ORCA2_OFF_PISCES" ] ; then +if [ ${config} == "ORCA2_OFF_PISCES" ] ; then SETTE_CONFIG="ORCA2_OFF_PISCES"${SETTE_STG} if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then @@ -586,6 +598,8 @@ if [ ${config} == "ORCA2_OFF_PISCES" ] ; then ITEND=380 # 95 days fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ]; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -595,8 +609,9 @@ if [ ${config} == "ORCA2_OFF_PISCES" ] ; then # ORCA2_OFF_PISCES uses linssh so remove key_qco if added by default ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_OFF_PISCES ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi -if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests for ORCA2_OFF_PISCES +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -675,8 +690,8 @@ if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests for ORCA2_OFF_PISCES +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_4_8" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -751,6 +766,8 @@ if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi # ORCA2_OFF_PISCES + # ----- # AMM12 # ----- @@ -763,6 +780,8 @@ if [ ${config} == "AMM12" ] ; then ITEND=576 # 4 days fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -771,8 +790,9 @@ if [ ${config} == "AMM12" ] ; then # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AMM12 ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "AMM12" ] && [ ${DO_RESTART} == "1" ] ; then - ## Restartability tests for AMM12 + +## Restartability tests for AMM12 +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -831,8 +851,8 @@ if [ ${config} == "AMM12" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "AMM12" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests for AMM12 +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_8_4" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -884,6 +904,8 @@ if [ ${config} == "AMM12" ] && [ ${DO_REPRO} == "1" ] ; then . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi # AMM12 + # --------- # ORCA2_SAS_ICE @@ -897,6 +919,8 @@ if [ ${config} == "ORCA2_SAS_ICE" ] ; then ITEND=256 # 16 days fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -906,8 +930,9 @@ if [ ${config} == "ORCA2_SAS_ICE" ] ; then # ORCA2_SAS_ICE uses linssh so remove key_qco if added by default ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_SAS_ICE ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi -if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -917,7 +942,7 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_RESTART} == "1" ] ; then NPROC=32 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"SAS\" + set_namelist namelist_cfg cn_exp \"ORCA2_SAS_ICE\" set_namelist namelist_cfg nn_it000 1 set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) @@ -931,7 +956,7 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false. set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_ORCA2_SAS_ICE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} export TEST_NAME="SHORT" @@ -939,7 +964,7 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_RESTART} == "1" ] ; then set_valid_dir clean_valid_dir cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"SAS\" + set_namelist namelist_cfg cn_exp \"ORCA2_SAS_ICE\" set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) @@ -949,8 +974,8 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist namelist_cfg ln_rstart .true. set_namelist namelist_cfg nn_rstctl 2 set_namelist namelist_cfg nn_date0 010109 - set_namelist namelist_cfg cn_ocerst_in \"SAS_${ITRST}_restart\" - set_namelist namelist_ice_cfg cn_icerst_in \"SAS_${ITRST}_restart_ice\" + set_namelist namelist_cfg cn_ocerst_in \"ORCA2_SAS_ICE_${ITRST}_restart\" + set_namelist namelist_ice_cfg cn_icerst_in \"ORCA2_SAS_ICE_${ITRST}_restart_ice\" set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false. set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 2 set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 @@ -959,18 +984,18 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_RESTART} == "1" ] ; then for (( i=1; i<=$NPROC; i++)) ; do L_NPROC=$(( $i - 1 )) L_NPROC=`printf "%04d\n" ${L_NPROC}` - ln -sf ../LONG/SAS_${ITRST}_restart_${L_NPROC}.nc . - ln -sf ../LONG/SAS_${ITRST}_restart_ice_${L_NPROC}.nc . + ln -sf ../LONG/ORCA2_SAS_ICE_${ITRST}_restart_${L_NPROC}.nc . + ln -sf ../LONG/ORCA2_SAS_ICE_${ITRST}_restart_ice_${L_NPROC}.nc . done cd ${SETTE_DIR} - . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_ORCA2_SAS_ICE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi -if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests +if [ ${DO_REPRO} == "1" ] ; then if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then ITEND=16 # 1 day @@ -987,7 +1012,7 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_REPRO} == "1" ] ; then NPROC=32 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"SAS_48\" + set_namelist namelist_cfg cn_exp \"ORCA2_SAS_ICE_48\" set_namelist namelist_cfg nn_it000 1 set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg jpni 4 @@ -999,7 +1024,7 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false. set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_ORCA2_SAS_ICE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} @@ -1012,7 +1037,7 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_REPRO} == "1" ] ; then NPROC=32 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"SAS_84\" + set_namelist namelist_cfg cn_exp \"ORCA2_SAS_ICE_84\" set_namelist namelist_cfg nn_it000 1 set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg jpni 8 @@ -1024,12 +1049,14 @@ if [ ${config} == "ORCA2_SAS_ICE" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false. set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_ORCA2_SAS_ICE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi + # -------------- # ORCA2_ICE_OBS @@ -1038,13 +1065,14 @@ fi ## Restartability not tested (ASM code not restartable while increments are being applied) if [ ${config} == "ORCA2_ICE_OBS" ] ; then SETTE_CONFIG="ORCA2_ICE_OBS"${SETTE_STG} -## Reproducibility tests if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then ITEND=16 # 1 day else ITEND=80 # 5 days fi + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -1053,8 +1081,9 @@ if [ ${config} == "ORCA2_ICE_OBS" ] ; then # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -d "OCE ICE" ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "key_asminc ${ADD_KEYS}" del_key "key_top ${DEL_KEYS}" fi -if [ ${config} == "ORCA2_ICE_OBS" ] && [ ${DO_RESTART} == "1" ] ; then + ## Reproducibility tests +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="REPRO_4_8" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -1154,6 +1183,9 @@ if [ ${config} == "ORCA2_ICE_OBS" ] && [ ${DO_RESTART} == "1" ] ; then . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi + + # ------------ # AGRIF_DEMO # ----------- @@ -1169,6 +1201,8 @@ if [ ${config} == "AGRIF_DEMO" ] ; then ITRST_1=$( printf "%08d" $(( ${ITEND} / 2 )) ) ITRST_2=$( printf "%08d" $(( ${ITEND} * 4 / 2 )) ) ITRST_3=$( printf "%08d" $(( ${ITEND} * 4 * 3 / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -1177,8 +1211,9 @@ if [ ${config} == "AGRIF_DEMO" ] ; then # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -1188,24 +1223,24 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then NPROC=16 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"AGRIF_LONG\" + set_namelist namelist_cfg cn_exp \"AGRIF_DEMO_LONG\" set_namelist namelist_cfg nn_it000 1 set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) set_namelist namelist_cfg sn_cfctl%l_runstat .true. set_namelist namelist_cfg sn_cfctl%l_trcstat .true. #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false. - set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\" + set_namelist 1_namelist_cfg cn_exp \"AGRIF_DEMO_LONG\" set_namelist 1_namelist_cfg nn_it000 1 set_namelist 1_namelist_cfg nn_itend ${ITEND} set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} / 2 )) set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true. - set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\" + set_namelist 2_namelist_cfg cn_exp \"AGRIF_DEMO_LONG\" set_namelist 2_namelist_cfg nn_it000 1 set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 )) set_namelist 2_namelist_cfg nn_stock $(( ${ITEND} * 4 / 2 )) set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true. - set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\" + set_namelist 3_namelist_cfg cn_exp \"AGRIF_DEMO_LONG\" set_namelist 3_namelist_cfg nn_it000 1 set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 )) set_namelist 3_namelist_cfg nn_stock $(( ${ITEND} * 4 * 3 / 2 )) @@ -1226,7 +1261,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_AGRIF_DEMO.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} export TEST_NAME="SHORT" @@ -1234,7 +1269,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then set_valid_dir clean_valid_dir cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\" + set_namelist namelist_cfg cn_exp \"AGRIF_DEMO_SHORT\" set_namelist namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) @@ -1245,7 +1280,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist namelist_top_cfg ln_rsttr .true. set_namelist namelist_top_cfg nn_rsttr 2 #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false. - set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\" + set_namelist 1_namelist_cfg cn_exp \"AGRIF_DEMO_SHORT\" set_namelist 1_namelist_cfg nn_it000 $(( ${ITEND} / 2 + 1 )) set_namelist 1_namelist_cfg nn_itend ${ITEND} set_namelist 1_namelist_cfg nn_stock $(( ${ITEND} / 2 )) @@ -1255,7 +1290,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist 1_namelist_top_cfg ln_rsttr .true. set_namelist 1_namelist_cfg ln_init_chfrpar .false. set_namelist 1_namelist_top_cfg nn_rsttr 2 - set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\" + set_namelist 2_namelist_cfg cn_exp \"AGRIF_DEMO_SHORT\" set_namelist 2_namelist_cfg nn_it000 $(( ${ITEND} * 4 / 2 + 1 )) set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 )) set_namelist 2_namelist_cfg nn_stock $(( ${ITEND} * 4 / 2 )) @@ -1265,7 +1300,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist 2_namelist_cfg ln_init_chfrpar .false. set_namelist 2_namelist_top_cfg ln_rsttr .true. set_namelist 2_namelist_top_cfg nn_rsttr 2 - set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\" + set_namelist 3_namelist_cfg cn_exp \"AGRIF_DEMO_SHORT\" set_namelist 3_namelist_cfg nn_it000 $(( ${ITEND} * 4 * 3 / 2 + 1 )) set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 )) set_namelist 3_namelist_cfg nn_stock $(( ${ITEND} * 4 * 3 / 2 )) @@ -1275,18 +1310,18 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist 3_namelist_cfg ln_init_chfrpar .false. set_namelist 3_namelist_top_cfg ln_rsttr .true. set_namelist 3_namelist_top_cfg nn_rsttr 2 - set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST}_restart\" - set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST}_restart_ice\" - set_namelist namelist_top_cfg cn_trcrst_in \"AGRIF_LONG_${ITRST}_restart_trc\" - set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST_1}_restart\" - set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST_1}_restart_ice\" - set_namelist 1_namelist_top_cfg cn_trcrst_in \"AGRIF_LONG_${ITRST_1}_restart_trc\" - set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST_2}_restart\" - set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST_2}_restart_ice\" - set_namelist 2_namelist_top_cfg cn_trcrst_in \"AGRIF_LONG_${ITRST_2}_restart_trc\" - set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_${ITRST_3}_restart\" - set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_${ITRST_3}_restart_ice\" - set_namelist 3_namelist_top_cfg cn_trcrst_in \"AGRIF_LONG_${ITRST_3}_restart_trc\" + set_namelist namelist_cfg cn_ocerst_in \"AGRIF_DEMO_LONG_${ITRST}_restart\" + set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_DEMO_LONG_${ITRST}_restart_ice\" + set_namelist namelist_top_cfg cn_trcrst_in \"AGRIF_DEMO_LONG_${ITRST}_restart_trc\" + set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_DEMO_LONG_${ITRST_1}_restart\" + set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_DEMO_LONG_${ITRST_1}_restart_ice\" + set_namelist 1_namelist_top_cfg cn_trcrst_in \"AGRIF_DEMO_LONG_${ITRST_1}_restart_trc\" + set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_DEMO_LONG_${ITRST_2}_restart\" + set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_DEMO_LONG_${ITRST_2}_restart_ice\" + set_namelist 2_namelist_top_cfg cn_trcrst_in \"AGRIF_DEMO_LONG_${ITRST_2}_restart_trc\" + set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_DEMO_LONG_${ITRST_3}_restart\" + set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_DEMO_LONG_${ITRST_3}_restart_ice\" + set_namelist 3_namelist_top_cfg cn_trcrst_in \"AGRIF_DEMO_LONG_${ITRST_3}_restart_trc\" # set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 2 set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 @@ -1304,29 +1339,29 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_RESTART} == "1" ] ; then for (( i=1; i<=$NPROC; i++)) ; do L_NPROC=$(( $i - 1 )) L_NPROC=`printf "%04d\n" ${L_NPROC}` - ln -sf ../LONG/AGRIF_LONG_${ITRST}_restart_${L_NPROC}.nc . - ln -sf ../LONG/AGRIF_LONG_${ITRST}_restart_ice_${L_NPROC}.nc . - ln -sf ../LONG/AGRIF_LONG_${ITRST}_restart_trc_${L_NPROC}.nc . - ln -sf ../LONG/1_AGRIF_LONG_${ITRST_1}_restart_${L_NPROC}.nc . - ln -sf ../LONG/1_AGRIF_LONG_${ITRST_1}_restart_ice_${L_NPROC}.nc . - ln -sf ../LONG/1_AGRIF_LONG_${ITRST_1}_restart_trc_${L_NPROC}.nc . - ln -sf ../LONG/2_AGRIF_LONG_${ITRST_2}_restart_${L_NPROC}.nc . - ln -sf ../LONG/2_AGRIF_LONG_${ITRST_2}_restart_ice_${L_NPROC}.nc . - ln -sf ../LONG/2_AGRIF_LONG_${ITRST_2}_restart_trc_${L_NPROC}.nc . - ln -sf ../LONG/3_AGRIF_LONG_${ITRST_3}_restart_${L_NPROC}.nc . - ln -sf ../LONG/3_AGRIF_LONG_${ITRST_3}_restart_ice_${L_NPROC}.nc . - ln -sf ../LONG/3_AGRIF_LONG_${ITRST_3}_restart_trc_${L_NPROC}.nc . + ln -sf ../LONG/AGRIF_DEMO_LONG_${ITRST}_restart_${L_NPROC}.nc . + ln -sf ../LONG/AGRIF_DEMO_LONG_${ITRST}_restart_ice_${L_NPROC}.nc . + ln -sf ../LONG/AGRIF_DEMO_LONG_${ITRST}_restart_trc_${L_NPROC}.nc . + ln -sf ../LONG/1_AGRIF_DEMO_LONG_${ITRST_1}_restart_${L_NPROC}.nc . + ln -sf ../LONG/1_AGRIF_DEMO_LONG_${ITRST_1}_restart_ice_${L_NPROC}.nc . + ln -sf ../LONG/1_AGRIF_DEMO_LONG_${ITRST_1}_restart_trc_${L_NPROC}.nc . + ln -sf ../LONG/2_AGRIF_DEMO_LONG_${ITRST_2}_restart_${L_NPROC}.nc . + ln -sf ../LONG/2_AGRIF_DEMO_LONG_${ITRST_2}_restart_ice_${L_NPROC}.nc . + ln -sf ../LONG/2_AGRIF_DEMO_LONG_${ITRST_2}_restart_trc_${L_NPROC}.nc . + ln -sf ../LONG/3_AGRIF_DEMO_LONG_${ITRST_3}_restart_${L_NPROC}.nc . + ln -sf ../LONG/3_AGRIF_DEMO_LONG_${ITRST_3}_restart_ice_${L_NPROC}.nc . + ln -sf ../LONG/3_AGRIF_DEMO_LONG_${ITRST_3}_restart_trc_${L_NPROC}.nc . done set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_AGRIF_DEMO.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi -if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_2_8" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -1337,7 +1372,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then NPROC=16 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"AGRIF_28\" + set_namelist namelist_cfg cn_exp \"AGRIF_DEMO_28\" set_namelist namelist_cfg nn_it000 1 set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg jpni 2 @@ -1348,7 +1383,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false. #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false. - set_namelist 1_namelist_cfg cn_exp \"AGRIF_28\" + set_namelist 1_namelist_cfg cn_exp \"AGRIF_DEMO_28\" set_namelist 1_namelist_cfg nn_it000 1 set_namelist 1_namelist_cfg nn_itend ${ITEND} set_namelist 1_namelist_cfg jpni 2 @@ -1357,7 +1392,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt 1_namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 2 set_namelist_opt 1_namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 set_namelist_opt 1_namelist_cfg ln_tile ${USING_TILING} .true. .false. - set_namelist 2_namelist_cfg cn_exp \"AGRIF_28\" + set_namelist 2_namelist_cfg cn_exp \"AGRIF_DEMO_28\" set_namelist 2_namelist_cfg nn_it000 1 set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 )) set_namelist 2_namelist_cfg jpni 2 @@ -1366,7 +1401,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt 2_namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 2 set_namelist_opt 2_namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 set_namelist_opt 2_namelist_cfg ln_tile ${USING_TILING} .true. .false. - set_namelist 3_namelist_cfg cn_exp \"AGRIF_28\" + set_namelist 3_namelist_cfg cn_exp \"AGRIF_DEMO_28\" set_namelist 3_namelist_cfg nn_it000 1 set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 )) set_namelist 3_namelist_cfg jpni 2 @@ -1378,7 +1413,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_AGRIF_DEMO.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} @@ -1391,7 +1426,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then NPROC=16 if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi cd ${EXE_DIR} - set_namelist namelist_cfg cn_exp \"AGRIF_44\" + set_namelist namelist_cfg cn_exp \"AGRIF_DEMO_44\" set_namelist namelist_cfg nn_it000 1 set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg jpni 4 @@ -1403,7 +1438,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt namelist_cfg ln_tile ${USING_TILING} .true. .false. #set_namelist_opt namelist_cfg ln_timing ${USING_TIMING} .true. .false. set_xio_using_server iodef.xml ${USING_MPMD} - set_namelist 1_namelist_cfg cn_exp \"AGRIF_44\" + set_namelist 1_namelist_cfg cn_exp \"AGRIF_DEMO_44\" set_namelist 1_namelist_cfg nn_it000 1 set_namelist 1_namelist_cfg nn_itend ${ITEND} set_namelist 1_namelist_cfg jpni 4 @@ -1412,7 +1447,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt 1_namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 2 set_namelist_opt 1_namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 set_namelist_opt 1_namelist_cfg ln_tile ${USING_TILING} .true. .false. - set_namelist 2_namelist_cfg cn_exp \"AGRIF_44\" + set_namelist 2_namelist_cfg cn_exp \"AGRIF_DEMO_44\" set_namelist 2_namelist_cfg nn_it000 1 set_namelist 2_namelist_cfg nn_itend $(( ${ITEND} * 4 )) set_namelist 2_namelist_cfg jpni 4 @@ -1421,7 +1456,7 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt 2_namelist_cfg nn_hls ${USING_EXTRA_HALO} 3 2 set_namelist_opt 2_namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 set_namelist_opt 2_namelist_cfg ln_tile ${USING_TILING} .true. .false. - set_namelist 3_namelist_cfg cn_exp \"AGRIF_44\" + set_namelist 3_namelist_cfg cn_exp \"AGRIF_DEMO_44\" set_namelist 3_namelist_cfg nn_it000 1 set_namelist 3_namelist_cfg nn_itend $(( ${ITEND} * 4 * 3 )) set_namelist 3_namelist_cfg jpni 4 @@ -1432,14 +1467,14 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist_opt 3_namelist_cfg ln_tile ${USING_TILING} .true. .false. cd ${SETTE_DIR} - . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_AGRIF_DEMO.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi -if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_CORRUPT} == "1" ] ; then -## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom +## test code corruption with AGRIF_DEMO (phase 1) ==> Compile with key_agrif but run with no zoom +if [ ${DO_CORRUPT} == "1" ] ; then if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then ITEND=16 # 1d @@ -1473,15 +1508,14 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_CORRUPT} == "1" ] ; then set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_AGRIF_DEMO.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi - -## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2) -if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_CORRUPT} == "1" ] ; then +## test code corruption with AGRIF_DEMO (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2) +if [ ${DO_CORRUPT} == "1" ] ; then SETTE_CONFIG="AGRIF_DEMO_NOAGRIF"${SETTE_STG} export TEST_NAME="ORCA2" cd ${MAIN_DIR} @@ -1513,12 +1547,15 @@ if [ ${config} == "AGRIF_DEMO" ] && [ ${DO_CORRUPT} == "1" ] ; then # set_xio_using_server iodef.xml ${USING_MPMD} cd ${SETTE_DIR} - . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} + . ./prepare_job.sh input_AGRIF_DEMO.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID} cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi + + # ------- # WED025 # ------- @@ -1531,6 +1568,8 @@ if [ ${config} == "WED025" ] ; then ITEND=720 # 10 days fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} -eq 1 ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) @@ -1540,8 +1579,9 @@ if [ ${config} == "WED025" ] ; then # WED025 uses ln_hpg_isf so remove key_qco if added by default ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r WED025 ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi -if [ ${config} == "WED025" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -1603,8 +1643,8 @@ if [ ${config} == "WED025" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "WED025" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_6_7" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -1659,6 +1699,8 @@ if [ ${config} == "WED025" ] && [ ${DO_REPRO} == "1" ] ; then . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi +fi + done # diff --git a/sette/sette_rpt.sh b/sette/sette_rpt.sh index 3740c091..a86b30cc 100755 --- a/sette/sette_rpt.sh +++ b/sette/sette_rpt.sh @@ -7,7 +7,11 @@ # ######################################################################################### ######################### Start of function definitions ################################# -## +#set -x + +# exit codes +declare -i {REPRO_EC,RESTA_EC,REFCMP_EC,CPUCMP_EC,OCEOUT_EC,AGRIF_EC}=0 + function get_dorv() { if [ $lastchange == 'old' ] ; then dorv=`ls -1rt $vdir/$mach/ | tail -1l ` @@ -43,6 +47,8 @@ function resttest() { # check if directory is here if [ ! -d $vdir/$mach/$dorv/$nam ]; then printf "%-27s %s %s\n" $nam " directory MISSING : " $dorv + echo " please check $vdir/$mach/$dorv/$nam" + RESTA_EC=1 return fi @@ -59,12 +65,14 @@ function resttest() { f2t=$vdir/$mach/$dorv/$nam/SHORT/tracer.stat if [ ! -f $f1s ] && [ ! -f $f1t ] ; then - printf "%-27s %s\n" $nam " incomplete test"; - return; + printf "%-27s %s\n" $nam " incomplete test" + RESTA_EC=1 + return fi if [ ! -f $f2s ] && [ ! -f $f2t ] ; then - printf "%-27s %s\n" $nam " incomplete test"; - return; + printf "%-27s %s\n" $nam " incomplete test" + RESTA_EC=1 + return fi # done_oce=0 @@ -80,6 +88,7 @@ function resttest() { else get_ktdiff f1.tmp$$ $f2s 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)" + RESTA_EC=1 # # Offer view of differences on the second pass # @@ -110,6 +119,7 @@ function resttest() { else get_ktdiff2 f1.tmp$$ $f2t 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)" + RESTA_EC=1 # # Offer view of differences on the second pass # @@ -149,6 +159,8 @@ function reprotest(){ # check if directory is here if [ ! -d $vdir/$mach/$dorv/$nam ]; then printf "%-27s %s %s\n" $nam " directory MISSING : " $dorv + echo " please check $vdir/$mach/$dorv/$nam" + REPRO_EC=R1 return fi # @@ -170,12 +182,14 @@ function reprotest(){ f2t=$vdir/$mach/$dorv/$nam/$rep2/tracer.stat if [ ! -f $f1s ] && [ ! -f $f1t ] ; then - printf "%-27s %s\n" $nam " incomplete test"; - return; + printf "%-27s %s\n" $nam " incomplete test" + REPRO_EC=1 + return fi if [ ! -f $f2s ] && [ ! -f $f2t ] ; then - printf "%-27s %s\n" $nam " incomplete test"; - return; + printf "%-27s %s\n" $nam " incomplete test" + REPRO_EC=1 + return fi # done_oce=0 @@ -189,6 +203,7 @@ function reprotest(){ else get_ktdiff $f1s $f2s 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)" + REPRO_EC=1 # # Offer view of differences on the second pass # @@ -216,6 +231,7 @@ function reprotest(){ else get_ktdiff2 $f1t $f2t 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)" + REPRO_EC=1 # # Offer view of differences on the second pass # @@ -256,10 +272,14 @@ function runcmpres(){ # check if reference directory is present if [ ! -d $vdirref/$mach/$dorvref/$nam ]; then printf "%-27s %s\n" $nam " REFERENCE directory at $dorvref is MISSING" + echo " please check $vdirref/$mach/$dorvref/$nam" + REFCMP_EC=1 return fi if [ ! -d $vdir/$mach/$dorv/$nam ]; then printf "%-27s %s\n" $nam " VALID directory at $dorv is MISSING" + echo " please check $vdir/$mach/$dorv/$nam" + REFCMP_EC=1 return fi @@ -272,12 +292,14 @@ function runcmpres(){ f2s=$vdirref/$mach/$dorvref/${nam}/${TESTD}/run.stat f2t=$vdirref/$mach/$dorvref/${nam}/${TESTD}/tracer.stat if [ ! -f $f1s ] && [ ! -f $f1t ] ; then - printf "%-20s %s\n" $nam " incomplete test"; - return; + printf "%-20s %s\n" $nam " incomplete test" + REFCMP_EC=1 + return fi if [ ! -f $f2s ] && [ ! -f $f2t ] ; then - printf "%-20s %s\n" $nam " incomplete test"; - return; + printf "%-20s %s\n" $nam " incomplete test" + REFCMP_EC=1 + return fi # done_oce=0 @@ -291,6 +313,7 @@ function runcmpres(){ else get_ktdiff $f1s $f2s printf "%-20s %s %s %-5s (%s)\n" $nam " run.stat files are DIFFERENT (results are different after " $ktdiff " time steps) " ${TESTD} + REFCMP_EC=1 # # Offer view of differences on the second pass # @@ -315,6 +338,7 @@ function runcmpres(){ else get_ktdiff2 $f1t $f2t printf "%-20s %s %s %-5s (%s)\n" $nam " tracer.stat files are DIFFERENT (results are different after " $ktdiff " time steps) " ${TESTD} + REFCMP_EC=1 # # Offer view of differences on the second pass # @@ -343,9 +367,11 @@ function runcmptim(){ # # check if reference directory is present if [ ! -d $vdirref/$mach/$dorvref/$nam ]; then + CPUCMP_EC=1 return fi if [ ! -d $vdir/$mach/$dorv/$nam ]; then + CPUCMP_EC=1 return fi @@ -399,7 +425,8 @@ function runtest(){ f1o=$vdir/$mach/$dorv/$nam/$tdir/ocean.output if [ ! -f $f1o ] ; then if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam " ocean.output MISSING : " $dorv ; fi - return; + OCEOUT_EC=1 + return else nerr=`grep 'E R R O R' $f1o | wc -l` if [[ $nerr > 0 ]]; then @@ -411,12 +438,15 @@ function runtest(){ echo '' echo "full ocean.output available here: $f1o" fi - return; + OCEOUT_EC=1 + return fi fi done else - if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam " directory MISSING : " $dorv ; fi + if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam " directory MISSING : " $dorv ; fi + OCEOUT_EC=1 + return fi } @@ -445,6 +475,7 @@ function identictest(){ else get_ktdiff $f1s $f2s printf "\e[38;5;196m%-5s %s %-5s %s %s %s %s %-5s %s\e[0m\n" $rep "AGRIF vs" $rep "NOAGRIF run.stat changed - FAILED : " $dorv $dorv2 " (results are different after " $ktdiff " time steps)" + AGRIF_EC=1 # # Offer view of differences on the second pass # @@ -473,14 +504,14 @@ function identictest(){ SETTE_DIR=$(cd $(dirname "$0"); pwd) MAIN_DIR=$(dirname $SETTE_DIR) . ./param.cfg - TEST_CONFIGS_AVAILABLE=${TEST_CONFIGS_AVAILABLE[@]:-${TEST_CONFIGS[@]}} # Workaround for some dated param.cfgs files + TEST_CONFIGS_AVAILABLE=${TEST_CONFIGS_AVAILABLE[@]:-${TEST_CONFIGS[@]}} # Workaround for some dated param.cfgs files if [ -z $USER_INPUT ] ; then USER_INPUT='yes' ; fi # Default: yes => request user input on decisions. # (but may br inherited/imported from sette.sh) - mach=${COMPILER} # overwrite revision (later) or compiler if [ $# -gt 0 ]; then - while getopts r:R:c:v:V:ubh option; do + echo "" + while getopts n:r:R:c:v:V:ubh option; do case $option in c) mach=$OPTARG;; r) rev=$OPTARG;; @@ -488,14 +519,20 @@ function identictest(){ v) SETTE_SUB_VAL=$OPTARG;; V) SETTE_SUB_VAL2=$OPTARG if [ -d ${NEMO_VALIDATION_DIR}/${SETTE_SUB_VAL2} ] ; then - export NEMO_VALIDATION_REF=${NEMO_VALIDATION_DIR}/${SETTE_SUB_VAL2} + NEMO_VALIDATION_REF=${NEMO_VALIDATION_DIR}/${SETTE_SUB_VAL2} else echo "Requested comparison subdirectory: ${NEMO_VALIDATION_DIR}/${SETTE_SUB_VAL2} does not exist" fi ;; u) USER_INPUT='no';; b) mach=${mach//_DEBUG}_DEBUG - DEBUG="with DEBUG (-b) option";; + DEBUG="with DEBUG (-b) option" + echo "-b: will use DEBUG compilation directory" + echo "";; + n) OPTSTR="$OPTARG" + TEST_CONFIGS=(${OPTSTR}) + echo "-n: Configuration(s) ${TEST_CONFIGS[@]} will be tested if they are available" + echo "";; h | *) echo '' echo 'sette_rpt.sh : ' echo ' display result for the latest change' @@ -521,86 +558,58 @@ function identictest(){ # if $1 (remaining arguments) if [[ ! -z $1 ]] ; then rev=$1 ; fi - # Check that git branch is usable - git branch --show-current >&/dev/null - if [[ $? == 0 ]] ; then - # subdirectory below NEMO_VALIDATION_DIR defaults to branchname - NAM_MAIN="$(git branch --show-current)" - else - # subdirectory below NEMO_VALIDATION_DIR defaults to "MAIN" - NAM_MAIN="MAIN" - fi - if [ ! -z $SETTE_SUB_VAL ] ; then - export NEMO_VALIDATION_DIR=$NEMO_VALIDATION_DIR/$SETTE_SUB_VAL +# https://stackoverflow.com/questions/6059336/how-to-find-the-current-git-branch-in-detached-head-state +branchname=$(git log -1 --pretty=%D HEAD | sed 's|.*origin/||g;s|, .*||g;s|.*-> ||g' ) +if [ ! -z $SETTE_SUB_VAL ] ; then + NEMO_VALIDATION_DIR=$NEMO_VALIDATION_DIR/$SETTE_SUB_VAL if [ -d $NEMO_VALIDATION_REF/$SETTE_SUB_VAL ] && [ -z $SETTE_SUB_VAL2 ] && [ ${USER_INPUT} == "yes" ] ; then - while true; do - read -p "$NEMO_VALIDATION_REF/$SETTE_SUB_VAL exists. Do you wish to use it as a reference? " yn - case $yn in - [Yy]* ) export NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/$SETTE_SUB_VAL; break;; - [Nn]* ) echo "Ok, continuing with ${NEMO_VALIDATION_REF}/${NAM_MAIN} as the reference directory" - export NEMO_VALIDATION_REF=${NEMO_VALIDATION_REF}/${NAM_MAIN} - break - ;; - * ) echo "Please answer yes or no.";; - esac - done - elif [ -d $NEMO_VALIDATION_REF/$SETTE_SUB_VAL ] && [ -z $SETTE_SUB_VAL2 ] ; then - # No user input: make a best guess as to intent - export NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/$SETTE_SUB_VAL - elif [ -z $SETTE_SUB_VAL2 ] ; then - # No user input: default to branchname or MAIN - export NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/${NAM_MAIN} - fi - else - export NEMO_VALIDATION_DIR=${NEMO_VALIDATION_DIR}/${NAM_MAIN} + while true; do + read -p "$NEMO_VALIDATION_REF/$SETTE_SUB_VAL exists. Do you wish to use it as a reference? " yn + case $yn in + [Yy]* ) NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/$SETTE_SUB_VAL; break;; + [Nn]* ) echo "Ok, continuing with ${NEMO_VALIDATION_REF}/${branchname} as the reference directory" + NEMO_VALIDATION_REF=${NEMO_VALIDATION_REF}/${branchname} + break + ;; + * ) echo "Please answer yes or no.";; + esac + done + # No user input: make a best guess as to intent + elif [ -d $NEMO_VALIDATION_REF/$SETTE_SUB_VAL ] && [ -z $SETTE_SUB_VAL2 ] ; then + NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/$SETTE_SUB_VAL + # No user input: default to branchname or MAIN + elif [ -z $SETTE_SUB_VAL2 ] ; then + NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/${branchname} + fi +else + NEMO_VALIDATION_DIR=${NEMO_VALIDATION_DIR}/${branchname} if [ -z $SETTE_SUB_VAL2 ] ; then - export NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/${NAM_MAIN} + NEMO_VALIDATION_REF=$NEMO_VALIDATION_REF/${branchname} fi - fi - NEMO_VALID=${NEMO_VALIDATION_DIR} - NEMO_VALID_REF=${NEMO_VALIDATION_REF} - if [ ! -z $refrev ] ; then - NEMO_REV_REF=${refrev} - fi -# - if [ ! -d $NEMO_VALID ]; then - echo "$NEMO_VALID validation directory not found" - exit - fi +fi +NEMO_VALID=${NEMO_VALIDATION_DIR} +NEMO_VALID_REF=${NEMO_VALIDATION_REF} +if [ ! -z $refrev ] ; then + NEMO_REV_REF=${refrev} +fi + +if [ ! -d $NEMO_VALID ]; then + echo "$NEMO_VALID validation directory not found" + exit +fi # # # Show current revision tag and branch name # echo "" -localchanges=`git status --short -uno | wc -l` -# Check that git branch is usable and use it to detect detached HEADs -git branch --show-current >& /dev/null -if [[ $? == 0 ]] ; then - branchname="$(git branch --show-current)" - revision=`git rev-parse --short HEAD` - if [ -z $branchname ] ; then - # Probabably on a detached HEAD (possibly testing an old commit). - # Verify this and try to recover original commit - MORE_INFO="$(git branch -a | head -1l | sed -e's/.*(//' -e 's/)//' )" - if [[ "${MORE_INFO}" == *"detached"* ]] ; then - # There is no robust way to recover a branch name in a detached state - # so just use the commit with a prefix - branchname="detached_"${revision} - else - branchname="Unknown" - fi - fi -else - branchname="Unknown" -fi +nemo_revision=$(git -C ${MAIN_DIR} rev-parse --short HEAD 2> /dev/null) rev_date0=`git log -1 | grep Date | sed -e 's/.*Date: *//' -e's/ +.*$//'` rev_date=`${DATE_CONV}"${rev_date0}" +"%y%j"` -revision=${rev_date}_${revision} +revision=${rev_date}_${nemo_revision} +localchanges=`git status --short -uno | wc -l` if [[ $localchanges > 0 ]] ; then - echo "Current code is : $branchname @ $revision ( with local changes )" lastchange=${revision}+ else - echo "Current code is : $branchname @ $revision" lastchange=$revision fi @@ -611,9 +620,9 @@ echo "" echo "SETTE validation report generated for : " echo "" if [[ $localchanges > 0 ]] ; then - echo " $branchname @ $revision (with local changes)" + echo " $branchname @ $nemo_revision (with local changes)" else - echo " $branchname @ $revision" + echo " $branchname @ $nemo_revision" fi echo "" echo " on $COMPILER arch file $DEBUG" @@ -638,7 +647,7 @@ do # Restartability test echo "" echo " !----restart----! " - for restart_test in ${TEST_CONFIGS_AVAILABLE[@]} + for restart_test in ${TEST_CONFIGS[@]/ORCA2_ICE_OBS} do [ "${restart_test}" != "ORCA2_ICE_OBS" ] && resttest $NEMO_VALID $restart_test $pass done @@ -646,17 +655,21 @@ do # Reproducibility tests echo "" echo " !----repro----! " - for repro_test in ${TEST_CONFIGS_AVAILABLE[@]} + for repro_test in ${TEST_CONFIGS[@]} do - [ "${repro_test}" != "OVERFLOW" -a "${repro_test}" != "LOCK_EXCHANGE" ] && reprotest $NEMO_VALID $repro_test $pass + if [[ ${repro_test} != *"OVERFLOW"* && ${repro_test} != *"LOCK_EXCHANGE"* ]]; then + reprotest $NEMO_VALID $repro_test $pass + fi done # AGRIF special check to ensure results are unchanged with and without key_agrif - echo "" - echo " !----agrif check----! " - dir1=AGRIF_DEMO_NOAGRIF - dir2=AGRIF_DEMO - identictest $NEMO_VALID $dir1 $dir2 $pass + if [[ ${TEST_CONFIGS[@]} =~ "AGRIF" ]]; then + echo "" + echo " !----agrif check----! " + dir1=AGRIF_DEMO_NOAGRIF + dir2=AGRIF_DEMO + identictest $NEMO_VALID $dir1 $dir2 $pass + fi # # before/after tests if [ $lastchange == 'old' ] ; then @@ -666,30 +679,31 @@ do else echo "" echo " !----result comparison check----! " - if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ]; then + if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ] && [ $NEMO_REV_REF != "0000" ]; then echo '' echo 'check result differences between :' echo "VALID directory : $NEMO_VALID at rev $lastchange" echo 'and' echo "REFERENCE directory : $NEMO_VALID_REF at rev $NEMO_REV_REF" echo '' - for runcmp_test in ${TEST_CONFIGS_AVAILABLE[@]} + for runcmp_test in ${TEST_CONFIGS[@]} do runcmpres $NEMO_VALID $runcmp_test $NEMO_VALID_REF $NEMO_REV_REF $pass done echo '' echo 'Report timing differences between REFERENCE and VALID (if available) :' - for repro_test in ${TEST_CONFIGS_AVAILABLE[@]} + for repro_test in ${TEST_CONFIGS[@]} do runcmptim $NEMO_VALID $repro_test $NEMO_VALID_REF $NEMO_REV_REF $pass done else echo '' - echo ' No path for comparison specified. Result are not compare with any other revision. ' + echo ' No path or revision for comparison specified. Result are not compare with any other revision. ' echo ' To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg. ' echo '' fi fi done # -exit +echo "SETTE Report Exit Code: "$((REPRO_EC+RESTA_EC+REFCMP_EC+CPUCMP_EC+OCEOUT_EC+AGRIF_EC)) +exit $((REPRO_EC+RESTA_EC+REFCMP_EC+CPUCMP_EC+OCEOUT_EC+AGRIF_EC)) diff --git a/sette/sette_test-cases.sh b/sette/sette_test-cases.sh index d15a095c..9dc89682 100755 --- a/sette/sette_test-cases.sh +++ b/sette/sette_test-cases.sh @@ -112,7 +112,7 @@ CONFIG_DIR0=${MAIN_DIR}/tests TOOLS_DIR=${MAIN_DIR}/tools if [ -n "${CUSTOM_DIR}" ]; then - NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) + #NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) CMP_NAM_L=$(echo ${CMP_NAM} | tr '[:upper:]' '[:lower:]') if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]]; then export CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}_DEBUG @@ -143,7 +143,7 @@ do # --------- # OVERFLOW # --------- -if [ ${config} == "OVERFLOW" ] ; then +if [ ${config} == "OVERFLOW" ]; then SETTE_CONFIG="OVERFLOW"${SETTE_STG} if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then @@ -152,16 +152,19 @@ if [ ${config} == "OVERFLOW" ] ; then ITEND=120 fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} == "1" ] ; then cd ${MAIN_DIR} # - # + # syncronisation if target directory/file exist (not done by makenemo) clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a OVERFLOW ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "OVERFLOW" ] && [ ${DO_RESTART} == "1" ] ; then - ## Restartability tests for OVERFLOW + +## Restartability tests for OVERFLOW +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -210,12 +213,11 @@ if [ ${config} == "OVERFLOW" ] && [ ${DO_RESTART} == "1" ] ; then cd ${SETTE_DIR} . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} - fi -if [ ${config} == "OVERFLOW" ] && [ ${DO_PHYOPTS} == "1" ] ; then - ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps - ## Needed namelist-xxxx for every type of run tested +## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps +## Needed namelist-xxxx for every type of run tested +if [ ${DO_PHYOPTS} == "1" ] ; then if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then ITEND=12 @@ -255,6 +257,9 @@ if [ ${config} == "OVERFLOW" ] && [ ${DO_PHYOPTS} == "1" ] ; then done fi +fi + + # -------------- # LOCK_EXCHANGE # -------------- @@ -267,17 +272,19 @@ if [ ${config} == "LOCK_EXCHANGE" ] ; then ITEND=120 fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} == "1" ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) - # clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a LOCK_EXCHANGE ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_RESTART} == "1" ] ; then - ## Restartability tests for LOCK_EXCHANGE + +## Restartability tests for LOCK_EXCHANGE +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -328,9 +335,9 @@ if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_PHYOPTS} == "1" ] ; then - ## Test for all advection, vector form, flux form: test runability and complete all time steps - ## Needed namelist-xxxx for every type of run tested +## Test for all advection, vector form, flux form: test runability and complete all time steps +## Needed namelist-xxxx for every type of run tested +if [ ${DO_PHYOPTS} == "1" ] ; then if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then ITEND=12 @@ -373,6 +380,9 @@ if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_PHYOPTS} == "1" ] ; then done fi +fi + + # --------- # VORTEX # --------- @@ -386,17 +396,19 @@ if [ ${config} == "VORTEX" ] ; then fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) ITRST_1=$( printf "%08d" $(( ${ITEND} * 3 / 2 )) ) + +if [ ${DO_COMPILE} == "1" ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) - # clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a VORTEX ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "VORTEX" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests for VORTEX +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -478,9 +490,8 @@ if [ ${config} == "VORTEX" ] && [ ${DO_RESTART} == "1" ] ; then . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi -if [ ${config} == "VORTEX" ] && [ ${DO_REPRO} == "1" ] ; then - ## Reproducibility tests for VORTEX +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_2_3" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -565,6 +576,8 @@ if [ ${config} == "VORTEX" ] && [ ${DO_REPRO} == "1" ] ; then fi +fi + # --------- # ICE_AGRIF @@ -579,18 +592,20 @@ if [ ${config} == "ICE_AGRIF" ] ; then fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) ITRST_1=$( printf "%08d" $(( ${ITEND} * 3 / 2 )) ) + +if [ ${DO_COMPILE} == "1" ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) - # clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} # # ICE_AGRIF uses linssh so remove key_qco if added by default ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ICE_AGRIF ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi -if [ ${config} == "ICE_AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests for ICE_AGRIF +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -681,9 +696,8 @@ if [ ${config} == "ICE_AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "ICE_AGRIF" ] && [ ${DO_REPRO} == "1" ] ; then - ## Reproducibility tests for ICE_AGRIF +if [ ${DO_REPRO} == "1" ] ; then export TEST_NAME="REPRO_2_3" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -764,10 +778,13 @@ if [ ${config} == "ICE_AGRIF" ] && [ ${DO_REPRO} == "1" ] ; then fi +fi + + # ------ # ISOMIP+ # ------ -if [ ${config} == "ISOMIP+" ] ; then +if [ ${config} == "ISOMIP+" ]; then SETTE_CONFIG="ISOMIP+"${SETTE_STG} if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then @@ -776,18 +793,20 @@ if [ ${config} == "ISOMIP+" ] ; then ITEND=1200 fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${DO_COMPILE} == "1" ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) - # clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} # # ISOMIP+ uses ln_hpg_isf so remove key_qco if added by default ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ISOMIP+ ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi -if [ ${config} == "ISOMIP+" ] && [ ${DO_RESTART} == "1" ] ; then + ## Restartability tests +if [ ${DO_RESTART} == "1" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -846,8 +865,8 @@ if [ ${config} == "ISOMIP+" ] && [ ${DO_RESTART} == "1" ] ; then fi -if [ ${config} == "ISOMIP+" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests +if [ ${DO_REPRO} == "1" ] ; then if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then ITEND=12 @@ -907,11 +926,13 @@ if [ ${config} == "ISOMIP+" ] && [ ${DO_REPRO} == "1" ] ; then fi +fi + # --------- # SWG # --------- -if [ ${config} == "SWG" ] && [ ${USING_QCO} == "yes" ] ; then +if [ ${config} == "SWG" ] ; then SETTE_CONFIG="SWG"${SETTE_STG} if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM_L} =~ ("debug"|"dbg") ]] then @@ -920,17 +941,19 @@ if [ ${config} == "SWG" ] && [ ${USING_QCO} == "yes" ] ; then ITEND=1728 fi ITRST=$( printf "%08d" $(( ${ITEND} / 2 )) ) + +if [ ${USING_QCO} == "yes" ] && [ ${DO_COMPILE} == "1" ] ; then cd ${MAIN_DIR} # # syncronisation if target directory/file exist (not done by makenemo) - # clean_config ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} sync_config ${CONFIG_DIR0}/${config} ${CMP_DIR:-${CONFIG_DIR0}}/${SETTE_CONFIG} # ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a SWG ${CUSTOM_DIR:+-t ${CMP_DIR}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi -if [ ${config} == "SWG" ] && [ ${DO_RESTART} == "1" ] && [ ${USING_QCO} == "yes" ] ; then + ## Restartability tests for SWG +if [ ${DO_RESTART} == "1" ] && [ ${USING_QCO} == "yes" ] ; then export TEST_NAME="LONG" cd ${SETTE_DIR} . ./prepare_exe_dir.sh @@ -989,9 +1012,8 @@ if [ ${config} == "SWG" ] && [ ${DO_RESTART} == "1" ] && [ ${USING_QCO} == "yes" . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} fi -if [ ${config} == "SWG" ] && [ ${DO_REPRO} == "1" ] && [ ${USING_QCO} == "yes" ] ; then - ## Reproducibility tests for SWG +if [ ${DO_REPRO} == "1" ] && [ ${USING_QCO} == "yes" ] ; then export TEST_NAME="REPRO_2_3" cd ${MAIN_DIR} cd ${SETTE_DIR} @@ -1053,6 +1075,7 @@ if [ ${config} == "SWG" ] && [ ${DO_REPRO} == "1" ] && [ ${USING_QCO} == "yes" ] fi +fi #---- -- GitLab