Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] New OFI impl #65

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,42 @@ find_package(Threads REQUIRED)

if(BUILD_FAIRMQ)
find_package2(PUBLIC Boost VERSION 1.64 REQUIRED
COMPONENTS program_options thread system filesystem regex date_time signals
COMPONENTS container program_options thread system filesystem regex date_time signals
)
find_package2(PUBLIC FairLogger VERSION 1.2.0 REQUIRED)
find_package2(PRIVATE ZeroMQ VERSION 4.1.5 REQUIRED)
endif()

if(BUILD_NANOMSG_TRANSPORT)
find_package2(PRIVATE nanomsg VERSION 1.0.0 REQUIRED)
find_package2(PRIVATE msgpack VERSION 3.0.0)
set(PROJECT_msgpack_VERSION 2.1.5)
if(NOT msgpack_FOUND)
find_package2(PRIVATE msgpack VERSION 2.1.5 REQUIRED)
endif()
set(msgpack_ROOT ${PACKAGE_PREFIX_DIR})
find_msgpack()
endif()

if(BUILD_OFI_TRANSPORT)
find_package2(PRIVATE OFI VERSION 1.6.0 REQUIRED COMPONENTS fi_sockets fi_verbs)
find_package2(PRIVATE Protobuf VERSION 3.4.0 REQUIRED)
find_package2(PRIVATE asiofi VERSION 0.0.0 REQUIRED)
find_package2(PRIVATE OFI VERSION ${asiofi_OFI_VERSION} COMPONENTS ${asiofi_OFI_COMPONENTS} REQUIRED)
find_msgpack()
endif()

if(BUILD_FAIRMQ)
set(_components container program_options thread system filesystem regex date_time signals)
if(asiofi_FOUND)
if(${asiofi_Boost_VERSION} VERSION_GREATER 1.64)
set(_version ${asiofi_Boost_VERSION})
endif()
list(APPEND _components ${asiofi_Boost_COMPONENTS})
list(REMOVE_DUPLICATES _components)
else()
set(_version 1.64)
endif()
find_package2(PUBLIC Boost VERSION ${_version} REQUIRED
COMPONENTS ${_components}
)
find_package2(PUBLIC FairLogger VERSION 1.2.0 REQUIRED)
find_package2(PRIVATE ZeroMQ VERSION 4.1.5 REQUIRED)
endif()


if(BUILD_DDS_PLUGIN)
find_package2(PRIVATE DDS VERSION 2.0 REQUIRED)
endif()
Expand Down Expand Up @@ -170,8 +185,8 @@ if(BUILD_NANOMSG_TRANSPORT)
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
)
endif()
if(BUILD_OFI_TRANSPORT)
install(FILES cmake/FindOFI.cmake
if(BUILD_OFI_TRANSPORT OR BUILD_NANOMSG_TRANSPORT)
install(FILES cmake/Findmsgpack.cmake
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
)
endif()
Expand Down Expand Up @@ -237,6 +252,8 @@ if(PROJECT_PACKAGE_DEPENDENCIES)
get_filename_component(prefix ${GTEST_INCLUDE_DIRS}/.. ABSOLUTE)
elseif(${dep} STREQUAL msgpack)
set(prefix ${msgpack_ROOT})
elseif(${dep} STREQUAL asiofi)
set(prefix ${asiofi_ROOT})
elseif(${dep} STREQUAL OFI)
get_filename_component(prefix ${${dep}_INCLUDE_DIRS}/.. ABSOLUTE)
elseif(${dep} STREQUAL Doxygen)
Expand Down
1 change: 1 addition & 0 deletions FairMQTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Set(configure_options "${configure_options};-DCTEST_USE_LAUNCHERS=${CTEST_USE_LA
Set(configure_options "${configure_options};-DDISABLE_COLOR=ON")
Set(configure_options "${configure_options};-DCMAKE_PREFIX_PATH=$ENV{SIMPATH}")
Set(configure_options "${configure_options};-DBUILD_NANOMSG_TRANSPORT=ON")
Set(configure_options "${configure_options};-DBUILD_OFI_TRANSPORT=ON")
Set(configure_options "${configure_options};-DBUILD_DDS_PLUGIN=ON")
Set(configure_options "${configure_options};-DFAST_BUILD=ON")
Set(configure_options "${configure_options};-DCOTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES=-j$ENV{number_of_processors}")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Find all FairMQ releases and development tags [here](https://github.com/FairRoot
* PUBLIC: [**Boost**](https://www.boost.org/), [**FairLogger**](https://github.com/FairRootGroup/FairLogger)
* BUILD: [CMake](https://cmake.org/), [GTest](https://github.com/google/googletest), [Doxygen](http://www.doxygen.org/)
* PRIVATE: [ZeroMQ](http://zeromq.org/), [Msgpack](https://msgpack.org/index.html), [nanomsg](http://nanomsg.org/),
[OFI](https://ofiwg.github.io/libfabric/), [Protobuf](https://developers.google.com/protocol-buffers/), [DDS](http://dds.gsi.de)
[asiofi](https://github.com/FairRootGroup/asiofi), [DDS](http://dds.gsi.de)

Supported platforms: Linux and MacOS.

Expand Down
2 changes: 2 additions & 0 deletions cmake/FairMQLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ endfunction()

# Configure/Install CMake package
macro(install_cmake_package)
list(SORT PROJECT_PACKAGE_DEPENDENCIES)
list(SORT PROJECT_INTERFACE_PACKAGE_DEPENDENCIES)
include(CMakePackageConfigHelpers)
set(PACKAGE_INSTALL_DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_GIT_VERSION}
Expand Down
67 changes: 0 additions & 67 deletions cmake/FindFlatBuffers.cmake

This file was deleted.

89 changes: 0 additions & 89 deletions cmake/FindOFI.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/FindZeroMQ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ZeroMQ
REQUIRED_VARS ZeroMQ_LIBRARY_SHARED ZeroMQ_INCLUDE_DIR ZeroMQ_LIBRARY_STATIC
REQUIRED_VARS ZeroMQ_LIBRARY_SHARED ZeroMQ_INCLUDE_DIR
VERSION_VAR ZeroMQ_VERSION
)

Expand Down
16 changes: 4 additions & 12 deletions fairmq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ if(BUILD_OFI_TRANSPORT)
endif()


##################
# subdirectories #
##################
# add_subdirectory(shmem/prototype)
if(BUILD_OFI_TRANSPORT)
add_subdirectory(ofi)
endif()


##########################
# libFairMQ header files #
##########################
Expand All @@ -50,6 +41,7 @@ set(FAIRMQ_PUBLIC_HEADER_FILES
FairMQSocket.h
FairMQStateMachine.h
FairMQTransportFactory.h
MemoryResources.h
Tools.h
Transports.h
options/FairMQProgOptions.h
Expand Down Expand Up @@ -225,7 +217,7 @@ if(BUILD_NANOMSG_TRANSPORT)
set(NANOMSG_DEPS nanomsg msgpack::msgpack)
endif()
if(BUILD_OFI_TRANSPORT)
set(OFI_DEPS OFI::libfabric protobuf::libprotobuf $<TARGET_OBJECTS:OfiTransport>)
set(OFI_DEPS asiofi::asiofi msgpack::msgpack)
endif()
set(optional_deps ${NANOMSG_DEPS} ${OFI_DEPS})
if(optional_deps)
Expand All @@ -234,6 +226,7 @@ endif()

target_link_libraries(${_target}
INTERFACE # only consumers link against interface dependencies
Boost::container

PUBLIC # libFairMQ AND consumers of libFairMQ link aginst public dependencies
Threads::Threads
Expand All @@ -250,8 +243,7 @@ target_link_libraries(${_target}

PRIVATE # only libFairMQ links against private dependencies
libzmq
${NANOMSG_DEPS}
${OFI_DEPS}
${optional_deps}
)
set_target_properties(${_target} PROPERTIES
VERSION ${PROJECT_GIT_VERSION}
Expand Down
Loading