-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon.mk
executable file
·86 lines (69 loc) · 1.33 KB
/
common.mk
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
DEBUG ?= 0
MPI_HOME := $(shell dirname $(shell dirname $(shell which mpicxx)))
CUDA_HOME := $(shell dirname $(shell dirname $(shell which nvcc)))
CC=gcc
CXX=g++
ICC=$(ICC_HOME)/icc
ICPC=$(ICC_HOME)/icpc
MPICC=mpicc
MPICXX=mpicxx
NVCC=nvcc
CUDA_ARCH := -gencode arch=compute_80,code=sm_80
CXXFLAGS=-Wall -fopenmp -std=c++11 -march=native
ICPCFLAGS=-O3 -Wall -qopenmp
NVFLAGS=$(CUDA_ARCH)
NVFLAGS+=-DUSE_GPU
ifeq ($(VTUNE), 1)
CXXFLAGS += -g
endif
ifeq ($(NVPROF), 1)
NVFLAGS += -lineinfo
endif
ifeq ($(DEBUG), 1)
CXXFLAGS += -g -O0
NVFLAGS += -G
else
CXXFLAGS += -O3
NVFLAGS += -O3 -w
endif
ifeq ($(PAPI), 1)
CXXFLAGS += -DENABLE_PAPI
INCLUDES += -I$(PAPI_HOME)/include
LIBS += -L$(PAPI_HOME)/lib -lpapi
endif
LIBS += -lgomp
VPATH += ../common
OBJS=main.o VertexSet.o graph.o
# CUDA vertex parallel
ifneq ($(VPAR),)
NVFLAGS += -DVERTEX_PAR
endif
# CUDA CTA centric
ifneq ($(CTA),)
NVFLAGS += -DCTA_CENTRIC
endif
ifneq ($(PROFILE),)
CXXFLAGS += -DPROFILING
endif
ifneq ($(USE_SET_OPS),)
CXXFLAGS += -DUSE_MERGE
endif
ifneq ($(USE_SIMD),)
CXXFLAGS += -DSI=0
endif
# counting or listing
ifneq ($(COUNT),)
NVFLAGS += -DDO_COUNT
endif
# GPU vertex/edge parallel
ifeq ($(VERTEX_PAR),)
NVFLAGS += -DEDGE_PAR
endif
# CUDA unified memory
ifneq ($(USE_UM),)
NVFLAGS += -DUSE_UM
endif
# kernel fission
ifneq ($(FISSION),)
NVFLAGS += -DFISSION
endif