5.1.3 : The compilation



Let's compile. First we have to go into the build directory and call cmake program :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cmake ..
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ENV{CONDA_DEFAULT_ENV} does not exist
-- Configuring done
-- Generating done
-- Build files have been written to: XXX/build


Then we can call make to compile and run the examples (it may takes few minutes depending on your system, compiler, computer, etc) :
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
make plot_all
Scanning dependencies of target asterics_hpc
[  2%] Building CXX object AstericsHPC/CMakeFiles/asterics_hpc.dir/asterics_alloc.cpp.o
[  5%] Building CXX object AstericsHPC/CMakeFiles/asterics_hpc.dir/timer.cpp.o
[  8%] Building CXX object AstericsHPC/CMakeFiles/asterics_hpc.dir/asterics_random.cpp.o
[ 11%] Linking CXX shared library libasterics_hpc.so
[ 11%] Built target asterics_hpc
Scanning dependencies of target tableImpl_O0
[ 14%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O0.dir/main.cpp.o
[ 17%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O0.dir/table_particle.cpp.o
[ 20%] Linking CXX executable tableImpl_O0
[ 20%] Built target tableImpl_O0
Scanning dependencies of target tableImpl_O2
[ 23%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O2.dir/main.cpp.o
[ 26%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O2.dir/table_particle.cpp.o
[ 29%] Linking CXX executable tableImpl_O2
[ 29%] Built target tableImpl_O2
Scanning dependencies of target tableImpl_O3
[ 32%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O3.dir/main.cpp.o
[ 35%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O3.dir/table_particle.cpp.o
[ 38%] Linking CXX executable tableImpl_O3
[ 38%] Built target tableImpl_O3
Scanning dependencies of target tableImpl_O1
[ 41%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O1.dir/main.cpp.o
[ 44%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_O1.dir/table_particle.cpp.o
[ 47%] Linking CXX executable tableImpl_O1
[ 47%] Built target tableImpl_O1
Scanning dependencies of target tableImpl_Ofast
[ 50%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_Ofast.dir/main.cpp.o
[ 52%] Building CXX object ParticlePropagation/TableImplementation/CMakeFiles/tableImpl_Ofast.dir/table_particle.cpp.o
[ 55%] Linking CXX executable tableImpl_Ofast
[ 55%] Built target tableImpl_Ofast
Scanning dependencies of target classImpl_O1
[ 58%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O1.dir/main.cpp.o
[ 61%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O1.dir/Particle.cpp.o
[ 64%] Linking CXX executable classImpl_O1
[ 64%] Built target classImpl_O1
Scanning dependencies of target classImpl_O0
[ 67%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O0.dir/main.cpp.o
[ 70%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O0.dir/Particle.cpp.o
[ 73%] Linking CXX executable classImpl_O0
[ 73%] Built target classImpl_O0
Scanning dependencies of target classImpl_O3
[ 76%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O3.dir/main.cpp.o
[ 79%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O3.dir/Particle.cpp.o
[ 82%] Linking CXX executable classImpl_O3
[ 82%] Built target classImpl_O3
Scanning dependencies of target classImpl_Ofast
[ 85%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_Ofast.dir/main.cpp.o
[ 88%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_Ofast.dir/Particle.cpp.o
[ 91%] Linking CXX executable classImpl_Ofast
[ 91%] Built target classImpl_Ofast
Scanning dependencies of target classImpl_O2
[ 94%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O2.dir/main.cpp.o
[ 97%] Building CXX object ParticlePropagation/ClassImplementation/CMakeFiles/classImpl_O2.dir/Particle.cpp.o
[100%] Linking CXX executable classImpl_O2
[100%] Built target classImpl_O2
[  9%] Built target asterics_hpc
[ 15%] Built target classImpl_O3
Scanning dependencies of target run_classImpl_O3
[ 18%] Run classImpl_O3 program
Particle propagation with class
evaluateClassParticlePropagation : nbElement = 1000, cyclePerElement = 38.733 cy/el, elapsedTime = 38733 cy
evaluateClassParticlePropagation : nbElement = 2000, cyclePerElement = 38.588 cy/el, elapsedTime = 77176 cy
evaluateClassParticlePropagation : nbElement = 3000, cyclePerElement = 41.5933 cy/el, elapsedTime = 124780 cy
evaluateClassParticlePropagation : nbElement = 5000, cyclePerElement = 43.8132 cy/el, elapsedTime = 219066 cy
evaluateClassParticlePropagation : nbElement = 10000, cyclePerElement = 45.0812 cy/el, elapsedTime = 450812 cy
[ 18%] Built target run_classImpl_O3
[ 25%] Built target tableImpl_O1
Scanning dependencies of target run_tableImpl_O1
[ 27%] Run tableImpl_O1 program
Table Particle implementation
initTableParticle : seed = 1575964982
evaluateMoveParticle : nbElement = 1000, cyclePerElement = 44.236 cy/el, elapsedTime = 44236 cy
initTableParticle : seed = 1575964982
evaluateMoveParticle : nbElement = 2000, cyclePerElement = 43.9555 cy/el, elapsedTime = 87911 cy
initTableParticle : seed = 1575964982
evaluateMoveParticle : nbElement = 3000, cyclePerElement = 43.863 cy/el, elapsedTime = 131589 cy
initTableParticle : seed = 1575964983
evaluateMoveParticle : nbElement = 5000, cyclePerElement = 43.831 cy/el, elapsedTime = 219155 cy
initTableParticle : seed = 1575964983
evaluateMoveParticle : nbElement = 10000, cyclePerElement = 43.836 cy/el, elapsedTime = 438360 cy
[ 27%] Built target run_tableImpl_O1
[ 34%] Built target tableImpl_O0
Scanning dependencies of target run_tableImpl_O0
[ 36%] Run tableImpl_O0 program
Table Particle implementation
initTableParticle : seed = 1575964985
evaluateMoveParticle : nbElement = 1000, cyclePerElement = 151.471 cy/el, elapsedTime = 151471 cy
initTableParticle : seed = 1575964986
evaluateMoveParticle : nbElement = 2000, cyclePerElement = 151.496 cy/el, elapsedTime = 302992 cy
initTableParticle : seed = 1575964987
evaluateMoveParticle : nbElement = 3000, cyclePerElement = 151.351 cy/el, elapsedTime = 454054 cy
initTableParticle : seed = 1575964988
evaluateMoveParticle : nbElement = 5000, cyclePerElement = 151.927 cy/el, elapsedTime = 759635 cy
initTableParticle : seed = 1575964991
evaluateMoveParticle : nbElement = 10000, cyclePerElement = 152.02 cy/el, elapsedTime = 1520199 cy
[ 36%] Built target run_tableImpl_O0
[ 43%] Built target tableImpl_O2
Scanning dependencies of target run_tableImpl_O2
[ 45%] Run tableImpl_O2 program
Table Particle implementation
initTableParticle : seed = 1575964996
evaluateMoveParticle : nbElement = 1000, cyclePerElement = 29.816 cy/el, elapsedTime = 29816 cy
initTableParticle : seed = 1575964996
evaluateMoveParticle : nbElement = 2000, cyclePerElement = 28.8875 cy/el, elapsedTime = 57775 cy
initTableParticle : seed = 1575964997
evaluateMoveParticle : nbElement = 3000, cyclePerElement = 28.4767 cy/el, elapsedTime = 85430 cy
initTableParticle : seed = 1575964997
evaluateMoveParticle : nbElement = 5000, cyclePerElement = 28.487 cy/el, elapsedTime = 142435 cy
initTableParticle : seed = 1575964997
evaluateMoveParticle : nbElement = 10000, cyclePerElement = 29.0249 cy/el, elapsedTime = 290249 cy
[ 45%] Built target run_tableImpl_O2
[ 52%] Built target tableImpl_O3
Scanning dependencies of target run_tableImpl_O3
[ 54%] Run tableImpl_O3 program
Table Particle implementation
initTableParticle : seed = 1575964999
evaluateMoveParticle : nbElement = 1000, cyclePerElement = 9.516 cy/el, elapsedTime = 9516 cy
initTableParticle : seed = 1575964999
evaluateMoveParticle : nbElement = 2000, cyclePerElement = 9.583 cy/el, elapsedTime = 19166 cy
initTableParticle : seed = 1575964999
evaluateMoveParticle : nbElement = 3000, cyclePerElement = 9.78167 cy/el, elapsedTime = 29345 cy
initTableParticle : seed = 1575964999
evaluateMoveParticle : nbElement = 5000, cyclePerElement = 9.8128 cy/el, elapsedTime = 49064 cy
initTableParticle : seed = 1575964999
evaluateMoveParticle : nbElement = 10000, cyclePerElement = 10.982 cy/el, elapsedTime = 109820 cy
[ 54%] Built target run_tableImpl_O3
[ 61%] Built target tableImpl_Ofast
Scanning dependencies of target run_tableImpl_Ofast
[ 63%] Run tableImpl_Ofast program
Table Particle implementation
initTableParticle : seed = 1575965000
evaluateMoveParticle : nbElement = 1000, cyclePerElement = 11.483 cy/el, elapsedTime = 11483 cy
initTableParticle : seed = 1575965000
evaluateMoveParticle : nbElement = 2000, cyclePerElement = 11.1025 cy/el, elapsedTime = 22205 cy
initTableParticle : seed = 1575965000
evaluateMoveParticle : nbElement = 3000, cyclePerElement = 11.083 cy/el, elapsedTime = 33249 cy
initTableParticle : seed = 1575965000
evaluateMoveParticle : nbElement = 5000, cyclePerElement = 11.3234 cy/el, elapsedTime = 56617 cy
initTableParticle : seed = 1575965000
evaluateMoveParticle : nbElement = 10000, cyclePerElement = 11.8726 cy/el, elapsedTime = 118726 cy
[ 63%] Built target run_tableImpl_Ofast
[ 70%] Built target classImpl_O1
Scanning dependencies of target run_classImpl_O1
[ 72%] Run classImpl_O1 program
Particle propagation with class
evaluateClassParticlePropagation : nbElement = 1000, cyclePerElement = 40.184 cy/el, elapsedTime = 40184 cy
evaluateClassParticlePropagation : nbElement = 2000, cyclePerElement = 41.8835 cy/el, elapsedTime = 83767 cy
evaluateClassParticlePropagation : nbElement = 3000, cyclePerElement = 43.293 cy/el, elapsedTime = 129879 cy
evaluateClassParticlePropagation : nbElement = 5000, cyclePerElement = 44.5964 cy/el, elapsedTime = 222982 cy
evaluateClassParticlePropagation : nbElement = 10000, cyclePerElement = 45.7717 cy/el, elapsedTime = 457717 cy
[ 72%] Built target run_classImpl_O1
[ 79%] Built target classImpl_O0
Scanning dependencies of target run_classImpl_O0
[ 81%] Run classImpl_O0 program
Particle propagation with class
evaluateClassParticlePropagation : nbElement = 1000, cyclePerElement = 574.118 cy/el, elapsedTime = 574118 cy
evaluateClassParticlePropagation : nbElement = 2000, cyclePerElement = 574.928 cy/el, elapsedTime = 1149856 cy
evaluateClassParticlePropagation : nbElement = 3000, cyclePerElement = 574.27 cy/el, elapsedTime = 1722810 cy
evaluateClassParticlePropagation : nbElement = 5000, cyclePerElement = 574.826 cy/el, elapsedTime = 2874129 cy
evaluateClassParticlePropagation : nbElement = 10000, cyclePerElement = 574.93 cy/el, elapsedTime = 5749304 cy
[ 81%] Built target run_classImpl_O0
[ 88%] Built target classImpl_O2
Scanning dependencies of target run_classImpl_O2
[ 90%] Run classImpl_O2 program
Particle propagation with class
evaluateClassParticlePropagation : nbElement = 1000, cyclePerElement = 38.854 cy/el, elapsedTime = 38854 cy
evaluateClassParticlePropagation : nbElement = 2000, cyclePerElement = 40.3875 cy/el, elapsedTime = 80775 cy
evaluateClassParticlePropagation : nbElement = 3000, cyclePerElement = 41.5513 cy/el, elapsedTime = 124654 cy
evaluateClassParticlePropagation : nbElement = 5000, cyclePerElement = 43.9868 cy/el, elapsedTime = 219934 cy
evaluateClassParticlePropagation : nbElement = 10000, cyclePerElement = 45.1992 cy/el, elapsedTime = 451992 cy
[ 90%] Built target run_classImpl_O2
[ 97%] Built target classImpl_Ofast
Scanning dependencies of target run_classImpl_Ofast
[100%] Run classImpl_Ofast program
Particle propagation with class
evaluateClassParticlePropagation : nbElement = 1000, cyclePerElement = 39.401 cy/el, elapsedTime = 39401 cy
evaluateClassParticlePropagation : nbElement = 2000, cyclePerElement = 40.7995 cy/el, elapsedTime = 81599 cy
evaluateClassParticlePropagation : nbElement = 3000, cyclePerElement = 42.2547 cy/el, elapsedTime = 126764 cy
evaluateClassParticlePropagation : nbElement = 5000, cyclePerElement = 43.8818 cy/el, elapsedTime = 219409 cy
evaluateClassParticlePropagation : nbElement = 10000, cyclePerElement = 45.1365 cy/el, elapsedTime = 451365 cy
[100%] Built target run_classImpl_Ofast
Scanning dependencies of target run_all
[100%] Built target run_all
[  7%] Built target asterics_hpc
[ 12%] Built target classImpl_O3
[ 14%] Built target run_classImpl_O3
[ 19%] Built target classImpl_O1
[ 21%] Built target run_classImpl_O1
[ 26%] Built target classImpl_O0
[ 28%] Built target run_classImpl_O0
[ 33%] Built target classImpl_O2
[ 35%] Built target run_classImpl_O2
[ 40%] Built target classImpl_Ofast
[ 42%] Built target run_classImpl_Ofast
Scanning dependencies of target plot_classImplO0123fast
[ 43%] Call gnuplot classImplO0123fast
[ 52%] Built target plot_classImplO0123fast
[ 57%] Built target tableImpl_O1
[ 59%] Built target run_tableImpl_O1
[ 64%] Built target tableImpl_O0
[ 66%] Built target run_tableImpl_O0
[ 71%] Built target tableImpl_O2
[ 73%] Built target run_tableImpl_O2
[ 78%] Built target tableImpl_O3
[ 80%] Built target run_tableImpl_O3
[ 85%] Built target tableImpl_Ofast
[ 87%] Built target run_tableImpl_Ofast
[ 87%] Built target run_all
Scanning dependencies of target plot_tableVsClassImplO023
[ 89%] Call gnuplot tableVsClassImplO023
[ 89%] Built target plot_tableVsClassImplO023
Scanning dependencies of target plot_tableImplO0123fast
[ 91%] Call gnuplot tableImplO0123fast
[100%] Built target plot_tableImplO0123fast
Scanning dependencies of target plot_all
[100%] Built target plot_all


Ok, the compilation is done, let's see the results.