-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
86 lines (63 loc) · 2.39 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
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
cmake_minimum_required(VERSION 3.17)
project(DistEmbed)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# LocationByValue MPI
message("Finding MPI")
find_package(MPI REQUIRED)
message(STATUS "MPI include dir: ${MPI_CXX_INCLUDE_PATH}")
message(STATUS "MPI libs: ${MPI_CXX_LIBRARIES}")
message(STATUS "MPI executable: ${MPIEXEC_EXECUTABLE}")
#message("Finding MKL")
#find_package(MKL REQUIRED)
message("Finding OpenMP")
find_package(OpenMP REQUIRED)
message("Finding BLAS")
find_package(BLAS REQUIRED)
include_directories($ENV{COMBLAS_ROOT}/install/include $ENV{MKLROOT}/include $ENV{EIGEN_ROOT}/include)
link_directories($ENV{COMBLAS_ROOT}/install/lib $ENV{MKLROOT}/lib/intel64)
message("CMAKE_BINARY_PATH ${CMAKE_BINARY_DIR}")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
#add_subdirectory(include)
#add_subdirectory(core)
#add_subdirectory(embedding)
add_library(disembed_lib SHARED
cpp/core/common.h
cpp/core/common.cpp
cpp/core/distributed_mat.hpp
cpp/core/sparse_mat.hpp
cpp/core/mpi_type_creator.hpp
cpp/io/parrallel_IO.cpp
cpp/io/parrallel_IO.hpp
cpp/net/process_3D_grid.cpp
cpp/net/process_3D_grid.hpp
cpp/net/data_comm.hpp
cpp/algo/algo.hpp
cpp/core/json.hpp
cpp/partition/partitioner.cpp
cpp/partition/partitioner.hpp
cpp/algo/spmm.hpp
cpp/algo/spgemm.hpp
cpp/algo/fusedmm.hpp
cpp/core/sparse_mat_tile.hpp
cpp/net/tile_based_data_comm.hpp
cpp/algo/spgemm_with_tiling.hpp
cpp/algo/sparse_embedding.hpp
cpp/algo/multi_source_bfs.hpp
cpp/algo/baseline.hpp
cpp/algo/baseline_spmm.hpp
cpp/algo/baseline_fused_mm.hpp)
SET(BUILD_TESTS "" ON)
#if (BUILD_TESTS)
# add_subdirectory(tests)
# message(STATUS "Building tests ....")
#endif ()
SET(SOURCES cpp/dist_embed.cpp)
add_executable(distembed ${SOURCES})
target_compile_options(distembed PRIVATE -DMKL_ILP64 -m64 -fopenmp -I$ENV{MKLROOT}/include)
target_link_options(distembed PRIVATE -L$ENV{MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl)
target_link_libraries(distembed disembed_lib)
target_link_libraries(distembed MPI::MPI_CXX)
target_link_libraries(distembed OpenMP::OpenMP_CXX)
target_link_libraries(distembed CombBLAS)
#target_link_libraries(distblas $ENV{MKLROOT})