Skip to content

Commit

Permalink
mhp: enable some device memory testing (#596)
Browse files Browse the repository at this point in the history
* test mhp device memory support

* update

* update
  • Loading branch information
rscohn2 authored Oct 26, 2023
1 parent 46ba28f commit 1a415cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ function(add_mpi_test test_name name processes)
${MPIEXEC_PREFLAGS} ./${name} ${ARGN} COMMAND_EXPAND_LISTS)
endfunction()

function(add_mpi_offload_test test_name name processes)
# intel mpi needs I_MPI_OFFLOAD=1, mpich does not need anything but it it
# harmless so pass it anyway
add_test(
NAME ${test_name}
COMMAND
${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${processes}
${MPIEXEC_PREFLAGS} -genv I_MPI_OFFLOAD=1 ./${name} ${ARGN}
COMMAND_EXPAND_LISTS)
endfunction()

install(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX})

add_subdirectory(include)
Expand Down Expand Up @@ -237,6 +248,8 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
endif()
endif()

add_subdirectory(test/gtest/mhp)

if(ENABLE_SYCL)
# disables rng::detail::box_compress::coalesce which causes rng::box to use
# global non-const variable, which can not be used in SYCL kernels
Expand All @@ -249,7 +262,6 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(examples/serial)
add_subdirectory(test/gtest/serial)
add_subdirectory(examples/mhp)
add_subdirectory(test/gtest/mhp)
add_subdirectory(benchmarks/gbench)

# Requires clang, icpx/llvm nightly do not support the tools
Expand Down
5 changes: 5 additions & 0 deletions test/gtest/mhp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ add_mpi_test(mhp-tests-4 mhp-tests 4)
add_mpi_test(mhp-tests-3-only mhp-tests-3 3)

if(ENABLE_SYCL)
# Excluding tests that failed in CI with segv. They work with manual runs. I
# have not investigated the cause.
add_mpi_offload_test(
mhp-sycl-device-tests-2 mhp-tests 2 --sycl --device-memory
--gtest_filter=-Exclusive*:Slide*:Sort*:ComplexSlide*)
if(NOT MPI_IMPL STREQUAL "openmpi")
# MPI_Win_create fails for communicator with size 1
add_mpi_test(mhp-sycl-tests-1 mhp-tests 1 --sycl --gtest_filter=-*Slide*)
Expand Down

0 comments on commit 1a415cb

Please sign in to comment.