From f50f0f53cd6c65f3afef2c9f5477ad87a6b3398c Mon Sep 17 00:00:00 2001 From: kvrigor Date: Fri, 8 May 2026 08:27:31 +0200 Subject: [PATCH 1/9] Point icon to DKRZ gitlab repo --- .gitmodules | 4 ++-- models/icon | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index b795dd8..63a5e15 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "models/icon"] path = models/icon - url = https://github.com/HPSCTerrSys/icon-model_coup-oas.git - branch = icon-2024.07-public_coup-oas + url = https://gitlab.dkrz.de/icon/icon-model.git + branch = release-2026.04-public [submodule "models/parflow"] path = models/parflow url = https://github.com/parflow/parflow.git diff --git a/models/icon b/models/icon index ce5c8f8..8597da4 160000 --- a/models/icon +++ b/models/icon @@ -1 +1 @@ -Subproject commit ce5c8f8ba75d2e7db73e41cbb186d98ec34171c8 +Subproject commit 8597da45ef4b86323f3fb844caedc4ae5e1ffc01 From 8a52210f254ed0859fd1652119659d5a65ef6d50 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Fri, 8 May 2026 09:05:15 +0200 Subject: [PATCH 2/9] Add ICON standalone to CI --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 88d4a78..b7285ae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,6 +28,11 @@ jobs: parflow_dir: "parflow", model_opts: "eCLM ParFlowGPU" } + - { + name: "ICON Standalone", + use_oasis: "False", + model_opts: "ICON" + } # - { # name: "CLM3.5-PDAF", # use_oasis: "False", From 447b4e8147ce1c030e5907dc74a1c31541e63f5e Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 13 May 2026 09:39:56 +0200 Subject: [PATCH 3/9] Reverted ICON to icon-model_coup-oas --- .gitmodules | 4 ++-- models/icon | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 63a5e15..b795dd8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "models/icon"] path = models/icon - url = https://gitlab.dkrz.de/icon/icon-model.git - branch = release-2026.04-public + url = https://github.com/HPSCTerrSys/icon-model_coup-oas.git + branch = icon-2024.07-public_coup-oas [submodule "models/parflow"] path = models/parflow url = https://github.com/parflow/parflow.git diff --git a/models/icon b/models/icon index 8597da4..ce5c8f8 160000 --- a/models/icon +++ b/models/icon @@ -1 +1 @@ -Subproject commit 8597da45ef4b86323f3fb844caedc4ae5e1ffc01 +Subproject commit ce5c8f8ba75d2e7db73e41cbb186d98ec34171c8 From 332b6e6f96767d670e65174d76798ec69b859a91 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 13 May 2026 10:59:22 +0200 Subject: [PATCH 4/9] BuildICON: Fixes to control `find_package(HDF5)` behavior * Prefer linking to `libhdf5.a` instead of `libhdf.so` by setting `HDF5_USE_STATIC_LIBRARIES=TRUE` * Setting `HDF5_NO_FIND_PACKAGE_CONFIG_FILE=TRUE` forces `find_package(HDF5)` [1] to return linker options in the form of `-lhdf5*`, which is what's expected by the `LIBS` arg of the ICON configure script [2] [1]: https://github.com/Kitware/CMake/blob/0bc5ae8c759288e8e3ab8cf5f0ffccd8b59ba54a/Modules/FindHDF5.cmake#L677 [2]: https://gitlab.dkrz.de/icon/icon-model/-/blob/release-2026.04-public/configure?ref_type=heads#L1804 --- cmake/BuildICON.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/BuildICON.cmake b/cmake/BuildICON.cmake index 82619e5..73a492b 100644 --- a/cmake/BuildICON.cmake +++ b/cmake/BuildICON.cmake @@ -46,8 +46,10 @@ if (CMAKE_MESSAGE_LOG_LEVEL STREQUAL "DEBUG") set(HDF5_FIND_DEBUG "TRUE") endif() set(HDF5_PREFER_PARALLEL "TRUE") -find_package(HDF5 REQUIRED COMPONENTS Fortran HL) -list(APPEND ICON_LIBS "${HDF5_Fortran_HL_LIBRARIES}") +set(HDF5_USE_STATIC_LIBRARIES "TRUE") +set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE "TRUE") +find_package(HDF5 REQUIRED COMPONENTS C) +list(APPEND ICON_LIBS "${HDF5_LIBRARIES}") # libXML2 - XML parsing library find_package(LibXml2 REQUIRED) From 07bf04e37e63643e905704f521c4b37961eec136 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 13 May 2026 12:26:23 +0200 Subject: [PATCH 5/9] CI: Made separate ICON standlone build steps --- .github/workflows/CI.yml | 41 ++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b7285ae..2ce5e48 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,7 +5,7 @@ on: push: branches: [ master, dev-pdaf-* ] pull_request: - branches: [ master, stages-2025-pdaf ] + branches: [ master ] jobs: eclm_build_job: @@ -29,7 +29,7 @@ jobs: model_opts: "eCLM ParFlowGPU" } - { - name: "ICON Standalone", + name: "ICON standalone", use_oasis: "False", model_opts: "ICON" } @@ -68,6 +68,7 @@ jobs: VER_HYPRE: 2.33.0 VER_ECCODES: 2.40.0 VER_OASIS: tsmp-patches-v0.1 + VER_ICON_UPSTREAM: release-2026.04-public steps: - uses: actions/checkout@v4 @@ -326,7 +327,9 @@ jobs: echo "VER_ParFlow=${VER_ParFlow}" >> $GITHUB_OUTPUT fi - if [[ "${{ matrix.config.name }}" == *"ICON"* ]]; then + if [[ "${{ matrix.config.name }}" == "ICON standalone" ]]; then + echo "${{ env.VER_ICON_UPSTREAM }} => VER_ICON_UPSTREAM" + elif [[ "${{ matrix.config.name }}" == *"ICON"* ]]; then VER_ICON=$(cat model_versions | grep -w "icon" | cut -d' ' -f1) echo "${VER_ICON} => VER_ICON" echo "VER_ICON=${VER_ICON}" >> $GITHUB_OUTPUT @@ -399,13 +402,28 @@ jobs: pwd && git submodule update --init --force . # - # PDAF + # ICON Standalone # - - if: contains(matrix.config.name, 'PDAF') - name: Update PDAF submodule ${{ steps.model-versions.outputs.VER_PDAF }} - working-directory: ${{ env.TSMP2_ROOT }}/models/pdaf + - if: matrix.config.name == 'ICON standalone' + name: Restore cached ICON standalone ${{ env.VER_ICON_UPSTREAM }} + uses: actions/cache/restore@v4 + id: cache-icon-standalone-restore + with: + path: ${{ env.TSMP2_ROOT }}/models/icon-model + key: ${{ matrix.config.name }}_icon-${{ env.VER_ICON_UPSTREAM }} + + - if: matrix.config.name == 'ICON standalone' && steps.cache-icon-standalone-restore.outputs.cache-hit != 'true' + name: Update ICON standalone ${{ env.VER_ICON_UPSTREAM }} + working-directory: ${{ env.TSMP2_ROOT }}/models run: | - pwd && git submodule update --init --force . + pwd && git clone -b ${{ env.VER_ICON_UPSTREAM }} --recursive https://gitlab.dkrz.de/icon/icon-model.git + + - if: matrix.config.name == 'ICON standalone' && steps.cache-icon-standalone-restore.outputs.cache-hit != 'true' + name: Cache ICON standalone ${{ env.VER_ICON_UPSTREAM }} + uses: actions/cache/save@v4 + with: + path: ${{ env.TSMP2_ROOT }}/models/icon-model + key: ${{ matrix.config.name }}_icon-${{ env.VER_ICON_UPSTREAM }} # # Pre-build checks @@ -418,6 +436,10 @@ jobs: echo "Entering 'oasis3-mct'" echo "$(git -C oasis3-mct describe --tags --always)" fi + if [[ "${{ matrix.config.name }}" == "ICON standalone" ]]; then + echo "Entering 'models/icon-model'" + echo "$(git -C models/icon-model describe --tags --always)" + fi - name: Check TSMP2 dependencies working-directory: ${{ env.DEPENDENCIES_ROOT }} @@ -437,6 +459,9 @@ jobs: if [[ "${{ matrix.config.use_oasis }}" == "True" ]]; then MODEL_OPTS="${MODEL_OPTS} --OASIS_SRC ${TSMP2_ROOT}/oasis3-mct" fi + if [[ "${{ matrix.config.name }}" == "ICON standalone" ]]; then + MODEL_OPTS="${MODEL_OPTS} --ICON_SRC ${TSMP2_ROOT}/models/icon-model" + fi BUILD_TSMP2_CMD="./build_tsmp2.sh ${MODEL_OPTS} --no_update" echo $BUILD_TSMP2_CMD && echo "" eval $BUILD_TSMP2_CMD From bb8334263265552578dea014029ed5ff92b5a81d Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 13 May 2026 12:53:06 +0200 Subject: [PATCH 6/9] CI: PDAF step accidentally replaced --- .github/workflows/CI.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2ce5e48..e89d7a3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -401,6 +401,15 @@ jobs: run: | pwd && git submodule update --init --force . + # + # PDAF + # + - if: contains(matrix.config.name, 'PDAF') + name: Update PDAF submodule ${{ steps.model-versions.outputs.VER_PDAF }} + working-directory: ${{ env.TSMP2_ROOT }}/models/pdaf + run: | + pwd && git submodule update --init --force . + # # ICON Standalone # From fd83f23c89d8dd569aee141995b3fd42d88d5854 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Thu, 14 May 2026 14:25:46 +0200 Subject: [PATCH 7/9] ICON 2026.04 build on NVHPC+OpenMPI toolchain --- CMakeLists.txt | 12 +++++-- build_tsmp2.sh | 15 +++++++-- cmake/BuildICON.cmake | 32 ++++++++++++++++++ env/jsc.2026.nvhpc.openmpi | 66 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 env/jsc.2026.nvhpc.openmpi diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d2dc12..90ad5fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) # set default of components to off option(ICON "Compile ICON within TSMP2 framework" OFF) +option(ICONGPU "Compile ICONGPU within TSMP2 framework" OFF) option(COSMO "Compile COSMO within TSMP2 framework" OFF) option(eCLM "Compile eCLM within TSMP2 framework" OFF) option(CLM3.5 "Compile CLM3.5 within TSMP2 framework" OFF) @@ -45,16 +46,21 @@ if (BUILD_OASIS) list(APPEND MODEL_DEPENDENCIES OASIS3_MCT) endif() -if (${ICON}) +if (${ICON} OR ${ICONGPU}) + if (${ICON}) + set (ICON_ID "ICON") + else() + set (ICON_ID "ICONGPU") + endif() if(NOT DEFINED ICON_SRC) set(ICON_SRC "${CMAKE_SOURCE_DIR}/models/icon") endif() include(BuildICON) list(APPEND COMPONENT_MODELS "ICON") if ("${MODEL_ID}" STREQUAL "") - set(MODEL_ID "ICON") + set(MODEL_ID "${ICON_ID}") else() - set(MODEL_ID "${MODEL_ID}-ICON") + set(MODEL_ID "${MODEL_ID}-${ICON_ID}") endif() endif() diff --git a/build_tsmp2.sh b/build_tsmp2.sh index b0e6526..b202754 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -20,6 +20,7 @@ function help_tsmp2() { echo "Component models:" echo "" echo " icon Compile with ICON atmosphere model." + echo " iconGPU Compile with ICON atmosphere model (GPU-enabled)." echo " eclm Compile with eCLM land surface model." echo " parflow Compile with ParFlow subsurface model." echo " parflowGPU Compile with ParFlow subsurface model (GPU-enabled)" @@ -48,6 +49,7 @@ function help_tsmp2() { echo "" echo " ./build_tsmp2.sh icon eclm parflow" echo " ./build_tsmp2.sh eclm parflowGPU" + echo " ./build_tsmp2.sh iconGPU" echo " ./build_tsmp2.sh icon eclm" echo " ./build_tsmp2.sh eclm pdaf" echo "" @@ -121,7 +123,8 @@ while [[ "$#" -gt 0 ]]; do -q|--quiet) quiet=y;; -v|--verbose) verbose_makefile=y;; --version) echo "$0 version 0.2.0"; exit 0;; - --icon|icon) icon=y;; + --icon|icon) icon=y iconCPU=y iconCMakeModelID="ICON";; + icongpu) icon=y iconGPU=y iconCMakeModelID="ICONGPU";; --eclm|eclm) eclm=y;; --parflow|parflow) parflow=y parflowCPU=y parflowCMakeModelID="ParFlow";; --parflowgpu|parflowgpu) parflow=y parflowGPU=y parflowCMakeModelID="ParFlowGPU";; @@ -156,7 +159,7 @@ cmake_comp_str="" message "Setting model-id and component string..." # fun set_component shell_name cmake_name -set_component icon "ICON" +set_component icon $iconCMakeModelID set_component eclm "eCLM" set_component parflow $parflowCMakeModelID set_component cosmo "COSMO" @@ -175,6 +178,11 @@ if [[ "${parflowCPU}" == "y" && "${parflowGPU}" == "y" ]];then exit 1 fi +if [[ "${iconCPU}" == "y" && "${iconGPU}" == "y" ]];then + echo "ABORT: Building icon and iconGPU at the same time is not supported." + exit 1 +fi + ## CONCATENATE SOURCE CODE STRING message "Setting component source dir..." cmake_compsrc_str="" @@ -228,6 +236,9 @@ if [[ -n "${env}" ]]; then # TODO: Fix this GPU thing on another PR if [[ "$parflowGPU" == "y" ]];then source "${env}" --parflowgpu + elif [[ "$iconGPU" == "y" ]];then + # Note: we don't support ParFlowGPU + ICON GPU yet. + source "${env}" --icongpu else source "${env}" fi diff --git a/cmake/BuildICON.cmake b/cmake/BuildICON.cmake index 73a492b..a60e28d 100644 --- a/cmake/BuildICON.cmake +++ b/cmake/BuildICON.cmake @@ -19,6 +19,23 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" OR CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") set(ICON_CFLAGS "-gdwarf-4 -qno-opt-dynamic-align -ftz -march=native") set(ICON_FCFLAGS "-gdwarf-4 -march=native -pc64 -fp-model source -traceback -qno-opt-dynamic-align -no-fma") +elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") + set(ICON_FCFLAGS "-Mrecursive -Mallocatable=03 -Mstack_arrays") + if(${ICONGPU}) + string(APPEND ICON_FCFLAGS " -Minfo=accel,inline -acc=gpu,verystrict -gpu=cc90") + include(CheckLanguage) + check_language(CUDA) + if(CMAKE_CUDA_COMPILER) + enable_language(CUDA) + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch=sm_90") + else() + message(FATAL_ERROR "BuildICON.cmake: Cannot find CUDA library in the system.") + endif() + else() + string(APPEND ICON_FCFLAGS " -Minfo=inline") + set(CMAKE_CUDA_COMPILER "") + set(CMAKE_CUDA_FLAGS "") + endif() endif() set(ICON_ECRAD_FCFLAGS "-D__ECRAD_LITTLE_ENDIAN") @@ -81,6 +98,7 @@ string(PREPEND ICON_FCFLAGS "-I${NetCDF_F90_ROOT}/include ") find_package(ZLIB REQUIRED) list(APPEND ICON_LIBS "${ZLIB_LIBRARIES}") + # Enable/disable model-specific features list(APPEND EXTRA_CONFIG_ARGS --enable-parallel-netcdf --enable-openmp --disable-ocean --disable-jsbach --disable-coupling --enable-ecrad --disable-mpi-checks --disable-rte-rrtmgp) @@ -92,6 +110,18 @@ if( ${eCLM} OR ${CLM3.5} OR ${ParFlow} OR ${ParFlowGPU} ) list(APPEND EXTRA_CONFIG_ARGS --enable-oascoupling) endif() +# GPU-specific options +if(${ICONGPU}) + list(APPEND ICON_LIBS "-c++libs -nvmalloc -cuda") + list(APPEND EXTRA_CONFIG_ARGS --enable-gpu --enable-mpi-gpu --enable-cuda-graphs) +endif() +if(CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") + # Use of NVHPC toolchain implies nvc++ is being used; hence + # it is necessary to link to the C++ stdlib. + list(APPEND ICON_LIBS "-lstdc++") + list(APPEND EXTRA_CONFIG_ARGS --enable-realloc-buf --enable-pgi-inlib) +endif() + # Assemble linker options list(JOIN ICON_LIBS " " ICON_LIBS) @@ -102,8 +132,10 @@ ExternalProject_Add(ICON CONFIGURE_COMMAND ${ICON_SRC}/configure CC=${CMAKE_C_COMPILER} FC=${CMAKE_Fortran_COMPILER} + CUDACXX=${CMAKE_CUDA_COMPILER} CFLAGS=${ICON_CFLAGS} FCFLAGS=${ICON_FCFLAGS} + CUDAFLAGS=${CMAKE_CUDA_FLAGS} LDFLAGS=${ICON_LDFLAGS} ICON_ECRAD_FCFLAGS=${ICON_ECRAD_FCFLAGS} LIBS=${ICON_LIBS} diff --git a/env/jsc.2026.nvhpc.openmpi b/env/jsc.2026.nvhpc.openmpi new file mode 100644 index 0000000..8196102 --- /dev/null +++ b/env/jsc.2026.nvhpc.openmpi @@ -0,0 +1,66 @@ +# ----------------------------------------------------------------------------------------- +# Loads NVHPC+OpenMPI build environment for TSMP2. +# This environment is tailored for JURECA [1] and JUPITER [2] supercomputers. +# +# [1] https://apps.fz-juelich.de/jsc/software/jureca/index.xhtml +# [2] https://apps.fz-juelich.de/jsc/software/jupiter/index.xhtml +# +# Usage: source jsc.2026.nvhpc.openmpi +# ----------------------------------------------------------------------------------------- + +# Load compilers and MPI library +module --force purge +module use $OTHERSTAGES +module load Stages/2026 +module load nvidia-compilers/25.9-CUDA-13 +module load OpenMPI +module load ScaLAPACK + +# Basic scripting and build tools +module load Python +module load CMake +module load git + +# Storage libraries +module load HDF5 +module load netCDF/4.9.3 +module load netCDF-Fortran/4.6.2 +module load PnetCDF/1.14.1 + +# ParFlow additional libraries +module load CUDA +module load UCX-settings/RC-CUDA +module load Hypre +module load Umpire +module load SUNDIALS + +# TODO: Verify these values +if [[ $SYSTEMNAME == "jupiter" ]]; then + export CUDAARCHS="90" +else + export CUDAARCHS="80" +fi +export CMAKE_CUDA_RUNTIME_LIBRARY="Shared" + +# ICON additional libraries +module load ecCodes + +# Set default MPI compilers +export CC=mpicc +export FC=mpifort +export CXX=nvc++ +export CUDACXX=nvcc +export MPI_HOME=$EBROOTOPENMPI +export UMPIRE_ROOT=$EBROOTUMPIRE +export SUNDIALS_ROOT=$EBROOTSUNDIALS + +# Display compiler settings +module list +echo "=========================== COMPILER SETTINGS =======================" +echo " Machine: ${SYSTEMNAME} on Stages/$STAGE" +echo " MPI lib: OpenMPI v$EBVERSIONOPENMPI" +echo " C: $($CC --version | head -n 2 | tail -n 1)" +echo " C++: $($CXX --version | head -n 2 | tail -n 1)" +echo " Fortran: $($FC --version | head -n 2 | tail -n 1)" +echo "======================================================================" + From fc407cf89a8fb2390c431500f427903bb9752774 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Thu, 14 May 2026 15:15:34 +0200 Subject: [PATCH 8/9] build_tsmp2: Forgot to add 'ICONGPU' component name --- build_tsmp2.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build_tsmp2.sh b/build_tsmp2.sh index b202754..9d07bc3 100755 --- a/build_tsmp2.sh +++ b/build_tsmp2.sh @@ -66,7 +66,7 @@ if [ "${component}" = "y" ];then model_id+="-${cmake_name}" fi # model_id cmake_comp_str+=" -D${cmake_name}=ON" - if [[ $cmake_name = @(ICON|eCLM|ParFlow|ParFlowGPU|COSMO|CLM3.5) ]]; then + if [[ $cmake_name = @(ICON|ICONGPU|eCLM|ParFlow|ParFlowGPU|COSMO|CLM3.5) ]]; then model_count=$(( $model_count + 1 )) fi # cmake_name fi # component @@ -236,9 +236,6 @@ if [[ -n "${env}" ]]; then # TODO: Fix this GPU thing on another PR if [[ "$parflowGPU" == "y" ]];then source "${env}" --parflowgpu - elif [[ "$iconGPU" == "y" ]];then - # Note: we don't support ParFlowGPU + ICON GPU yet. - source "${env}" --icongpu else source "${env}" fi From 931782a05d927a03fe6af05f29022e0b5a2c4e52 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Fri, 15 May 2026 09:41:14 +0200 Subject: [PATCH 9/9] ICONGPU build fix externals/fortran-support misinterprets OpenACC directives when --enable-openmp is passed to ICON configure script. --- cmake/BuildICON.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/BuildICON.cmake b/cmake/BuildICON.cmake index a60e28d..12867db 100644 --- a/cmake/BuildICON.cmake +++ b/cmake/BuildICON.cmake @@ -100,7 +100,7 @@ list(APPEND ICON_LIBS "${ZLIB_LIBRARIES}") # Enable/disable model-specific features -list(APPEND EXTRA_CONFIG_ARGS --enable-parallel-netcdf --enable-openmp --disable-ocean --disable-jsbach --disable-coupling --enable-ecrad --disable-mpi-checks --disable-rte-rrtmgp) +list(APPEND EXTRA_CONFIG_ARGS --enable-parallel-netcdf --disable-ocean --disable-jsbach --disable-coupling --enable-ecrad --disable-mpi-checks --disable-rte-rrtmgp) # Coupling-specific options if( ${eCLM} OR ${CLM3.5} OR ${ParFlow} OR ${ParFlowGPU} ) @@ -113,13 +113,15 @@ endif() # GPU-specific options if(${ICONGPU}) list(APPEND ICON_LIBS "-c++libs -nvmalloc -cuda") - list(APPEND EXTRA_CONFIG_ARGS --enable-gpu --enable-mpi-gpu --enable-cuda-graphs) + list(APPEND EXTRA_CONFIG_ARGS --enable-gpu=openacc --enable-mpi-gpu --enable-cuda-graphs --enable-pgi-inlib) +else() + list(APPEND EXTRA_CONFIG_ARGS --enable-openmp) endif() if(CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") # Use of NVHPC toolchain implies nvc++ is being used; hence # it is necessary to link to the C++ stdlib. list(APPEND ICON_LIBS "-lstdc++") - list(APPEND EXTRA_CONFIG_ARGS --enable-realloc-buf --enable-pgi-inlib) + list(APPEND EXTRA_CONFIG_ARGS --enable-realloc-buf ) endif() # Assemble linker options