From eee0ba599bcd78fad42606da7682d1fd94ad9320 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Mon, 1 Apr 2024 12:18:36 -0400 Subject: [PATCH 1/2] DataPlane Configuration changes --- CMakeLists.txt | 18 +++++++++++++++--- cmake/DetectOptions.cmake | 9 +++++++-- source/adios2/toolkit/sst/CMakeLists.txt | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37e4b6016b..cfa34892c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -443,9 +443,21 @@ foreach(opt IN LISTS ADIOS2_CONFIG_OPTS) endif() endforeach() -if (ADIOS2_HAVE_SST AND (ADIOS2_SST_HAVE_LIBFABRIC OR ADIOS2_SST_HAVE_UCX)) -message(" RDMA Transport for Staging: Available") +set (HPCDataPlaneList "") +if (ADIOS2_HAVE_SST) + if (ADIOS2_SST_HAVE_LIBFABRIC) + set (HPCDataPlaneList "${HPCDataPlaneList} fabric") + endif() + if (ADIOS2_SST_HAVE_UCX) + set (HPCDataPlaneList "${HPCDataPlaneList} UCX") + endif() + if (ADIOS2_SST_BUILD_MPI_DP) + set (HPCDataPlaneList "${HPCDataPlaneList} MPI") + endif() +endif() +if ({HPCDataPlaneList STREQUAL "") + message(" Possible RDMA DataPlanes for SST: ") else() -message(" RDMA Transport for Staging: Unconfigured") + message(" Possible RDMA DataPlanes for SST: ${HPCDataPlaneList}") endif() diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake index 0dedcb61ca..2cc15fb410 100644 --- a/cmake/DetectOptions.cmake +++ b/cmake/DetectOptions.cmake @@ -460,13 +460,14 @@ if(ADIOS2_USE_SST AND NOT WIN32) "-DLINK_DIRECTORIES=${LIBFABRIC_LIBRARIES}") message(STATUS "Libfabric support for the HPE CXI provider: ${ADIOS2_SST_HAVE_CRAY_CXI}") endif() - if(ADIOS2_HAVE_MPI) + if(ADIOS2_HAVE_MPI AND NOT "${ADIOS2_SST_BUILD_MPI_DP}") set(CMAKE_REQUIRED_LIBRARIES "MPI::MPI_C;Threads::Threads") include(CheckCXXSourceRuns) check_cxx_source_runs([=[ #include #include #include + #include #include #if !defined(MPICH) @@ -491,7 +492,11 @@ if(ADIOS2_USE_SST AND NOT WIN32) ADIOS2_HAVE_MPI_CLIENT_SERVER) unset(CMAKE_REQUIRED_LIBRARIES) if (ADIOS2_HAVE_MPI_CLIENT_SERVER) - set(ADIOS2_SST_HAVE_MPI TRUE) + set(ADIOS2_SST_BUILD_MPI_DP TRUE) + else() + if ("${ADIOS2_SST_EXPECT_MPI_DP}") + message(FATAL_ERROR "Expected MPI to support Client-server connection model, but test failed.") + endif() endif() endif() # UCX diff --git a/source/adios2/toolkit/sst/CMakeLists.txt b/source/adios2/toolkit/sst/CMakeLists.txt index 3c539b16a9..4a8252eeef 100644 --- a/source/adios2/toolkit/sst/CMakeLists.txt +++ b/source/adios2/toolkit/sst/CMakeLists.txt @@ -45,7 +45,7 @@ if(ADIOS2_HAVE_ZFP) target_link_libraries(sst PRIVATE zfp::zfp) endif() -if(ADIOS2_SST_HAVE_MPI) +if(ADIOS2_SST_BUILD_MPI_DP) target_sources(sst PRIVATE dp/mpi_dp.c) target_link_libraries(sst PRIVATE MPI::MPI_C) endif() From b13b1d96c0e03c59d46371b764f1f4d8d810f6f4 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Tue, 2 Apr 2024 16:03:21 -0400 Subject: [PATCH 2/2] Change name to include HAVE rather than BUILD --- CMakeLists.txt | 4 ++-- cmake/DetectOptions.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa34892c8..4c2ea67687 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,11 +451,11 @@ if (ADIOS2_HAVE_SST) if (ADIOS2_SST_HAVE_UCX) set (HPCDataPlaneList "${HPCDataPlaneList} UCX") endif() - if (ADIOS2_SST_BUILD_MPI_DP) + if (ADIOS2_SST_HAVE_MPI_DP) set (HPCDataPlaneList "${HPCDataPlaneList} MPI") endif() endif() -if ({HPCDataPlaneList STREQUAL "") +if ({HPCDataPlaneList} STREQUAL "") message(" Possible RDMA DataPlanes for SST: ") else() message(" Possible RDMA DataPlanes for SST: ${HPCDataPlaneList}") diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake index 2cc15fb410..832e32934c 100644 --- a/cmake/DetectOptions.cmake +++ b/cmake/DetectOptions.cmake @@ -460,7 +460,7 @@ if(ADIOS2_USE_SST AND NOT WIN32) "-DLINK_DIRECTORIES=${LIBFABRIC_LIBRARIES}") message(STATUS "Libfabric support for the HPE CXI provider: ${ADIOS2_SST_HAVE_CRAY_CXI}") endif() - if(ADIOS2_HAVE_MPI AND NOT "${ADIOS2_SST_BUILD_MPI_DP}") + if(ADIOS2_HAVE_MPI AND NOT "${ADIOS2_SST_HAVE_MPI_DP}") set(CMAKE_REQUIRED_LIBRARIES "MPI::MPI_C;Threads::Threads") include(CheckCXXSourceRuns) check_cxx_source_runs([=[ @@ -492,7 +492,7 @@ if(ADIOS2_USE_SST AND NOT WIN32) ADIOS2_HAVE_MPI_CLIENT_SERVER) unset(CMAKE_REQUIRED_LIBRARIES) if (ADIOS2_HAVE_MPI_CLIENT_SERVER) - set(ADIOS2_SST_BUILD_MPI_DP TRUE) + set(ADIOS2_SST_HAVE_MPI_DP TRUE) else() if ("${ADIOS2_SST_EXPECT_MPI_DP}") message(FATAL_ERROR "Expected MPI to support Client-server connection model, but test failed.")