forked from hpcfmh105/hpc_in-memory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt.bak
126 lines (94 loc) · 5.26 KB
/
CMakeLists.txt.bak
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
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
SET(CMAKE_C_COMPILER cc)
SET(CMAKE_CXX_COMPILER CC)
message("----environemnt variable mpich $ENV{CRAY_MPICH2_DIR}")
SET(MPI_INCLUDE_PATH "")
#SET(MPI_INCLUDE_PATH "$ENV{CRAY_MPICH2_DIR}/include")
SET(LAMMPS_INCLUDE_DIR "/ccs/home/dhuang/lammps-22Aug18/src")
set(LAMMPS_LIBRARY_STATIC "/ccs/home/dhuang/lammps-22Aug18/build/liblammps.a")
project("lbm_adios")
message("----MPI INCLUDE PATH ${MPI_INCLUDE_PATH}")
#if(TRANSPORT_LIB)
# message("-- Including transport method in ${TRANSPORT_LIB} is loaded...")
#else()
# message(FATAL_ERROR "-- should either specify build type or toolchain file")
#endif()
message("----current cxx flags is ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS " -mp -fast -O3 -DNDEBUG")
SET(CMAKE_CXX_FLAGS " -mp -fast -O3 -DNDEBUG")
#SET(CMAKE_C_FLAGS " -O3 -DNDEBUG")
#SET(CMAKE_CXX_FLAGS " -O3 -DNDEBUG")
SET(CMAKE_EXE_LINKER_FLAGS " -mp -fast -O3 -std=c++11 -DNDEBUG")
#SET(CMAKE_EXE_LINKER_FLAGS " -O3 -DNDEBUG")
option(all_transports "build all transports" ON)
option(use_itac "build with itac" OFF)
option(build_zipper "build zipper runtim" OFF)
option(USE_SAME_LOCK "Use same lock in dspaces" OFF)
option(BARRIER_STAMP "barrier after broadcast version in consumer" ON)
if(NOT USE_SAME_LOCK)
set(DS_MAX_VERSION "3")
endif()
configure_file(
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
@ONLY
)
include_directories("${PROJECT_BINARY_DIR}")
include_directories(include)
set(common_library "m")
#itac
if(use_itac)
add_definitions(-DV_T)
set(VT_ROOT $ENV{VT_ROOT} CACHE PATH "The path vt")
message("itac enabled! with ${VT_ROOT}")
include_directories(${VT_ROOT}/include)
### see VT_ADD_LIBS
#set(vt_library ${INTEL_VT} $ENV{VT_ADD_LIBS})
set(vt_library "-L$ENV{VT_SLIB_DIR} -lVT $ENV{VT_ADD_LIBS}" CACHE STRING "itac link flags")
set(common_library ${common_library} ${vt_library})
#set(common_library ${common_library} "-L/opt/intel/itac/2017.3.030/intel64/lib -lVT -ldwarf -lelf -lvtunwind" )
endif(use_itac)
# mpi
#find_package(MPI REQUIRED)
set(DECAF_INCLUDE_DIR "/lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/include")
set(DECAF_LIB_PATH "/lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib")
find_library(BCA_LIB_PATH NAMES bca PATHS /lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib)
find_library(BREDALA_DATAMODEL_LIB_PATH NAMES bredala_datamodel PATHS /lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib)
find_library(BREDALA_TRANSPORT_MPI_LIB_PATH NAMES bredala_transport_mpi PATHS /lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib)
find_library(DCA_LIB_PATH NAMES dca PATHS /lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib)
set(DECAF_LIB_PATH "/lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib/libdecaf.a")
find_library(MANALA_LIB_PATH NAMES manala PATHS /lustre/atlas/proj-shared/csc143/dhuang/sc15/code/decaf/install/lib)
message("decaf lib: ${DECAF_LIB_PATH}...")
set(common_library ${common_library} ${BCA_LIB_PATH} ${BREDALA_DATAMODEL_LIB_PATH} ${BREDALA_TRANSPORT_MPI_LIB_PATH} ${DCA_LIB_PATH} ${DECAF_LIB_PATH} ${MANALA_LIB_PATH} ${MPI_INCLUDE_DIR} $ENV{FLEXPATH_DIR}/lib)
set(common_library ${common_library} "-I/lustre/atlas/proj-shared/csc143/dhuang/sc15/code/boost_1_64_0/install/include -L/lustre/atlas/proj-shared/csc143/dhuang/sc15/code/boost_1_64_0/install/lib -lboost_date_time -lboost_filesystem -lboost_graph -lboost_iostreams -lboost_math_c99 -lboost_math_c99f -lboost_math_c99l -lboost_math_tr1 -lboost_math_tr1f -lboost_math_tr1l -lboost_prg_exec_monitor -lboost_program_options -lboost_python -lboost_regex -lboost_serialization -lboost_signals -lboost_system -lboost_test_exec_monitor -lboost_thread -lboost_unit_test_framework -lboost_wave -lboost_wserialization")
message("-----common library: ${common_library}")
add_definitions ("-DENABLE_TIMING")
add_definitions ("-DTRANSPORT_MPI")
#add_definitions ("-DBOOST_LIBRARY=/home/cass2014/Code/decaf/boost_1_64_0/install/lib")
#add_definitions ("-DUSE_DATASPACES -DENABLE_TIMING -Wall -Wextra")
#add_definitions ("-DUSE_DATASPACES -DHAS_KEEP -DENABLE_TIMING -Wall -Wextra")
#add_definitions ("-DUSE_DIMES -DENABLE_TIMING -Wall -Wextra")
#add_definitions ("-DUSE_DIMES -DHAS_KEEP -DENABLE_TIMING -Wall -Wextra")
set(BOOST_DIR "/lustre/atlas/proj-shared/csc143/dhuang/sc15/code/boost_1_64_0/install")
include_directories(${MPI_INCLUDE_PATH} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/analysis ${CMAKE_SOURCE_DIR}/msd ${CMAKE_SOURCE_DIR}/lbm ${DECAF_INCLUDE_PATH})
include_directories(${BOOST_DIR}/include ${BOOST_DIR}/include/boost ${BOOST_DIR}/include/boost/serialization)
#include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/analysis ${CMAKE_SOURCE_DIR}/msd ${CMAKE_SOURCE_DIR}/lbm)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
## lbm-nmoments
#add_subdirectory(lbm)
add_subdirectory(nmoments-anal)
## lammps-msd
#if(LAMMPS_INCLUDE_DIR)
add_subdirectory(msd-anal)
#endif()
## bind different transports to applications
#if(all_transports)
add_subdirectory(all-transports)
#endif(all_transports)
## zipper
#if(build_zipper)
# add_subdirectory(zipper)
#endif(build_zipper)
## tests
add_subdirectory(tests)