1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

cmake: add support for infiniband node-type

This commit is contained in:
Steffen Vogel 2018-07-04 17:50:26 +02:00
parent fb4c39f19a
commit b84210b91d
6 changed files with 22 additions and 23 deletions

View file

@ -75,6 +75,8 @@ find_package(OpenSSL 1.0.0 REQUIRED)
find_package(CURL 7.29 REQUIRED)
find_package(Mosquitto)
find_package(Opal)
find_package(IBverbs)
find_package(RDMACM)
# Check programs
find_program(PROTOBUFC_COMPILER NAMES protoc-c)

View file

@ -81,6 +81,7 @@ extern "C"{
#cmakedefine PROTOBUF_FOUND
#cmakedefine LIBNL3_ROUTE_FOUND
#cmakedefine LIBCONFIG_FOUND
#cmakedefine IBVERBS_FOUND
#ifdef __cplusplus
}

View file

@ -27,6 +27,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <villas/config.h>
#include <villas/memory_type.h>
#ifdef __cplusplus
@ -56,7 +57,7 @@ struct memory_allocation {
size_t length;
union {
#ifdef WITH_NODE_INFINIBAND
#ifdef IBVERBS_FOUND
struct {
struct ibv_mr *mr;
} ib;

View file

@ -37,6 +37,9 @@ set(LIBRARIES
set(LIB_SRC
kernel/kernel.c
kernel/rt.c
memory/heap.c
memory/hugepage.c
memory/managed.c
sample.c
path.c
node.c
@ -69,6 +72,10 @@ set(LIB_SRC
signal.c
)
if(IBVERBS_FOUND AND RDMACM_FOUND)
list(APPEND LIB_SRC memory/ib.c)
endif()
add_subdirectory(nodes)
list(APPEND WHOLE_ARCHIVES nodes)

View file

@ -126,6 +126,13 @@ if(COMEDILIB_FOUND)
list(APPEND LIBRARIES PkgConfig::COMEDILIB)
endif()
# Enable infiniband support
if(IBVERBS_FOUND AND RDMACM_FOUND)
list(APPEND NODE_SRC infiniband.c)
list(APPEND INCLUDE_DIRS ${IBVERBS_INCLUDE_DIRS} ${RDMACM_INCLUDE_DIRS})
list(APPEND LIBRARIES ${IBVERBS_LIBRARIES} ${RDMACM_LIBRARIES})
endif()
add_library(nodes STATIC ${NODE_SRC})
target_include_directories(nodes PUBLIC ${INCLUDE_DIRS})
target_link_libraries(nodes LINK_PRIVATE ${LIBRARIES})

View file

@ -81,28 +81,9 @@ RUN dnf -y install \
libiec61850-devel \
librabbitmq-devel \
mosquitto-devel \
comedilib-devel comedilib
# IB Verbs Dependencies
RUN dnf -y install \
libibverbs-utils \
libibverbs-devel \
libibverbs-devel-static \
libmlx4 \
libmlx5 \
ibutils \
libibcm \
libibcommon \
libibmad \
libibumad
# RDMA CM Dependencies
RUN dnf -y install \
librdmacm-utils \
librdmacm-devel \
librdmacm \
libibumad-devel \
perftest
comedilib-devel comedilib \
libibverbs-devel \
librdmacm-devel
# Build & Install Criterion
RUN cd /tmp && \