Skip to content

Commit

Permalink
Merge branch 'master' into DillUpstream
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Dec 22, 2022
2 parents 6380c77 + 5001279 commit 9c08520
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,24 @@ if(ADIOS2_USE_SST AND NOT WIN32)
endif()
endif()
if(ADIOS2_HAVE_MPI)
set(ADIOS2_SST_HAVE_MPI TRUE)
set(CMAKE_REQUIRED_LIBRARIES MPI::MPI_C)
include(CheckCSourceRuns)
check_c_source_runs([=[
#include <mpi.h>
#include <stdlib.h>

#if !defined(MPICH)
#error "MPICH is the only supported library"
#endif

int main()
{
MPI_Init_thread(NULL, NULL, MPI_THREAD_MULTIPLE, NULL);
MPI_Open_port(MPI_INFO_NULL, malloc(sizeof(char) * MPI_MAX_PORT_NAME));
MPI_Finalize();
}]=]
ADIOS2_HAVE_MPI_CLIENT_SERVER)
unset(CMAKE_REQUIRED_LIBRARIES)
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion source/adios2/toolkit/sst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if(ADIOS2_HAVE_ZFP)
target_link_libraries(sst PRIVATE zfp::zfp)
endif()

if(ADIOS2_HAVE_MPI)
if(ADIOS2_HAVE_MPI_CLIENT_SERVER)
target_sources(sst PRIVATE dp/mpi_dp.c)
target_link_libraries(sst PRIVATE MPI::MPI_C)
endif()
Expand Down

0 comments on commit 9c08520

Please sign in to comment.