Commit ca6ce86e authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

Merge branch 'release_5.11' into 'master'

Release 5.11

See merge request mhm/mhm!60
parents b7181fea c53cc2e8
# Created by .ignore support plugin (hsz.mobi)
# Exclusions
./mhm
*.g90
*.o
*.mod
*.a
*.so
*.nc
test_basin/
test_basin_2/
src/*/*.release/
src/*/*.debug/
test_domain/output_b1/
test_domain_2/output/
test_domain/restart/
test_domain_2/restart/
*prog_for_check
*terminal
### Python template
# Byte-compiled / optimized / DLL files
......@@ -607,3 +612,6 @@ bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
# VSCode settings file
.vscode/
# to use the env-var "GIT_CLONE_PATH", set the following in
# ./gitlab-runner/config.toml under [[runners]]:
# [runners.custom_build_dir]
# enabled = true
# This will prevent git clone conflicts for jobs ran in parallel
stages:
- info
- build
- valgrind
- test
- coverage
- deploy
show-env-vars:
stage: info
variables:
GIT_STRATEGY: none
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME
SEP: "##################################################################"
S00: "commit date - "
S01: "project: ${CI_PROJECT_PATH}"
S02: "branch: ${CI_COMMIT_REF_NAME}"
S03: "commit: ${CI_COMMIT_SHA}"
S04: "commit msg: ${CI_COMMIT_MESSAGE}"
S05: "clone base path: "
S06: "runner token: ${CI_RUNNER_SHORT_TOKEN}"
script:
- echo -e "${SEP}\n${S00}$(date)\n${SEP}\n${S01}\n${S02}\n${S03}\n${S04}\n${SEP}\n${S05}${GIT_CLONE_PATH}\n${S06}\n${SEP}"
documentation:
only:
- develop
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- module load foss/2019b
- module load texlive/2019
- module load Graphviz/2.42.2
- module load Anaconda3
- source activate /global/apps/mhm_checks/mhm_env
# use doxygen from the mhm_env conda environment
- doxygen doc/doxygen.config > doxygen_log_dev.txt
# create pdf documentation
- cd latex/ && make > ../doxygen_latex_dev.txt
- cp refman.pdf ../html/mhm_doc.pdf
- cp refman.pdf ../mhm_doc_dev.pdf
- cd .. && mv html html_dev
- mv doxygen_warn.txt doxygen_warn_dev.txt
- rm -rf latex
# same for master
- git checkout master
- test -f doc/doxygen-1.8.8.config && cp doc/doxygen-1.8.8.config doc/doxygen.config
- doxygen doc/doxygen.config > doxygen_log_mas.txt
- cd latex/ && make > ../doxygen_latex_mas.txt
- cp refman.pdf ../html/mhm_doc.pdf
- cp refman.pdf ../mhm_doc_mas.pdf
- cd .. && mv html html_mas
# care about warnings file (maybe missing on master)
- |
if [ -f doxygen_warn.txt ]; then
mv doxygen_warn.txt doxygen_warn_mas.txt
else
touch doxygen_warn_mas.txt
fi
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- html_dev
- mhm_doc_dev.pdf
- doxygen_log_dev.txt
- doxygen_latex_dev.txt
- doxygen_warn_dev.txt
- html_mas
- mhm_doc_mas.pdf
- doxygen_log_mas.txt
- doxygen_latex_mas.txt
- doxygen_warn_mas.txt
when: always
cmake-nag62:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.nag62
- source CI-scripts/compile
- source CI-scripts/compile_debug
artifacts:
paths:
- mhm
- mhm_debug
cmake-gcc73:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.gcc73
- source CI-scripts/compile
- source CI-scripts/compile_debug
- source CI-scripts/compile_OpenMP
- source CI-scripts/compile_OpenMP_debug
artifacts:
paths:
- mhm
- mhm_debug
- mhm_openmp
- mhm_openmp_debug
cmake-gcc73MPI:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.gcc73MPI
- source CI-scripts/compile_MPI
- source CI-scripts/compile_MPI_debug
artifacts:
paths:
- mhm_mpi
- mhm_mpi_debug
cmake-gcc83:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.gcc83
- source CI-scripts/compile
- source CI-scripts/compile_debug
- source CI-scripts/compile_OpenMP
- source CI-scripts/compile_OpenMP_debug
artifacts:
paths:
- mhm
- mhm_debug
- mhm_openmp
- mhm_openmp_debug
cmake-gcc83MPI:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.gcc83MPI
- source CI-scripts/compile_MPI
- source CI-scripts/compile_MPI_debug
artifacts:
paths:
- mhm_mpi
- mhm_mpi_debug
cmake-intel18:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.intel18
- source CI-scripts/compile
- source CI-scripts/compile_debug
- source CI-scripts/compile_OpenMP
- source CI-scripts/compile_OpenMP_debug
artifacts:
paths:
- mhm
- mhm_debug
- mhm_openmp
- mhm_openmp_debug
cmake-intel18MPI:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.intel18MPI
- source CI-scripts/compile_MPI
- source CI-scripts/compile_MPI_debug
artifacts:
paths:
- mhm_mpi
- mhm_mpi_debug
cmake-intel20:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.intel20
- source CI-scripts/compile
- source CI-scripts/compile_debug
- source CI-scripts/compile_OpenMP
- source CI-scripts/compile_OpenMP_debug
artifacts:
paths:
- mhm
- mhm_debug
- mhm_openmp
- mhm_openmp_debug
cmake-intel20MPI:
stage: build
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
script:
- source moduleLoadScripts/eve.intel20MPI
- source CI-scripts/compile_MPI
- source CI-scripts/compile_MPI_debug
artifacts:
paths:
- mhm_mpi
- mhm_mpi_debug
# only check latest compiler versions with valgrind
# valgrind-gcc73:
# when: always
# stage: valgrind
# variables:
# GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
# needs:
# - job: cmake-gcc73
# artifacts: true
# script:
# - source moduleLoadScripts/eve.gcc73
# - module load Anaconda3
# - source activate /global/apps/mhm_checks/mhm_env
# - valgrind --version
# - valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./mhm_debug
# # execute mem-use check
# - valgrind --tool=massif --stacks=yes --time-unit=i --massif-out-file=massif.out.0 ./mhm_debug
# - ms_print massif.out.0
# artifacts:
# paths:
# - massif.out.0
#
# valgrind-intel18:
# when: always
# stage: valgrind
# variables:
# GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
# needs:
# - job: cmake-intel18
# artifacts: true
# script:
# - source moduleLoadScripts/eve.intel18
# - module load Anaconda3
# - source activate /global/apps/mhm_checks/mhm_env
# - valgrind --version
# - valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./mhm_debug
# # execute mem-use check
# - valgrind --tool=massif --stacks=yes --time-unit=i --massif-out-file=massif.out.0 ./mhm_debug
# - ms_print massif.out.0
# artifacts:
# paths:
# - massif.out.0
valgrind-nag62:
when: always
stage: valgrind
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-nag62
artifacts: true
script:
- source moduleLoadScripts/eve.nag62
- module load Anaconda3
- source activate /global/apps/mhm_checks/mhm_env
- valgrind --version
- valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./mhm_debug
# execute mem-use check
- valgrind --tool=massif --stacks=yes --time-unit=i --massif-out-file=massif.out.0 ./mhm_debug
- ms_print massif.out.0
artifacts:
paths:
- massif.out.0
valgrind-gcc83:
when: always
stage: valgrind
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-gcc83
artifacts: true
script:
- source moduleLoadScripts/eve.gcc83
- module load Anaconda3
- source activate /global/apps/mhm_checks/mhm_env
- valgrind --version
- valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./mhm_debug
# execute mem-use check
- valgrind --tool=massif --stacks=yes --time-unit=i --massif-out-file=massif.out.0 ./mhm_debug
- ms_print massif.out.0
artifacts:
paths:
- massif.out.0
valgrind-intel20:
when: always
stage: valgrind
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-intel20
artifacts: true
script:
- source moduleLoadScripts/eve.intel20
- module load Anaconda3
- source activate /global/apps/mhm_checks/mhm_env
- valgrind --version
- valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./mhm_debug
# execute mem-use check
- valgrind --tool=massif --stacks=yes --time-unit=i --massif-out-file=massif.out.0 ./mhm_debug
- ms_print massif.out.0
artifacts:
paths:
- massif.out.0
check-nag62:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-nag62
artifacts: true
script:
- source moduleLoadScripts/eve.nag62
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm
artifacts:
when: always
paths:
- check/logs/
check-nag62DEBUG:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-nag62
artifacts: true
script:
- source moduleLoadScripts/eve.nag62
- source CI-scripts/pre_check
# skip cases with optimization due to overflow in the random-number-generator (NAG uses -ieee=stop in DEBUG)
- python -u run_mhm_checks.py -l logs -e ../mhm_debug -s case_03 case_06 case_07 case_08 case_11
artifacts:
when: always
paths:
- check/logs/
check-gcc73:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-gcc73
artifacts: true
script:
- source moduleLoadScripts/eve.gcc73
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_debug ../mhm ../mhm_openmp_debug ../mhm_openmp -t 4
artifacts:
when: always
paths:
- check/logs/
check-gcc73MPI:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-gcc73MPI
artifacts: true
script:
- source moduleLoadScripts/eve.gcc73MPI
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_mpi_debug ../mhm_mpi -m 4
artifacts:
when: always
paths:
- check/logs/
check-gcc83:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-gcc83
artifacts: true
script:
- source moduleLoadScripts/eve.gcc83
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_debug ../mhm ../mhm_openmp_debug ../mhm_openmp -t 4
artifacts:
when: always
paths:
- check/logs/
check-gcc83MPI:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-gcc83MPI
artifacts: true
script:
- source moduleLoadScripts/eve.gcc83MPI
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_mpi_debug ../mhm_mpi -m 4
artifacts:
when: always
paths:
- check/logs/
check-intel18:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-intel18
artifacts: true
script:
- source moduleLoadScripts/eve.intel18
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_debug ../mhm ../mhm_openmp_debug ../mhm_openmp -t 4
artifacts:
when: always
paths:
- check/logs/
check-intel18MPI:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-intel18MPI
artifacts: true
script:
- source moduleLoadScripts/eve.intel18MPI
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_mpi_debug ../mhm_mpi -m 4
artifacts:
when: always
paths:
- check/logs/
check-intel20:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-intel20
artifacts: true
script:
- source moduleLoadScripts/eve.intel20
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_debug ../mhm ../mhm_openmp_debug ../mhm_openmp -t 4
artifacts:
when: always
paths:
- check/logs/
check-intel20MPI:
when: always
stage: test
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: cmake-intel20MPI
artifacts: true
script:
- source moduleLoadScripts/eve.intel20MPI
- source CI-scripts/pre_check
- python -u run_mhm_checks.py -l logs -e ../mhm_mpi_debug ../mhm_mpi -m 4
artifacts:
when: always
paths:
- check/logs/
coverage-gcc73:
when: always
stage: coverage
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_RUNNER_SHORT_TOKEN/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/$CI_JOB_NAME
needs:
- job: check-gcc73
script:
# gcov is part of GCC
- source moduleLoadScripts/eve.gcc73
# we need lcov from the conda environment to create html sites
- module load Anaconda3
- source activate /global/apps/mhm_checks/mhm_env
# create build folder
- mkdir build && cd build
# run cmake with coverage support
- cmake -DCMAKE_WITH_COVERAGE:STRING=ON ..
# run all check-case for coverage calculation
- make mhm_coverage_CI
# copy the output to a top-level folder
- cd .. && mkdir coverage
- cp build/mhm_coverage_CI/* coverage -R
artifacts:
when: always
paths:
- coverage
pages:
only:
- develop
stage: deploy
dependencies:
- documentation
- coverage-gcc73
script:
# create public dir (remove if already present)
- test -d public && rm -rf public
- mkdir -p public
# create the subdir
- mkdir public/stable/
- mkdir public/latest/
# copy the doxygen generated html page to the public site
- cp html_mas/* public/stable/ -R
- cp html_dev/* public/latest/ -R
# create an index.html that redirects to the master documentation (in master folder)
- cp doc/html_files/index.html public/
# create the coverage site
- mkdir -p public/coverage
- cp coverage/* public/coverage/ -R
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- public
when: always
mkdir release
cd release/
cmake ..
make -j 4
cd ..
cp release/mhm .
\ No newline at end of file
mkdir mpi_release
cd mpi_release/
cmake -DCMAKE_WITH_MPI:STRING=ON ..
make -j 4
cd ..
cp mpi_release/mhm ./mhm_mpi
\ No newline at end of file
mkdir mpi_debug
cd mpi_debug/
cmake -DCMAKE_WITH_MPI:STRING=ON -DCMAKE_BUILD_TYPE=Debug ..
make -j 4
cd ..
cp mpi_debug/mhm ./mhm_mpi_debug
\ No newline at end of file
mkdir openmp_release
cd openmp_release/
cmake -DCMAKE_WITH_OpenMP:STRING=ON ..
make -j 4
cd ..
cp openmp_release/mhm ./mhm_openmp
\ No newline at end of file
mkdir openmp_debug
cd openmp_debug/
cmake -DCMAKE_WITH_OpenMP:STRING=ON -DCMAKE_BUILD_TYPE=Debug ..
make -j 4
cd ..
cp openmp_debug/mhm ./mhm_openmp_debug
\ No newline at end of file
mkdir debug
cd debug/
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j 4
cd ..
cp debug/mhm ./mhm_debug
\ No newline at end of file
module load Anaconda3
source activate /global/apps/mhm_checks/mhm_env
cd check/
\ No newline at end of file
#!/bin/bash
for path in ../check/case_[0-9][0-9]; do
echo $path
out="$path/output_b1"
mkdir -p $out
./mhm $path
done
##-D CMAKE_WITH_MPI:STRING=ON
set(CMAKE_WITH_MPI OFF CACHE STRING "build the module with MPI, so it can be executed using mpirun")
#set(CMAKE_MRM2MHM OFF CACHE STRING "If set to ON the model runs with mRM")
#set(CMAKE_pgiFortran ON CACHE STRING "Code exchange for pgi compiler dependent issues")
#set(CMAKE_MPR_STANDALONE ON CACHE STRING "If set to ON, only MPR is compiled")