Skip to content

Commit b3a5a8b

Browse files
authored
CMake updates (#2690)
* auto-enable ekat * remove ERF_ENABLE_EKAT in cmake scripts * rename cmake_with_kokkos * fix hip build * update tioga wall limit
1 parent 7367bdb commit b3a5a8b

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

.gitlab/LC/runners/tioga.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ is_machine_up:
7171
allocate_resources:
7272
variables:
7373
GIT_STRATEGY: none
74-
ALLOC_TIME: 30
74+
ALLOC_TIME: 60
7575
extends: .on_tioga
7676
stage: allocate-resources
7777
script:

Build/cmake_with_kokkos.sh renamed to Build/cmake_mac.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \
1212
-DERF_ENABLE_TESTS:BOOL=ON \
1313
-DERF_ENABLE_FCOMPARE:BOOL=ON \
1414
-DERF_ENABLE_DOCUMENTATION:BOOL=OFF \
15-
-DERF_ENABLE_EKAT:BOOL=ON \
1615
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
1716
.. && make -j8

Build/cmake_with_kokkos_ekat_hdf5_netcdf_fftw3_perlmutter.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install_erf \
4040
-DERF_DIM:STRING=3 \
4141
-DERF_ENABLE_FFT:BOOL=ON \
4242
-DERF_ENABLE_NETCDF:BOOL=ON \
43-
-DERF_ENABLE_KOKKOS:BOOL=ON \
4443
-DERF_ENABLE_RRTMGP:BOOL=ON \
45-
-DERF_ENABLE_EKAT:BOOL=ON \
4644
-DERF_ENABLE_MPI:BOOL=ON \
4745
-DERF_ENABLE_CUDA:BOOL=ON \
4846
-DAMReX_CUDA_ARCH=8.0 \

Build/cmake_with_p3.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \
88
-DERF_DIM:STRING=3 \
99
-DERF_ENABLE_MPI:BOOL=ON \
1010
-DERF_ENABLE_TESTS:BOOL=ON \
11-
-DERF_ENABLE_EKAT:BOOL=ON \
1211
-DERF_ENABLE_P3:BOOL=ON \
1312
-DERF_ENABLE_FCOMPARE:BOOL=ON \
1413
-DERF_ENABLE_DOCUMENTATION:BOOL=OFF \

Build/cmake_with_radiation.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \
88
-DERF_DIM:STRING=3 \
99
-DERF_ENABLE_MPI:BOOL=ON \
1010
-DERF_ENABLE_TESTS:BOOL=ON \
11-
-DERF_ENABLE_EKAT:BOOL=ON \
1211
-DERF_ENABLE_RRTMGP:BOOL=ON \
1312
-DERF_ENABLE_NETCDF:BOOL=ON \
1413
-DERF_ENABLE_HDF5:BOOL=ON \

Build/cmake_with_radiation_cuda.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \
99
-DERF_ENABLE_MPI:BOOL=ON \
1010
-DERF_ENABLE_CUDA:BOOL=ON \
1111
-DERF_ENABLE_TESTS:BOOL=ON \
12-
-DERF_ENABLE_EKAT:BOOL=ON \
1312
-DERF_ENABLE_RRTMGP:BOOL=ON \
1413
-DERF_ENABLE_NETCDF:BOOL=ON \
1514
-DERF_ENABLE_HDF5:BOOL=ON \

Build/cmake_with_shoc.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ cmake -DCMAKE_INSTALL_PREFIX:PATH=./install \
88
-DERF_DIM:STRING=3 \
99
-DERF_ENABLE_MPI:BOOL=ON \
1010
-DERF_ENABLE_TESTS:BOOL=ON \
11-
-DERF_ENABLE_EKAT:BOOL=ON \
1211
-DERF_ENABLE_SHOC:BOOL=ON \
1312
-DERF_ENABLE_FCOMPARE:BOOL=ON \
1413
-DERF_ENABLE_DOCUMENTATION:BOOL=OFF \

CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ option(ERF_ENABLE_TESTS "Enable regression and unit tests" OFF)
4040
option(ERF_ENABLE_REGRESSION_TESTS_ONLY "Enable only regression tests" OFF)
4141
option(ERF_USE_INTERNAL_AMREX "Add AMReX as subproject" ON)
4242
option(ERF_ENABLE_NETCDF "Enable NetCDF IO" OFF)
43-
option(ERF_ENABLE_EKAT "Enable Ekat " OFF)
4443
option(ERF_ENABLE_HDF5 "Enable HDF5 IO" ${ERF_ENABLE_NETCDF})
4544
option(ERF_ENABLE_PARTICLES "Enable Lagrangian particles" OFF)
4645
option(ERF_ENABLE_FCOMPARE "Enable building fcompare when not testing" OFF)
@@ -155,8 +154,18 @@ endif()
155154

156155
########################## EKAT ##################################
157156

157+
if(ERF_ENABLE_RRTMGP OR ERF_ENABLE_SHOC OR ERF_ENABLE_P3)
158+
set(ERF_ENABLE_EKAT ON)
159+
else()
160+
set(ERF_ENABLE_EKAT OFF)
161+
endif()
162+
158163
if(ERF_ENABLE_EKAT)
159164

165+
if(NOT ERF_ENABLE_MPI)
166+
message(FATAL_ERROR "CMake Error: MPI must be enabled if EKAT is enabled.")
167+
endif()
168+
160169
# NOTE: EKAT provides KOKKOS, so set relevant flags for KOKKOS
161170
if(ERF_ENABLE_CUDA)
162171
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "kokkos enable cuda")
@@ -167,6 +176,7 @@ if(ERF_ENABLE_EKAT)
167176
if(ERF_ENABLE_HIP)
168177
set(Kokkos_ENABLE_HIP ON CACHE BOOL "kokkos enable hip")
169178
set(Kokkos_ENABLE_HIP_LAMBDA ON CACHE BOOL "kokkos enable hip lambda")
179+
set(Kokkos_ENABLE_HIP_RELOCATABLE_DEVICE_CODE ON CACHE BOOL "kokkos enable hip RDC")
170180
endif()
171181

172182
if(ERF_ENABLE_SYCL)

0 commit comments

Comments
 (0)