-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
59 lines (42 loc) · 1.43 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
RMATPATH = GTgraph/R-MAT
SPRNPATH = GTgraph/sprng2.0-lite
PRMATPATH = PaRMAT/Release/src
PRMATPATH1 = PaRMAT/Release/
include GTgraph/Makefile.var
INCLUDE = -I$(SPRNPATH)/include
CC = g++
# FLAGS = -g -fopenmp -O3 -march=native
FLAGS = -fopenmp -O3 -m64 -std=c++17
# FLAGS = -g -fopenmp -O2 -ffast-math -march=native -ftree-vectorize
sprng:
(cd $(SPRNPATH); $(MAKE); cd ../..)
rmat: sprng
(cd $(RMATPATH); $(MAKE); cd ../..)
prmat:
(cd $(PRMATPATH1); $(MAKE); cd ../..)
TOCOMPILE = $(RMATPATH)/graph.o $(RMATPATH)/utils.o $(RMATPATH)/init.o $(RMATPATH)/globals.o $(PRMATPATH)/GraphGen_notSorted.o $(PRMATPATH)/utils.o $(PRMATPATH)/Edge.o $(PRMATPATH)/Square.o $(PRMATPATH)/GraphGen_sorted.o
# flags defined in GTgraph/Makefile.var
SAMPLE = ./sample
BIN = ./bin
SRC_SAMPLE = $(wildcard $(SAMPLE)/*.cpp)
SAMPLE_TARGET = $(SRC_SAMPLE:$(SAMPLE)%=$(BIN)%)
spgemm: rmat prmat $(SAMPLE_TARGET:.cpp=_hw)
$(BIN)/%_hw: $(SAMPLE)/%.cpp
mkdir -p $(BIN)
$(CC) $(FLAGS) $(INCLUDE) -o $@ $^ -DCPP -DHW_EXE ${TOCOMPILE} ${LIBS}
# specific for OuterSpGEMM
# Will do the same for other exe files
$(BIN)/OuterSpGEMM_hw: outer_mult.h sample/OuterSpGEMM.cpp
mkdir -p $(BIN)
$(CC) $(FLAGS) $(INCLUDE) -o $@ $^ -DCPP -DHW_EXE ${TOCOMPILE} ${LIBS}
clean:
(cd GTgraph; make clean; cd ../..)
(cd $(PRMATPATH1); make clean; cd ../..)
rm -rf ./bin/*
# rm -rf assets/*
gen-er:
./scripts/gen_er.sh
gen-rmat:
./scripts/gen_rmat.sh
download:
./scripts/download.sh