When KOKKOS has been compiled with GPU support the GPU *must* be used

This commit is contained in:
Axel Kohlmeyer
2024-07-30 10:35:15 -04:00
parent bd2e071ef0
commit a5a0620dca
5 changed files with 93 additions and 14 deletions

View File

@ -3,6 +3,7 @@
add_executable(test_library_open test_library_open.cpp test_main.cpp)
target_link_libraries(test_library_open PRIVATE lammps GTest::GMock)
add_test(NAME LibraryOpen COMMAND test_library_open)
set_tests_properties(LibraryOpen PROPERTIES ENVIRONMENT "OMP_NUM_THREADS=4;OMP_PROC_BIND=false")
add_executable(test_library_commands test_library_commands.cpp test_main.cpp)
target_link_libraries(test_library_commands PRIVATE lammps GTest::GMock)
@ -16,7 +17,7 @@ add_executable(test_library_properties test_library_properties.cpp test_main.cpp
target_link_libraries(test_library_properties PRIVATE lammps GTest::GMock)
target_compile_definitions(test_library_properties PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME LibraryProperties COMMAND test_library_properties)
set_tests_properties(LibraryProperties PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
set_tests_properties(LibraryProperties PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR};OMP_NUM_THREADS=4;OMP_PROC_BIND=false")
add_executable(test_library_objects test_library_objects.cpp test_main.cpp)
target_link_libraries(test_library_objects PRIVATE lammps GTest::GMock)