-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
207 lines (178 loc) · 5.44 KB
/
CMakeLists.txt
File metadata and controls
207 lines (178 loc) · 5.44 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
202
203
204
205
206
207
# cmake_minimum_required(VERSION 3.26)
cmake_minimum_required(VERSION 3.20)
project(ppl)
set(CMAKE_CXX_STANDARD 23)
# # Boost Config
# set(Boost_INCLUDE_DIRS /Users/rohan/Documents/libs/boost_1_82_0/boost)
# set(Boost_USE_STATIC_LIBS ON) # If you prefer static linking
# set(Boost_USE_MULTITHREADED ON)
# set(Boost_LIBRARIES
# /Users/rohan/Documents/libs/boost_1_82_0/lib/libboost_mpi.a
# /Users/rohan/Documents/libs/boost_1_82_0/lib/libboost_serialization.a
# # ... other required Boost libraries if needed
# )
# Boost config for lab machines -- Comment out for running on bach
set(Boost_INCLUDE_DIRS /home/rk76/Documents/OMPI/boost_1_82_0/boost)
set(Boost_USE_STATIC_LIBS ON) # If you prefer static linking
set(Boost_USE_MULTITHREADED ON)
set(Boost_LIBRARIES
/cs/home/rk76/usr/lib/libboost_mpi.a
/cs/home/rk76/usr/lib/libboost_serialization.a
# ... other required Boost libraries if needed
)
# Include boost build directory as /cs/home/rk76/usr
# Common source files
set(COMMON_SOURCES
src/Queue.hpp
src/FarmManager.hpp
src/PipelineManager.hpp
src/Node.hpp
libs/EasyBMP.hpp
libs/EasyBMPSerialisable.hpp
src/MPIFarmManager.hpp
src/MPIPipelineManager.hpp
)
# Executable target: farm_test
add_executable(farm_test
${COMMON_SOURCES}
Node_Examples/Farm/farm_test.cpp
)
# Executable target: julia
add_executable(julia
${COMMON_SOURCES}
Node_Examples/Farm/julia.cpp
)
# Executable target: julia_seq
add_executable(julia_seq
${COMMON_SOURCES}
Node_Examples/Farm/julia_seq.cpp
)
# Executable target: mandelbrot
add_executable(mandelbrot
${COMMON_SOURCES}
Node_Examples/Farm/mandelbrot.cpp
)
# Executable target: mandelbrot_seq
add_executable(mandelbrot_seq
${COMMON_SOURCES}
Node_Examples/Farm/mandelbrot_seq.cpp
)
# Executable target: pipeline_test
add_executable(pipeline_test
${COMMON_SOURCES}
Node_Examples/Pipeline/pipeline_test.cpp
)
# Executable target: pipeline_text_processing
add_executable(pipeline_text_processing
${COMMON_SOURCES}
Node_Examples/Pipeline/pipeline_text_processing.cpp
)
# Executable target: pipeline_text_processing
add_executable(seq_text_processing
${COMMON_SOURCES}
Node_Examples/Pipeline/seq_text_processing.cpp
)
# Executable target: gaussian_blur
add_executable(gaussian_blur
${COMMON_SOURCES}
Node_Examples/Farm/gaussian_blur.cpp
)
# Executable target: farm_matmul
add_executable(farm_matmul
${COMMON_SOURCES}
Node_Examples/Farm/farm_matmul.cpp
)
# Executable target: seq_matmul
add_executable(seq_matmul
${COMMON_SOURCES}
Node_Examples/Farm/seq_matmul.cpp
)
# Executable target: farm_dot_product
add_executable(farm_dot_product
${COMMON_SOURCES}
Node_Examples/Farm/farm_dot_product.cpp
)
# Executable target: seq_dot_product
add_executable(seq_dot_product
${COMMON_SOURCES}
Node_Examples/Farm/seq_dot_product.cpp
)
# Executable target: farm_monte_carlo
add_executable(farm_monte_carlo
${COMMON_SOURCES}
Node_Examples/Farm/farm_monte_carlo.cpp
)
# Executable target: seq_monte_carlo
add_executable(seq_monte_carlo
${COMMON_SOURCES}
Node_Examples/Farm/seq_monte_carlo.cpp
)
# Nested Farm in Pipeline
# nexted_farm_in_pipeline_gaussian_blur
add_executable(nested_farm_in_pipeline_gaussian_blur
${COMMON_SOURCES}
Node_Examples/Pipeline/nested_farm_in_pipeline_gaussian_blur.cpp
)
add_executable(seq_nested_farm_in_pipeline_gaussian_blur
${COMMON_SOURCES}
Node_Examples/Pipeline/seq_nested_farm_in_pipeline_gaussian_blur.cpp
)
# MPI Node_Examples
# Mandelbrot
include_directories(${Boost_INCLUDE_DIRS})
find_package(Boost 1.82.0 REQUIRED COMPONENTS mpi serialization)
add_executable(mpi_mandelbrot
${COMMON_SOURCES}
MPI_Examples/Farm/mandelbrot.cpp
)
target_link_libraries(mpi_mandelbrot
${Boost_LIBRARIES}
MPI::MPI_CXX
)
# pipline_test
include_directories(${Boost_INCLUDE_DIRS})
find_package(Boost 1.82.0 REQUIRED COMPONENTS mpi serialization)
add_executable(mpi_pipeline_test
${COMMON_SOURCES}
MPI_Examples/Pipeline/pipeline_test.cpp
)
target_link_libraries(mpi_pipeline_test
${Boost_LIBRARIES}
MPI::MPI_CXX
)
# farm_test
include_directories(${Boost_INCLUDE_DIRS})
find_package(Boost 1.82.0 REQUIRED COMPONENTS mpi serialization)
add_executable(mpi_farm_test
${COMMON_SOURCES}
MPI_Examples/Farm/farm_test.cpp
)
target_link_libraries(mpi_farm_test
${Boost_LIBRARIES}
MPI::MPI_CXX
)
# Nested Farm in MPI Farm
# farm_test -- Factorials
include_directories(${Boost_INCLUDE_DIRS})
find_package(Boost 1.82.0 REQUIRED COMPONENTS mpi serialization)
add_executable(nested_farm_in_mpi_farm
${COMMON_SOURCES}
MPI_Examples/Farm/nested_farm_in_mpi_farm.cpp
)
target_link_libraries(nested_farm_in_mpi_farm
${Boost_LIBRARIES}
MPI::MPI_CXX
)
# Nested Farm in MPI Farm -- Montecarlo PI
include_directories(${Boost_INCLUDE_DIRS})
find_package(Boost 1.82.0 REQUIRED COMPONENTS mpi serialization)
add_executable(nested_farm_in_mpi_farm_monte_carlo
${COMMON_SOURCES}
MPI_Examples/Farm/monte_carlo_pi.cpp
)
target_link_libraries(nested_farm_in_mpi_farm_monte_carlo
${Boost_LIBRARIES}
MPI::MPI_CXX
)
#mpic++ -I/path/to/boost/mpi my_application.cpp -Llibdir \
# -lboost_mpi -lboost_serialization