Commit 112a69e3 authored by Marc Vef's avatar Marc Vef
Browse files

More robust CMake files to choose NA plugins + Readme changes

parent 15cf6bbf
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -4,32 +4,36 @@ find_path(LIBFABRIC_DIR
        /usr/local
        /usr/local/adafs/
        $ENV{HOME}/adafs/install
        $ENV{HOME}/adafs/install
        )


find_path(LIBFABRIC_INCLUDE_DIR rdma/fabric.h
        HINTS
        $ENV{HOME}/adafs/install
        $ENV{HOME}/adafs/install
        ${LIBFABRIC_DIR}
        $ENV{HOME}/opt
        /usr
        /usr/local
        /usr/local/adafs
        ${LIBFABRIC_DIR}
        PATH_SUFFIXES include)
        /opt
        PATH_SUFFIXES include
        PATH_SUFFIXES include/libfabric
        )

find_library(LIBFABRIC_LIBRARY NAMES fabric
        HINTS
        $ENV{HOME}/adafs/install/lib
        ${LIBFABRIC_DIR}
        $ENV{HOME}/opt
        /usr
        /usr/local
        /usr/local/adafs
        ${LIBFABRIC_DIR}
        /opt/
        PATH_SUFFIXES lib
        PATH_SUFFIXES lib/libfabric
        )




set(LIBFABRIC_LIBRARIES ${LIBFABRIC_LIBRARY} )
set(LIBFABRIC_INCLUDE_DIRS ${LIBFABRIC_INCLUDE_DIR} )

+20 −6
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ find_package(Abt REQUIRED)
find_package(Abt-Snoozer REQUIRED)
find_package(Margo REQUIRED)

option(USE_OFI "Use libfabric plugin." OFF)
if(USE_OFI)
option(USE_OFI_VERBS "Use libfabric plugin with verbs." OFF)
if (USE_OFI_VERBS)
    find_package(LibFabric REQUIRED)
    set(NA_LIB
            ${NA_LIB}
@@ -38,6 +38,16 @@ if(USE_OFI)
    add_definitions(-DRPC_PROTOCOL="ofi+verbs")
endif()

option(USE_OFI_PSM2 "Use libfabric plugin with verbs." OFF)
if (USE_OFI_PSM2)
    find_package(LibFabric REQUIRED)
    set(NA_LIB
            ${NA_LIB}
            ${LIBFABRIC_LIBRARIES}
            )
    add_definitions(-DRPC_PROTOCOL="ofi+psm2")
endif ()

option(USE_CCI "Use cci plugin." OFF)
if(USE_CCI)
    find_package(CCI REQUIRED)
@@ -58,10 +68,14 @@ if(USE_BMI)
    add_definitions(-DRPC_PROTOCOL="bmi+tcp")
endif()

if(NOT USE_OFI)
elseif(NOT USE_CCI)
elseif(NOT USE_BMI)
    message("one protocol must be selected")
if (NOT USE_OFI AND NOT USE_CCI AND NOT USE_BMI)
    message("No Mercury NA plugin selected. BMI automatically selected ... Use -DUSE_{BMI,CCI,OFI_VERBS,OFI_PSM2}:BOOL=ON for other plugins")
    find_package(BMI REQUIRED)
    set(NA_LIB
            ${NA_LIB}
            ${BMI_LIBRARIES}
            )
    add_definitions(-DRPC_PROTOCOL="bmi+tcp")
endif()
# boost dependencies, system is required for filesystem #TODO VERSION UNTESTED. I USE 1.62
find_package(Boost 1.58 REQUIRED COMPONENTS system filesystem serialization)
+9 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ This is a file system.
- Install bzip2: `sudo apt-get install libbz2-dev`
- Install zstandard: `sudo apt-get install libzstd-dev`
- Install lz4 `sudo apt-get install liblz4-dev`

### CentOS/Red Hat - Dependencies
- Upgrade your gcc to version at least 4.8 to get C++11 support: yum install gcc48-c++
- Install gflags:
@@ -56,9 +57,16 @@ __Notice:__ Once installed, please add the include path for gflags to your CPAT
- Now use the install script to compile them and install them to the desired directory: `./compile_dep.sh <git_clone_path> <install_path>`

## Compile ADA-FS
You need to decide what Mercury NA plugin you want to use. The following NA plugins are available, although only BMI is considered stable at the moment.
The following options are available with cmake:
- `-DUSE_BMI` for using the bmi plugin with the tcp protocol
- `-DUSE_CCI` for using the cci plugin with Infiniband verbs
- `-DUSE_OFI_VERBS` for using the libfabric plugin with Infiniband verbs
- `-DUSE_OFI_PSM2` for using the libfabric plugin with Intel Omnipath

```bash
mkdir build && cd build
cmake ..
cmake -DUSE_{BMI,CCI,OFI_VERBS,OFI_PSM2} ..
make
```

+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@
#define RPCPORT 4433
#define RPC_TRIES 3
#define RPC_TIMEOUT 150000
//#define RPC_PROTOCOL "bmi+tcp"
//#define MARGODIAG // enables diagnostics of margo (printed after shutting down

// Debug configurations