Skip to content

Commit 93b1324

Browse files
committed
EAMxx: run cldfrac emulator only on CPU
1 parent 4b4a7e5 commit 93b1324

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

components/eamxx/tests/single-process/cld_fraction/CMakeLists.txt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,20 @@ if (EAMXX_ENABLE_PYTHON)
7979

8080
endif()
8181

82-
# Run an ml emulator for cld-fraction
83-
set (PY_MODULE_NAME "cld_fraction_ml")
84-
set (PY_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
85-
set (POSTFIX pyml)
86-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input.yaml
87-
${CMAKE_CURRENT_BINARY_DIR}/input_pyml.yaml)
88-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
89-
${CMAKE_CURRENT_BINARY_DIR}/output_pyml.yaml)
82+
if (NOT Kokkos_ENABLE_CUDA)
83+
# Run an ml emulator for cld-fraction
84+
set (PY_MODULE_NAME "cld_fraction_ml")
85+
set (PY_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
86+
set (POSTFIX pyml)
87+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input.yaml
88+
${CMAKE_CURRENT_BINARY_DIR}/input_pyml.yaml)
89+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
90+
${CMAKE_CURRENT_BINARY_DIR}/output_pyml.yaml)
9091

91-
# Test the process with python ml emulator
92-
CreateUnitTestFromExec(cld_fraction_standalone_pyml cld_fraction_standalone
93-
EXE_ARGS "--args -ifile=input_pyml.yaml"
94-
LABELS cld_fraction physics
95-
FIXTURES_SETUP cldfrac_pyml)
92+
# Test the process with python ml emulator
93+
CreateUnitTestFromExec(cld_fraction_standalone_pyml cld_fraction_standalone
94+
EXE_ARGS "--args -ifile=input_pyml.yaml"
95+
LABELS cld_fraction physics
96+
FIXTURES_SETUP cldfrac_pyml)
97+
endif()
9698
endif()

0 commit comments

Comments
 (0)