Commit 3282802d authored by nafiseh's avatar nafiseh
Browse files

network protocol change

parent f6cc5371
Loading
Loading
Loading
Loading
+36 −2
Original line number Diff line number Diff line
@@ -22,13 +22,47 @@ find_package(ZStd REQUIRED)
find_package(RocksDB REQUIRED)
# margo dependencies
find_package(Libev REQUIRED)
find_package(BMI REQUIRED)
find_package(Mercury REQUIRED)
find_package(MercuryUtil REQUIRED)
find_package(Abt REQUIRED)
find_package(Abt-Snoozer REQUIRED)
find_package(Margo REQUIRED)

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

option(USE_CCI "Use cci plugin." OFF)
if(USE_CCI)
    find_package(CCI REQUIRED)
    set(NA_LIB
            ${NA_LIB}
            ${CCI_LIBRARIES}
            )
    add_definitions(-DRPC_PROTOCOL="cci+verbs")
endif()

option(USE_BMI "Use bmi plugin." OFF)
if(USE_OFI)
    find_package(BMI REQUIRED)
    set(NA_LIB
            ${NA_LIB}
            ${BMI_LIBRARIES}
            )
    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")
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)

@@ -62,5 +96,5 @@ target_link_libraries(adafs_daemon ${ROCKSDB_LIBRARIES}
        # rocksdb libs
        ${snappy_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${ZSTD_LIBRARIES} ${gflags_LIBRARIES} ${LZ4_LIBRARY}
        # margo libs
        ${BMI_LIBRARIES} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
        ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
        -lpthread -lboost_system -lboost_filesystem -lboost_serialization -lboost_program_options -pg)
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#define RPCPORT 4433
#define RPC_TRIES 3
#define RPC_TIMEOUT 150000
#define RPC_PROTOCOL "bmi+tcp"
//#define RPC_PROTOCOL "bmi+tcp"
//#define MARGODIAG // enables diagnostics of margo (printed after shutting down

// Debug configurations
+1 −1
Original line number Diff line number Diff line
@@ -12,5 +12,5 @@ include_directories(${FUSE3_INCLUDE_DIR})
set(SOURCE_FILES_FUSE fuse_main.cpp
        ../../include/fuse3/fuse_main.hpp ../../include/fuse3/fuse_ops.hpp fuse_util.cpp ../../include/fuse3/fuse_util.hpp)
add_executable(adafs_fuse ${SOURCE_FILES_FUSE})
target_link_libraries(adafs_fuse ${FUSE3_LIBRARIES} ${BMI_LIBRARIES} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES}
target_link_libraries(adafs_fuse ${FUSE3_LIBRARIES} ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES}
        ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES})
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ void register_client_fuse_ipcs() {
}

bool init_ipc_fuse_client() {
    auto protocol_port = "bmi+tcp"s;
    auto protocol_port = RPC_PROTOCOL+s;
    DAEMON_DEBUG0(debug_fd, "Initializing Mercury client ...\n");
    /* MERCURY PART */
    // Init Mercury layer (must be finalized when finished)
+1 −1
Original line number Diff line number Diff line
@@ -15,6 +15,6 @@ set(SOURCE_FILES_PRELOAD preload.cpp open_file_map.cpp ../../include/preload/pre
        rpc/ld_rpc_data.cpp rpc/ld_rpc_metadentry.cpp ../../include/preload/rpc/ld_rpc_data.hpp ../../include/preload/rpc/ld_rpc_metadentry.hpp
        ../../include/rpc/rpc_utils.hpp ../rpc/rpc_utils.cpp)
add_library(iointer SHARED ${SOURCE_FILES_PRELOAD})
target_link_libraries(iointer dl ${BMI_LIBRARIES} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES}
target_link_libraries(iointer dl ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES}
        ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
        -lpthread -lboost_system)
 No newline at end of file
Loading