Commit 72291018 authored by Philipp Samfaß's avatar Philipp Samfaß

adapted CMake build system further

parent ff398646
......@@ -16,9 +16,6 @@ option(ENABLE_SMARTMPI "Enables support for SmartMPI library" OFF)
# set(CMAKE_CXX_COMPILER_FLAGS ${CMAKE_CXX_COMPILER_FLAGS} " -DENABLE_ASSERTS")
#endif()
if(ENABLE_SMARTMPI)
set(CMAKE_CXX_COMPILER_FLAGS ${CMAKE_CXX_COMPILER_FLAGS} "-DUSE_SMARTMPI")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# using Clang
......@@ -45,7 +42,14 @@ add_library(tmpi SHARED
CommStats.cpp
CommStats.h)
if(ENABLE_SMARTMPI)
find_library(SMARTMPI smartmpi HINTS "$ENV{SMARTMPI_PATH}/build/smartmpi_lib")
target_include_directories(tmpi PUBLIC $ENV{SMARTMPI_PATH}/smartmpi_lib)
target_link_libraries(tmpi PUBLIC ${SMARTMPI})
set(CMAKE_CXX_COMPILER_FLAGS ${CMAKE_CXX_COMPILER_FLAGS} "-DUSE_SMARTMPI")
endif()
target_compile_options(tmpi PRIVATE ${CMAKE_CXX_COMPILER_FLAGS})
#CC=mpiicpc
#CFLAGS += -fPIC -g -Wall -std=c++11 -I${HOME}/mpi_offloading/offloading_lib
......
......@@ -263,12 +263,12 @@ int MPI_Send_offload(const void *buf, int count, MPI_Datatype datatype, int dest
#endif
}
int MPI_Recv_offload(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status_Offload *stat) {
int MPI_Recv_offload(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status_Offload *stat, int rail) {
#if COMMUNICATION_MODE==0
return smpi_recv_offload_p2p(buf, count, datatype, translateRank(comm, source, _comm), tag, comm, stat);
return smpi_recv_offload_p2p(buf, count, datatype, translateRank(comm, source, _comm), tag, comm, stat, rail);
#elif COMMUNICATION_MODE==1
//return smpi_recv_offload_rma(buf, count, datatype, translateRank(comm, source, _comm), tag, comm, stat);
return smpi_recv_offload_rma(buf, count, datatype, translateRank(comm, source, _comm), tag, comm, stat);
return smpi_recv_offload_rma(buf, count, datatype, translateRank(comm, source, _comm), tag, comm, stat, rail);
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment