forked from diegofinni/distributed-ml-mpi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (24 loc) · 1.19 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_STANDARD 11)
SET(GCC_COMPILE_FLAGS "-pthread -fopenmp -g --std=c++11 -L/usr/local/depot/cuda-10.2/lib64 -I/usr/local/depot/cuda-10.2/include -I"include" -lcusparse -lcudart")
add_definitions(${GCC_COMPILE_FLAGS})
project(dml)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
add_executable(lr_centralized centralized_main.cpp lr.hpp lr.cpp master_node.hpp master_node.cpp worker_node.hpp worker_node.cpp )
add_executable(lr_decentralized decentralized_main.cpp decentralized.cpp decentralized.hpp lr.cpp lr.hpp)
add_executable(lr_seq sequential_main.cpp lr.cpp lr.hpp)
target_link_libraries(lr_centralized ${MPI_LIBRARIES})
target_link_libraries(lr_decentralized ${MPI_LIBRARIES})
if(MPI_COMPILE_FLAGS)
set_target_properties(lr_centralized PROPERTIES
COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
set_target_properties(lr_decentralized PROPERTIES
COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif()
if(MPI_LINK_FLAGS)
set_target_properties(lr_centralized PROPERTIES
LINK_FLAGS "${MPI_LINK_FLAGS}")
set_target_properties(lr_decentralized PROPERTIES
COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif()