-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
82 lines (69 loc) · 3.1 KB
/
Makefile
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
#CXX = armclang++
CXX = g++
#CXX = FCC
MPICXX = mpicxx
# use -xmic-avx512 instead of -xHost for Intel Xeon Phi platforms
OPTFLAGS = -O3 -DPRINT_DIST_STATS -DPRINT_EXTRA_NEDGES
# -DPRINT_EXTRA_NEDGES prints extra edges when -p <> is passed to
# add extra edges randomly on a generated graph
# use export ASAN_OPTIONS=verbosity=1 to check ASAN output
SNTFLAGS = -std=c++17 -fsanitize=address -O1 -fno-omit-frame-pointer
CXXFLAGS = -std=c++17 -g -I. $(OPTFLAGS)
#CXXFLAGS = -ggdb -I. $(OPTFLAGS)
#CXXFLAGS_THREADS = -fopenmp -mcpu=a64fx -armpl -Rpass=loop-vectorize -Rpass-analysis=loop-vectorize -DZFILL_CACHE_LINES -DUSE_SHARED_MEMORY -DGRAPH_FT_LOAD=4 -DNTIMES=20 #-DEDGE_AS_VERTEX_PAIR #-DENABLE_PREFETCH
#CXXFLAGS_THREADS = -fopenmp -mcpu=a64fx -DZFILL_CACHE_LINES -DUSE_SHARED_MEMORY -DGRAPH_FT_LOAD=4 -DNTIMES=20 #-DEDGE_AS_VERTEX_PAIR #-DENABLE_PREFETCH
CXXFLAGS_THREADS = -fopenmp -DUSE_SHARED_MEMORY -DGRAPH_FT_LOAD=4 -DNTIMES=20 #-march=armv8.2-a+sve -mcpu=a64fx -mtune=a64fx #-DEDGE_AS_VERTEX_PAIR #-DENABLE_PREFETCH
#CXXFLAGS_THREADS = -march=armv8.2-a+sve -Kfast -Khpctag -Kopenmp -DUSE_SHARED_MEMORY -DGRAPH_FT_LOAD=4 -DNTIMES=20 #-DEDGE_AS_VERTEX_PAIR #-DENABLE_PREFETCH
CXXFLAGS_MPI =
#LDFLAGS += -armpl
ENABLE_LIKWID_PERFMON=0
ifeq ($(ENABLE_LIKWID_PERFMON),1)
CXXFLAGS_THREADS += -DLIKWID_MARKER_ENABLE -DLIKWID_PERFMON -I/lustre/software/likwid/5.1.1/include
LDFLAGS = -L/lustre/software/likwid/5.1.1/lib -llikwid
endif
ENABLE_DUMPI_TRACE=0
ENABLE_SCOREP_TRACE=0
ifeq ($(ENABLE_DUMPI_TRACE),1)
TRACERPATH = $(HOME)/builds/sst-dumpi/lib
LDFLAGS = -L$(TRACERPATH) -ldumpi
else ifeq ($(ENABLE_SCOREP_TRACE),1)
SCOREP_INSTALL_PATH = /usr/common/software/scorep/6.0/intel
INCLUDE = -I$(SCOREP_INSTALL_PATH)/include -I$(SCOREP_INSTALL_PATH)/include/scorep -DSCOREP_USER_ENABLE
LDAPP = $(SCOREP_INSTALL_PATH)/bin/scorep --user --nocompiler --noopenmp --nopomp --nocuda --noopenacc --noopencl --nomemory
endif
ENABLE_SSTMACRO=0
ifeq ($(ENABLE_SSTMACRO),1)
SSTPATH = $(HOME)/builds/sst-macro
CXX = $(SSTPATH)/bin/sst++
CXXFLAGS += -fPIC -DSSTMAC -I$(SSTPATH)/include
LDFLAGS = -Wl,-rpath,$(SSTPATH)/lib -L$(SSTPATH)/lib
endif
# https://software.llnl.gov/Caliper/services.html
ENABLE_LLNL_CALIPER=0
ifeq ($(ENABLE_LLNL_CALIPER), 1)
CALI_PATH = $(HOME)/builds/caliper
CXXFLAGS += -DLLNL_CALIPER_ENABLE -I$(CALI_PATH)/include
LDFLAGS = -Wl,-rpath,$(CALI_PATH)/lib -L$(CALI_PATH)/lib -lcaliper
endif
OBJ_MPI = main.o
SRC_MPI = main.cpp
TARGET_MPI = neve_mpi
OBJ_THREADS = main_threads.o
SRC_THREADS = main_threads.cpp
TARGET_THREADS = neve_threads
OBJS = $(OBJ_MPI) $(OBJ_THREADS)
TARGETS = $(TARGET_MPI) $(TARGET_THREADS)
all: $(TARGETS)
mpi: $(TARGET_MPI)
threads: $(TARGET_THREADS)
$(TARGET_MPI): $(OBJ_MPI)
$(LDAPP) $(MPICXX) -o $@ $+ $(LDFLAGS) $(CXXFLAGS)
$(OBJ_MPI): $(SRC_MPI)
$(MPICXX) $(INCLUDE) $(CXXFLAGS) -c $< -o $@
$(TARGET_THREADS): $(OBJ_THREADS)
$(LDAPP) $(CXX) $(CXXFLAGS_THREADS) -o $@ $+ $(LDFLAGS) $(CXXFLAGS)
$(OBJ_THREADS): $(SRC_THREADS)
$(CXX) $(INCLUDE) $(CXXFLAGS) $(CXXFLAGS_THREADS) -c $< -o $@
.PHONY: clean mpi threads
clean:
rm -rf *~ *.dSYM nc.vg.* $(OBJS) $(TARGETS)