-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.mpi
45 lines (34 loc) · 1.15 KB
/
Makefile.mpi
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
# defines
CXX=mpicxx
SPEEDFLAGS=-O3 -ffast-math -msse4.2
CXXFLAGS_MPI=-DHAVE_MPI=1
CXXFLAGS= -Wall -fopenmp $(SPEEDFLAGS) $(PROFGENFLAGS) $(PROFUSEFLAGS) $(CXXFLAGS_MPI)
LDFLAGS=-lrt -lgomp $(SPEEDFLAGS)
#LDFLAGS_MPI=
TARGET = solution solution_mpi reference_bfs gen_RMAT gen_random gen_valid_info validation
all: $(TARGET)
# your own implementation
solution: main.o solution.o graph_tools.o
$(CXX) $^ -o $@ $(LDFLAGS)
# your own implementation
solution_mpi: main_mpi.o solution.o solution_mpi.o graph_tools.o gen_RMAT_mpi.o gen_random_mpi.o
$(CXX) $^ -o solution_mpi.bin $(LDFLAGS) $(LDFLAGS_MPI)
# reference implementation with bfs
reference_bfs: main.o reference_bfs.o graph_tools.o
$(CXX) $^ -o $@ $(LDFLAGS)
# RMAT generator
gen_RMAT: gen_RMAT.o graph_tools.o
$(CXX) $^ -o $@ $(LDFLAGS)
# Erdos-Renyi (random) graph generator
gen_random: gen_random.o graph_tools.o
$(CXX) $^ -o $@ $(LDFLAGS)
# gen_valid_info
gen_valid_info: gen_valid_info.o reference_bfs.o graph_tools.o
$(CXX) $^ -o $@ $(LDFLAGS)
# validation
validation: validation.o reference.o graph_tools.o
$(CXX) $^ -o $@ $(LDFLAGS)
.cpp.o:
$(CXX) $(CXXFLAGS) -o $@ -c $<
clean:
rm -rf *.o $(TARGET)