-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
64 lines (44 loc) · 1.3 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
CXX = icpc
COMPFLAGS = -g -std=c++11 -O2
INCLUDES =
CXXFLAGS = $(COMPFLAGS)
SOURCES = GSimulation.cpp main.cpp
ADVPRJ = "./adv-ver0"
ifeq ($(REPORT), yes)
CXXFLAGS+=-qopt-report=5
ifeq ($(FILTER), yes)
CXXFLAGS+=-qopt-report-phase=vec -qopt-report-filter="GSimulation.cpp,125-175"
endif
endif
.SUFFIXES: .o .cpp
##########################################
OBJSC = $(SOURCES:.cpp=.o)
##########################################
EXEC=nbody.x
all: cpu
%.o: %.cpp
$(info )
$(info Compiling the object file for CPU: )
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
cpu: $(OBJSC)
$(info )
$(info Linking the CPU executable:)
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $(EXEC) $(OBJSC)
run:
$(info )
$(info Run the default test case on CPU: )
./nbody.x
clean:
rm -f $(OBJSC) nbody.x *.optrpt
#----------------------------------------------------------------
#---------- Intel Advisor Analysis ------------------------------
#----------------------------------------------------------------
survey:
advixe-cl -collect survey -project-dir $(ADVPRJ) -- ./nbody.x
roofline:
advixe-cl -collect survey -project-dir $(ADVPRJ) -- ./nbody.x
advixe-cl -collect tripcounts -flop -project-dir $(ADVPRJ) -- ./nbody.x
open-gui:
advixe-gui $(ADVPRJ)/$(ADVPRJ).advixeproj >/dev/null 2>&1 &
clean-results:
rm -rf $(ADVPRJ)