Loading ifs/CMakeLists.txt +15 −3 Original line number Diff line number Diff line cmake_minimum_required(VERSION 3.7) set(CMAKE_C_COMPILER "gcc") set(CMAKE_CXX_COMPILER "g++") project(ifs) set(CMAKE_CXX_STANDARD 14) if (NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build: Debug Release Memcheck FORCE") ENDIF (NOT CMAKE_BUILD_TYPE) message("* Current build type is : ${CMAKE_BUILD_TYPE}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64") # For debugging memory leaks. #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall --pedantic -g -pg -fsanitize=address -fno-omit-frame-pointer") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall --pedantic -g -pg") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH}) Loading @@ -11,6 +22,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 0) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # required packages # Rocksdb dependencies find_package(LZ4 REQUIRED) Loading Loading @@ -69,7 +81,7 @@ if(USE_BMI) endif() if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 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") 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} Loading @@ -77,7 +89,7 @@ if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 AND NOT USE_CCI AND NOT USE_BMI) ) add_definitions(-DRPC_PROTOCOL="bmi+tcp") endif() # boost dependencies, system is required for filesystem #TODO VERSION UNTESTED. I USE 1.62 # boost dependencies, system is required for filesystem find_package(Boost 1.58 REQUIRED COMPONENTS system filesystem serialization) include_directories(include ${ROCKSDB_INCLUDE_DIR} Loading @@ -89,7 +101,7 @@ include_directories(include) add_subdirectory(src/preload) #add_subdirectory(src/fuse3) set(SOURCE_FILES main.cpp main.hpp configure.hpp util.cpp set(SOURCE_FILES main.cpp main.hpp include/configure.hpp configure_public.hpp util.cpp src/db/db_util.cpp src/classes/fs_data.cpp src/classes/rpc_data.cpp include/db/db_util.hpp include/classes/fs_data.hpp include/classes/rpc_data.hpp Loading ifs/configure_public.hpp 0 → 100644 +22 −0 Original line number Diff line number Diff line #ifndef FS_CONFIGURE_PUBLIC_H #define FS_CONFIGURE_PUBLIC_H // To enabled logging for daemon #define LOG_INFO //#define LOG_DEBUG //#define LOG_TRACE #define LOG_DAEMON_PATH "/tmp/adafs_daemon.log" // Enable logging for preload #define LOG_PRELOAD_INFO //#define LOG_PRELOAD_DEBUG //#define LOG_PRELOAD_TRACE #define LOG_PRELOAD_PATH "/tmp/adafs_preload.log" // Set a hostname suffix when a connection is built. E.g., "-ib" to use Infiniband #define HOSTNAME_SUFFIX "" //#define MARGODIAG // enables diagnostics of margo (printed after shutting down #endif //FS_CONFIGURE_PUBLIC_H ifs/configure.hpp→ifs/include/configure.hpp +4 −16 Original line number Diff line number Diff line #include "../configure_public.hpp" #ifndef FS_CONFIGURE_H #define FS_CONFIGURE_H // To enabled logging for daemon #define LOG_INFO //#define LOG_DEBUG //#define LOG_TRACE #define LOG_DAEMON_PATH "/tmp/adafs_daemon.log" // Enable logging for preload #define LOG_PRELOAD_INFO //#define LOG_PRELOAD_DEBUG //#define LOG_PRELOAD_TRACE #define LOG_PRELOAD_PATH "/tmp/adafs_preload.log" // Daemon path to auxiliary files #define DAEMON_AUX_PATH "/tmp/adafs" // If ACM time should be considered #define ACMtime //unused Loading Loading @@ -42,7 +34,7 @@ // Optimize Key-Value store. Eventually, different modes will be available for different workloads. TODO //#define KV_OPTIMIZE // Optimize Key-Value store for tmpfs/ramdisk usage #define KV_OPTIMIZE_RAMDISK //#define KV_OPTIMIZE_RAMDISK // RPC configuration #define RPCPORT 4433 Loading @@ -54,10 +46,6 @@ // sets the threshold in milliseconds when a log entry should be created #define MARGO_FORWARD_TIMER_THRESHOLD 1000 // Set a hostname suffix when a connection is built. E.g., "-ib" to use Infiniband #define HOSTNAME_SUFFIX "" //#define MARGODIAG // enables diagnostics of margo (printed after shutting down // Debug configurations //#define RPC_TEST //unused Loading ifs/include/daemon/adafs_daemon.hpp +7 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ #include "../../main.hpp" void init_environment(); bool init_environment(); void destroy_enviroment(); bool init_ipc_server(); Loading @@ -12,4 +12,10 @@ bool init_rpc_server(); void register_server_rpcs(margo_instance_id mid); std::string daemon_register_path(); bool register_daemon_proc(); bool deregister_daemon_proc(); #endif //IFS_ADAFS_DAEMON_HPP ifs/include/fuse3/fuse_main.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ extern "C" { //#include <fcntl.h> // adafs config #include "../../configure.hpp" #include "configure.hpp" // boost libs #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> Loading Loading
ifs/CMakeLists.txt +15 −3 Original line number Diff line number Diff line cmake_minimum_required(VERSION 3.7) set(CMAKE_C_COMPILER "gcc") set(CMAKE_CXX_COMPILER "g++") project(ifs) set(CMAKE_CXX_STANDARD 14) if (NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build: Debug Release Memcheck FORCE") ENDIF (NOT CMAKE_BUILD_TYPE) message("* Current build type is : ${CMAKE_BUILD_TYPE}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64") # For debugging memory leaks. #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall --pedantic -g -pg -fsanitize=address -fno-omit-frame-pointer") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall --pedantic -g -pg") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH}) Loading @@ -11,6 +22,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 0) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # required packages # Rocksdb dependencies find_package(LZ4 REQUIRED) Loading Loading @@ -69,7 +81,7 @@ if(USE_BMI) endif() if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 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") 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} Loading @@ -77,7 +89,7 @@ if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 AND NOT USE_CCI AND NOT USE_BMI) ) add_definitions(-DRPC_PROTOCOL="bmi+tcp") endif() # boost dependencies, system is required for filesystem #TODO VERSION UNTESTED. I USE 1.62 # boost dependencies, system is required for filesystem find_package(Boost 1.58 REQUIRED COMPONENTS system filesystem serialization) include_directories(include ${ROCKSDB_INCLUDE_DIR} Loading @@ -89,7 +101,7 @@ include_directories(include) add_subdirectory(src/preload) #add_subdirectory(src/fuse3) set(SOURCE_FILES main.cpp main.hpp configure.hpp util.cpp set(SOURCE_FILES main.cpp main.hpp include/configure.hpp configure_public.hpp util.cpp src/db/db_util.cpp src/classes/fs_data.cpp src/classes/rpc_data.cpp include/db/db_util.hpp include/classes/fs_data.hpp include/classes/rpc_data.hpp Loading
ifs/configure_public.hpp 0 → 100644 +22 −0 Original line number Diff line number Diff line #ifndef FS_CONFIGURE_PUBLIC_H #define FS_CONFIGURE_PUBLIC_H // To enabled logging for daemon #define LOG_INFO //#define LOG_DEBUG //#define LOG_TRACE #define LOG_DAEMON_PATH "/tmp/adafs_daemon.log" // Enable logging for preload #define LOG_PRELOAD_INFO //#define LOG_PRELOAD_DEBUG //#define LOG_PRELOAD_TRACE #define LOG_PRELOAD_PATH "/tmp/adafs_preload.log" // Set a hostname suffix when a connection is built. E.g., "-ib" to use Infiniband #define HOSTNAME_SUFFIX "" //#define MARGODIAG // enables diagnostics of margo (printed after shutting down #endif //FS_CONFIGURE_PUBLIC_H
ifs/configure.hpp→ifs/include/configure.hpp +4 −16 Original line number Diff line number Diff line #include "../configure_public.hpp" #ifndef FS_CONFIGURE_H #define FS_CONFIGURE_H // To enabled logging for daemon #define LOG_INFO //#define LOG_DEBUG //#define LOG_TRACE #define LOG_DAEMON_PATH "/tmp/adafs_daemon.log" // Enable logging for preload #define LOG_PRELOAD_INFO //#define LOG_PRELOAD_DEBUG //#define LOG_PRELOAD_TRACE #define LOG_PRELOAD_PATH "/tmp/adafs_preload.log" // Daemon path to auxiliary files #define DAEMON_AUX_PATH "/tmp/adafs" // If ACM time should be considered #define ACMtime //unused Loading Loading @@ -42,7 +34,7 @@ // Optimize Key-Value store. Eventually, different modes will be available for different workloads. TODO //#define KV_OPTIMIZE // Optimize Key-Value store for tmpfs/ramdisk usage #define KV_OPTIMIZE_RAMDISK //#define KV_OPTIMIZE_RAMDISK // RPC configuration #define RPCPORT 4433 Loading @@ -54,10 +46,6 @@ // sets the threshold in milliseconds when a log entry should be created #define MARGO_FORWARD_TIMER_THRESHOLD 1000 // Set a hostname suffix when a connection is built. E.g., "-ib" to use Infiniband #define HOSTNAME_SUFFIX "" //#define MARGODIAG // enables diagnostics of margo (printed after shutting down // Debug configurations //#define RPC_TEST //unused Loading
ifs/include/daemon/adafs_daemon.hpp +7 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ #include "../../main.hpp" void init_environment(); bool init_environment(); void destroy_enviroment(); bool init_ipc_server(); Loading @@ -12,4 +12,10 @@ bool init_rpc_server(); void register_server_rpcs(margo_instance_id mid); std::string daemon_register_path(); bool register_daemon_proc(); bool deregister_daemon_proc(); #endif //IFS_ADAFS_DAEMON_HPP
ifs/include/fuse3/fuse_main.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ extern "C" { //#include <fcntl.h> // adafs config #include "../../configure.hpp" #include "configure.hpp" // boost libs #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> Loading