This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (60 loc) · 2.74 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
all: step-1 step-2 step-3 step-4
CONDITIONS = --final-time 100 --snapshots 0.01 --dt 0.001 --min-mass 0.001 --max-mass 0.005 --N 4
compile-step-1:
NAME = step-1.out
icpc -fopenmp -O3 -xhost --std=c++0x step-1.cpp -o $(NAME)
python create_initial_conditions.py $(CONDITIONS) --executable-name ./$(NAME)
chmod 777 ./$(NAME).sh
debug-step-1:
NAME = step-1.d.out
icpc -pg -fopenmp -O3 -xhost --std=c++0x step-1.cpp -o $(NAME)
python create_initial_conditions.py $(CONDITIONS) --executable-name ./$(NAME) --snapshots 0.0 --final-time 1000
chmod 777 ./$(NAME).sh
profile-step-1:
NAME = step-1.p.out
icpc -g3 -fopenmp -O3 -xhost --std=c++0x step-1.cpp -o $(NAME)
python create_initial_conditions.py $(CONDITIONS) --snapshots 0.0 --executable-name ./$(NAME)
chmod 777 ./$(NAME).sh
profile-and-view: profile-step-1
valgrind --tool=callgrind `cat $(NAME).sh`
kcachegrind `find . -name "callgrind.out.*" -print0 | xargs -r -0 ls -1 -t | head -1`
step-1:
icpc -fopenmp -O3 -xhost --std=c++0x step-1.cpp -o builds/step-1.out
cp builds/step-1.out /ddn/data/zrlr73/Tests1
icpc -fopenmp -O3 -xhost -g --std=c++0x step-1.cpp -o builds/step-1.g.out
cp builds/step-1.g.out /ddn/data/zrlr73/Tests1
step-1-c:
icpc -fopenmp -O3 -xhost --std=c++0x step-1-convergence.cpp -o builds/step-1.out
cp builds/step-1.out /ddn/data/zrlr73/Tests1
step-2:
icpc -fopenmp -O3 -xhost --std=c++0x step-2.cpp -o builds/step-2.out
cp builds/step-2.out /ddn/data/zrlr73/Tests2
icpc -fopenmp -O3 -xhost -g --std=c++0x step-2.cpp -o builds/step-2.g.out
cp builds/step-2.g.out /ddn/data/zrlr73/Tests2
step-3:
icpc -fopenmp -O3 -xhost --std=c++0x step-3.cpp -o builds/step-3.out
cp builds/step-3.out /ddn/data/zrlr73/Tests3
icpc -fopenmp -O3 -xhost -g --std=c++0x step-3.cpp -o builds/step-3.g.out
cp builds/step-3.g.out /ddn/data/zrlr73/Tests3
step-3-c:
icpc -fopenmp -O3 -xhost --std=c++0x step-3-convergence.cpp -o builds/step-3.out
cp builds/step-3.out /ddn/data/zrlr73/Tests3
step-4:
icpc -fopenmp -O3 -xhost --std=c++0x step-4.cpp -o builds/step-4.out
cp builds/step-4.out /ddn/data/zrlr73/Tests4
icpc -fopenmp -O3 -xhost -g --std=c++0x step-4.cpp -o builds/step-4.g.out
cp builds/step-4.g.out /ddn/data/zrlr73/Tests4
clean:
mv *.optrpt builds/
get-compiler-report:
icpc -qopt-report=5 -fopenmp -O3 -xhost --std=c++0x step-2.cpp -o step-2.out
clear-results:
rm *.vtp *.pvd
step-1.5:
icpc -qopt-report -fopenmp -O3 -xhost --std=c++0x step-1.5.cpp -o step-1.5.out
debug-step-2:
icpc -O3 -xhost -g -fopenmp step-2.cpp -o step-2.p.out
perf-conditions:
python3 create_initial_conditions.py --snapshots 0.0 --executable-name "step-2.p.out" --final-time 100 --dt 0.001 --min-mass 0.001 --max-mass 0.005 --N 8
gen-call-tree:
gprof2dot -f callgrind $(PROFILEFILE) | dot -Tpng -o output.png