|
| 1 | +project(SKV) |
| 2 | + |
| 3 | +#------------------------------------------------------------------------------ |
| 4 | +# OFED verbs libraries |
| 5 | +#------------------------------------------------------------------------------ |
| 6 | +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake) |
| 7 | +find_package(OFED) |
| 8 | + |
| 9 | +set(FXLOGGER_SRCS |
| 10 | + ./FxLogger/FxLogger.cpp |
| 11 | + ./FxLogger/Trace.cpp |
| 12 | + ./FxLogger/dlmalloc.c |
| 13 | +) |
| 14 | + |
| 15 | +set(it_api_SRCS |
| 16 | + ./it_api/make.conf.in |
| 17 | + ./it_api/make.conf_dev |
| 18 | + ./it_api/make.conf_rpm |
| 19 | + ./it_api/src/it_api_o_verbs.cpp |
| 20 | + ./it_api/src/it_api_o_verbs_thread.cpp |
| 21 | +) |
| 22 | + |
| 23 | +set(C_SRCS |
| 24 | + ./lib/src/skv.cpp |
| 25 | +) |
| 26 | + |
| 27 | +# ./make.conf.in |
| 28 | +# ./make.conf_dev |
| 29 | +# ./make.conf_rpm |
| 30 | + |
| 31 | +set(CLIENT_SRCS |
| 32 | + ./src/client/skv_client.cpp |
| 33 | + ./src/client/skv_client_2_server_active_bcast.cpp |
| 34 | + ./src/client/skv_client_bulk_inserter.cpp |
| 35 | + ./src/client/skv_client_command_manager_if.cpp |
| 36 | + ./src/client/skv_client_conn_manager_if.cpp |
| 37 | + ./src/client/skv_client_cursor.cpp |
| 38 | + ./src/client/skv_client_internal.cpp |
| 39 | +) |
| 40 | + |
| 41 | +set(COMMON_SRCS |
| 42 | + ./src/common/skv_config.cpp |
| 43 | + ./src/common/skv_distribution_manager.cpp |
| 44 | + ./src/common/skv_utils.cpp |
| 45 | +) |
| 46 | + |
| 47 | +set(SERVER_SRCS |
| 48 | + ./src/server/skv_local_kv_asyncmem.cpp |
| 49 | + ./src/server/skv_local_kv_inmem.cpp |
| 50 | + ./src/server/skv_local_kv_rocksdb.cpp |
| 51 | + ./src/server/skv_server.cpp |
| 52 | + ./src/server/skv_server_IT_event_source.cpp |
| 53 | + ./src/server/skv_server_command_event_source.cpp |
| 54 | + ./src/server/skv_server_local_kv_event_source.cpp |
| 55 | + ./src/server/skv_server_main.cpp |
| 56 | + ./src/server/skv_server_network_event_manager.cpp |
| 57 | + ./src/server/skv_server_tree_based_container.cpp |
| 58 | + ./src/server/skv_server_uber_pds.cpp |
| 59 | + ./system/bgq/etc/skv_server.conf |
| 60 | +) |
| 61 | + |
| 62 | +set(TEST_SRCS |
| 63 | + ./test/skv_base_test.cpp |
| 64 | + ./test/skv_test_bulk.cpp |
| 65 | + ./test/skv_test_clib.c |
| 66 | + ./test/skv_test_insert_retrieve_async.cpp |
| 67 | + ./test/skv_test_insert_retrieve_sync.cpp |
| 68 | + ./test/test_skv_insert_command.cpp |
| 69 | + ./test/test_skv_remove_command.cpp |
| 70 | + ./unittest/test_skv_rdma_data_buffer.cpp |
| 71 | + ./unittest/test_skv_ringbuffer_ptr.cpp |
| 72 | +) |
| 73 | + |
| 74 | +############################################# |
| 75 | +# Define the local KV backend to use |
| 76 | +# inmem - in-memory version of local kv |
| 77 | +# asyncmem - async in-memory version for testing |
| 78 | +# rocksdb - rocksdb backend (tbd) |
| 79 | +set(SKV_LOCAL_KV_BACKEND inmem) |
| 80 | + |
| 81 | +include(${CMAKE_CURRENT_SOURCE_DIR}/BGVIZ-MVAPICH.cmake) |
| 82 | + |
| 83 | +include_directories( |
| 84 | + include |
| 85 | + it_api/include |
| 86 | + lib/include |
| 87 | + FxLogger |
| 88 | + FxLogger/Pk |
| 89 | + profiler |
| 90 | + ${MPI_INCLUDE_PATH} |
| 91 | +) |
| 92 | + |
| 93 | +#SKV_GLOBAL_LDFLAGS=${SKV_CONFIG} ${SKV_CCFLAGS} ${FXLOGGER_DIR}/libPkLinux.a |
| 94 | +#${SKV_TOP}/build/libit_api_o_verbs.a -L${MPI_DIR}/lib ${LOCAL_KV_LIB_OPTS} |
| 95 | +#${SKV_GLOBAL_LDFLAGS_EXTENSION} -lrt |
| 96 | + |
| 97 | +add_Definitions( |
| 98 | +# default config file |
| 99 | + -DDEFAULT_CONFIG_FILE=\\"${CMAKE_CURRENT_SOURCE_DIR}/.skv_server.conf\\" |
| 100 | +# use PK_LINUX to pull in several important includes and macros |
| 101 | + -DPK_LINUX |
| 102 | +# use MSPACES from dlmalloc.h |
| 103 | + -DONLY_MSPACES |
| 104 | +# enable logging in general |
| 105 | + -DPKFXLOG |
| 106 | +# enable command header checksum |
| 107 | + -DSKV_HEADER_CHECKSUM |
| 108 | +# enable workaround for missing RoQ loopback functionality |
| 109 | + -DSKV_ROQ_LOOPBACK_WORKAROUND |
| 110 | +# set the local kv backend for SKV |
| 111 | + -DSKV_SERVER_LOCAL_KV=skv_local_kv_${SKV_LOCAL_KV_BACKEND} |
| 112 | +# logging in tests |
| 113 | + -DDO_CHECK |
| 114 | + |
| 115 | +# IT_API_CONFIG+=-DPK_LINUX |
| 116 | + |
| 117 | +# use event-based CQ reaping, if undefined it uses polling |
| 118 | + -DDIT_API_USE_EVENT_CQ |
| 119 | + |
| 120 | +# ifdef SKV_FOR_NONBGQ |
| 121 | + -DIT_API_COMM_DEVICE=\\"lo\\" |
| 122 | + |
| 123 | +# enable SIW workaround for ... and set the device name to use for |
| 124 | +# communication |
| 125 | + -DIT_API_USE_SIW_HACK |
| 126 | +) |
| 127 | + |
| 128 | +add_library(fxlogger ${FXLOGGER_SRCS}) |
| 129 | + |
| 130 | +add_library(it_api ${it_api_SRCS}) |
| 131 | + |
| 132 | +add_library(skv_common ${COMMON_SRCS}) |
| 133 | + |
| 134 | +target_link_libraries(skv_common pthread) |
| 135 | + |
| 136 | +add_executable(skv_server |
| 137 | + ${SERVER_SRCS} |
| 138 | +) |
| 139 | + |
| 140 | +target_link_libraries(skv_server |
| 141 | + skv_common |
| 142 | + it_api |
| 143 | + fxlogger |
| 144 | + ${OFED_LIBRARIES} |
| 145 | + ${MPI_LIBRARY} |
| 146 | +) |
0 commit comments