diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f43e221a0..c5aa1b0ec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,6 +248,9 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) endif() endif() + # Make this first to workaround issue with device memory and MPI + 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 @@ -260,7 +263,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 diff --git a/test/gtest/mhp/CMakeLists.txt b/test/gtest/mhp/CMakeLists.txt index 57fa723436..8f5ea9e930 100644 --- a/test/gtest/mhp/CMakeLists.txt +++ b/test/gtest/mhp/CMakeLists.txt @@ -73,6 +73,12 @@ if(ENABLE_ISHMEM) ze_loader fabric) endif() +# Make this first to workaround issue with device memory and MPI +if(ENABLE_SYCL) + add_mpi_offload_test(mhp-sycl-device-tests-2 mhp-tests 2 --sycl + --device-memory --gtest_filter=-*Slide*) +endif() + add_mpi_test(mhp-quick-test-1 mhp-quick-test 1) add_mpi_test(mhp-quick-test-2 mhp-quick-test 2) add_mpi_test(mhp-sycl-quick-test-1 mhp-quick-test 1 --sycl) @@ -91,8 +97,6 @@ add_mpi_test(mhp-tests-4 mhp-tests 4) add_mpi_test(mhp-tests-3-only mhp-tests-3 3) if(ENABLE_SYCL) - add_mpi_offload_test(mhp-sycl-device-tests-2 mhp-tests 2 --sycl - --device-memory --gtest_filter=-*Slide*) 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*)