-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
201 lines (176 loc) · 6.13 KB
/
CMakeLists.txt
File metadata and controls
201 lines (176 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
cmake_minimum_required(VERSION 3.15)
include (FetchContent)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
project(Landscape)
# Recommend not to set these options. They are for our ablative experiments
# USE_CUBE: Use the CubeSketch sampling algorithm
# NO_STANDALONE: Use StandAloneGutters as the guttering system
# Make the default build type Release. If user or another
# project sets a different value than use that
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to default -- Release")
set(CMAKE_BUILD_TYPE "Release" CACHE
STRING "Choose the type of build." FORCE)
endif()
message(STATUS "Landscape Build Type ${CMAKE_BUILD_TYPE}")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
message(STATUS "Adding GNU compiler flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
message(STATUS "Adding MSVC compiler flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
else()
message(STATUS "${CMAKE_CXX_COMPILER_ID} not recognized, no flags added")
endif()
#add_compile_options(-fsanitize=address)
#add_link_options(-fsanitize=address)
######
# Get MPI for distributed communication
######
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
add_definitions(-DOMPI_SKIP_MPICXX)
if(MPI_CXX_FOUND)
message("Found MPI_CXX")
endif()
# set(FETCHCONTENT_UPDATES_DISCONNECTED)
# Install GraphZeppelin Project
FetchContent_Declare(
GraphZeppelin
GIT_REPOSITORY https://github.com/GraphStreamingProject/GraphZeppelin
GIT_TAG v2.0.0
)
FetchContent_MakeAvailable(GraphZeppelin)
if (USE_CUBE)
message(STATUS "Using CubeSketch sampling algorithm")
target_compile_definitions(GraphZeppelin PUBLIC L0_SAMPLING)
target_compile_definitions(GraphZeppelinVerifyCC PUBLIC L0_SAMPLING)
endif()
if (USE_STANDALONE)
message(STATUS "Using StandAlone Gutters for gts")
endif()
if (BUILD_BENCH)
# Get Google Benchmark
FetchContent_Declare(
benchmark
GIT_REPOSITORY https://github.com/google/benchmark
GIT_TAG v1.6.1
)
set(BENCHMARK_ENABLE_GTEST_TESTS OFF)
FetchContent_MakeAvailable(benchmark)
endif()
# The library for distributing the CPU work for
# generating sketch deltas
add_library(Landscape
src/worker_cluster.cpp
src/work_distributor.cpp
src/distributed_worker.cpp
src/message_forwarders.cpp
src/graph_distrib_update.cpp
)
add_dependencies(Landscape GraphZeppelin)
target_link_libraries(Landscape PUBLIC GraphZeppelin ${MPI_LIBRARIES})
target_include_directories(Landscape PUBLIC include/ ${MPI_C_INCLUDE_PATH})
if(MPI_COMPILE_FLAGS)
set_target_properties(Landscape PROPERTIES
COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif()
if(MPI_LINK_FLAGS)
set_target_properties(Landscape PROPERTIES
LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
if (USE_STANDALONE)
target_compile_definitions(Landscape PUBLIC USE_STANDALONE)
endif()
# A library for testing our code for distributing
# generating sketch deltas
add_library(LandscapeVerify
src/worker_cluster.cpp
src/work_distributor.cpp
src/distributed_worker.cpp
src/message_forwarders.cpp
src/graph_distrib_update.cpp
)
add_dependencies(LandscapeVerify GraphZeppelinVerifyCC)
target_link_libraries(LandscapeVerify PUBLIC GraphZeppelinVerifyCC ${MPI_LIBRARIES})
target_include_directories(LandscapeVerify PUBLIC include/ ${MPI_C_INCLUDE_PATH})
if(MPI_COMPILE_FLAGS)
set_target_properties(LandscapeVerify PROPERTIES
COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif()
if(MPI_LINK_FLAGS)
set_target_properties(LandscapeVerify PROPERTIES
LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
if (USE_STANDALONE)
target_compile_definitions(LandscapeVerify PUBLIC USE_STANDALONE)
endif()
add_executable(distrib_tests
test/distributed_graph_test.cpp
test/k_connectivity_test.cpp
test/test_runner.cpp
${GraphZeppelin_SOURCE_DIR}/test/util/graph_gen.cpp
${GraphZeppelin_SOURCE_DIR}/test/util/file_graph_verifier.cpp
)
add_dependencies(distrib_tests LandscapeVerify)
target_link_libraries(distrib_tests PUBLIC LandscapeVerify)
add_executable(speed_expr
experiment/cluster_speed_expr.cpp
)
add_dependencies(speed_expr Landscape)
target_link_libraries(speed_expr PUBLIC Landscape)
add_executable(k_speed_expr
experiment/cluster_k_connect_expr.cpp
)
add_dependencies(k_speed_expr Landscape)
target_link_libraries(k_speed_expr PUBLIC Landscape)
add_executable(query_expr
experiment/cluster_query_expr.cpp
)
add_dependencies(query_expr Landscape)
target_link_libraries(query_expr PUBLIC Landscape)
add_executable(correctness_expr
experiment/cont_expr.cpp
)
add_dependencies(correctness_expr LandscapeVerify)
target_link_libraries(correctness_expr PUBLIC LandscapeVerify)
#####################################################################
##################### Streaming utilities #####################
#####################################################################
add_executable(binary_to_static
tools/to_static.cpp
)
add_dependencies(binary_to_static GraphZeppelinVerifyCC)
target_link_libraries(binary_to_static PUBLIC GraphZeppelinVerifyCC)
#add_executable(stream_gen
# tools/streaming/hash_streamer.cpp
# tools/streaming/gz_specific/gz_nonsequential_streamer.cpp
# tools/streaming/gz_specific/gz_sequential_streamer.cpp
# tools/streaming/stream_finder.cpp
#)
#add_dependencies(stream_gen GraphZeppelin)
#target_link_libraries(stream_gen PUBLIC GraphZeppelin)
add_executable(mpi_experiment
experiment/mpi_message_throughput.cpp
)
target_link_libraries(mpi_experiment PUBLIC ${MPI_LIBRARIES})
if(MPI_COMPILE_FLAGS)
set_target_properties(mpi_experiment PROPERTIES
COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif()
if(MPI_LINK_FLAGS)
set_target_properties(mpi_experiment PROPERTIES
LINK_FLAGS "${MPI_LINK_FLAGS}")
endif()
if (BUILD_BENCH)
add_executable(bench_streaming
tools/streaming/streamer_bench.cpp
# tools/streaming/hash_streamer.cpp
# tools/streaming/gz_specific/gz_nonsequential_streamer.cpp
tools/streaming/gz_specific/gz_sequential_streamer.cpp
)
add_dependencies(bench_streaming GraphZeppelin benchmark)
target_link_libraries(bench_streaming GraphZeppelin benchmark::benchmark)
endif()