forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinpack_bench.html
337 lines (302 loc) · 9.9 KB
/
linpack_bench.html
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<html>
<head>
<title>
LINPACK_BENCH - The LINPACK Benchmark
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
LINPACK_BENCH <br> The LINPACK Benchmark
</h1>
<hr>
<p>
<b>LINPACK_BENCH</b>
is a C++ program which
carries out the LINPACK Benchmark.
</p>
<p>
The LINPACK benchmark is a test problem used to rate the performance
of a computer on a simple linear algebra problem.
</p>
<p>
The test problem requires the user to set up a random dense matrix
<b>A</b> of size <b>N</b> = 1000, and a right hand side vector <b>B</b>
which is the product of <b>A</b> and a vector <b>X</b> of all 1's.
The first task is to compute an LU factorization of <b>A</b>. The
second task is to use the LU factorization to solve the linear system
<blockquote>
<b>A</b> * <b>X</b> = <b>B</b>.
</blockquote>
</p>
<p>
The number of floating point operations required for these two
tasks is roughly
<blockquote>
ops = 2 * N*N*N / 3 + 2 * N * N,
</blockquote>
therefore, the "MegaFLOPS" rating, or millions of floating point
operations per second, can be found as
<blockquote>
mflops = ops / ( cpu * 1000000 ).
</blockquote>
</p>
<p>
On a given computer, if you run the benchmark for a sequence of increasing
values of N, the behavior of the MegaFLOPS rating will vary as you pass through
three main zones of behavior:
<ul>
<li>
a <i>rising</i> zone, as both the local cache memory and the processor
are not challenged.
</li>
<li>
a <i>flat</i> zone, where the processor is challenged, that is, it is
performing at top efficiency.
</li>
<li>
a <i>decaying</i> zone, where the local cache memory is also challenged,
that is the matrix is so large that the cache is not big enough to
keep the necessary data close enough to the processor to keep it running
at top speed.
</li>
</ul>
</p>
<p>
<table border="1">
<tr>
<th>Language</th><th>Precision</th><th>Type</th><th>Machine</th><th>Comment</t><th>MegaFLOPS</th>
</tr>
<tr>
<td>C++</td><td>Single</td><td>Real</td><td>DHCP95 (Apple G5)</td><td>g++</td><td>222</td>
</tr>
<tr>
<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<td>C++</td><td>Double</td><td>Real</td><td>DHCP95 (Apple G5)</td><td>g++</td><td>167</td>
</tr>
<tr>
<td>C++</td><td>Double</td><td>Real</td><td>chili (ALPHA)</td><td>g++</td><td>51</td>
</tr>
</table>
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>LINPACK_BENCH</b> is available in
<a href = "../../c_src/linpack_bench/linpack_bench.html">a C version</a> and
<a href = "../../cpp_src/linpack_bench/linpack_bench.html">a C++ version</a> and
<a href = "../../f77_src/linpack_bench/linpack_bench.html">a FORTRAN77 version</a> and
<a href = "../../f_src/linpack_bench/linpack_bench.html">a FORTRAN90 version</a> and
<a href = "../../j_src/linpack_bench/linpack_bench.html">a JAVA version</a> and
<a href = "../../m_src/linpack_bench/linpack_bench.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/linpack_d/linpack_d.html">
LINPACK_D</a>,
a C++ library which
solves linear systems using double precision real arithmetic;
</p>
<p>
<a href = "../../f_src/matmul/matmul.html">
MATMUL</a>,
a FORTRAN90 program which
is an interactive matrix multiplication benchmark program.
</p>
<p>
<a href = "../../f77_src/mdbnch/mdbnch.html">
MDBNCH</a>,
a FORTRAN77 program which
is a benchmark code for a molecular dynamics calculation.
</p>
<p>
<a href = "../../cpp_src/memory_test/memory_test.html">
MEMORY_TEST</a>,
a C++ program which
declares and uses a sequence of larger
and larger vectors, to see how big a vector can be used on a given
machine and compiler.
</p>
<p>
<a href = "../../cpp_src/mxm/mxm.html">
MXM</a>,
a C++ program which
sets up a matrix multiplication problem A=B*C of arbitrary size,
and compares the time required for IJK, IKJ, JIK, JKI, KIJ and KJI orderings
of the loops.
</p>
<p>
<a href = "../../cpp_src/sum_million/sum_million.html">
SUM_MILLION</a>,
a C++ program which
sums the integers from 1 to 1,000,000, as a demonstration of how
to rate a computer's speed;
</p>
<p>
<a href = "../../cpp_src/timer/timer.html">
TIMER</a>,
a C++ library which
demonstrates how to measure CPU time or elapsed time.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
<a href = "http://www.netlib.org/benchmark/1000s">
http://www.netlib.org/benchmark/1000s</a>
the LINPACK benchmark website (single precision).
</li>
<li>
<a href = "http://www.netlib.org/benchmark/1000d">
http://www.netlib.org/benchmark/1000d</a>
the LINPACK benchmark website (double precision).
</li>
<li>
Jack Dongarra,<br>
Performance of Various Computers Using Standard Linear Equations Software,
Technical Report CS-89-85,<br>
Electrical Engineering and Computer Science Department,<br>
University of Tennessee, 2008.
</li>
<li>
Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,<br>
LINPACK User's Guide,<br>
SIAM, 1979,<br>
ISBN13: 978-0-898711-72-1,<br>
LC: QA214.L56.
</li>
<li>
George Fishman,<br>
Multiplicative congruential random number generators with modulus
2**b: an exhaustive analysis for b = 32 and a partial analysis for b = 48,<br>
Mathematics of Computation,<br>
Volume 189, 1990, pages 331-344.
</li>
<li>
Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh,<br>
Algorithm 539:
Basic Linear Algebra Subprograms for Fortran Usage,<br>
ACM Transactions on Mathematical Software,<br>
Volume 5, Number 3, September 1979, pages 308-323.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<b>LINPACK_BENCH_S</b> is the single precision version of the program.
<ul>
<li>
<a href = "linpack_bench_s.cpp">linpack_bench_s.cpp</a>,
the source code.
</li>
<li>
<a href = "linpack_bench_s.sh">linpack_bench_s.sh</a>,
commands to compile and load the source code.
</li>
<li>
<a href = "linpack_bench_s_dhcp95_output.txt">
linpack_bench_s_dhcp95_output.txt</a>,
the output from an Apple Power5 named "dhcp95".
</li>
</ul>
</p>
<p>
<b>LINPACK_BENCH_D</b> is the double precision version of the program.
<ul>
<li>
<a href = "linpack_bench_d.cpp">linpack_bench_d.cpp</a>,
the source code.
</li>
<li>
<a href = "linpack_bench_d.sh">linpack_bench_d.sh</a>,
commands to compile and load the source code.
</li>
<li>
<a href = "linpack_bench_d_chili_output.txt">
linpack_bench_d_chili_output.txt</a>,
the output from an ALPHA named "chili".
</li>
<li>
<a href = "linpack_bench_d_dhcp95_output.txt">
linpack_bench_d_dhcp95_output.txt</a>,
the output from an Apple Power5 named "dhcp95".
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
Here are the routines for the double precision version of the program:
<ul>
<li>
<b>MAIN</b> is the main program for LINPACK_BENCH_D.
</li>
<li>
<b>CPU_TIME</b> returns the current reading on the CPU clock.
</li>
<li>
<b>DAXPY</b> computes constant times a vector plus a vector.
</li>
<li>
<b>DDOT</b> forms the dot product of two vectors.
</li>
<li>
<b>DGEFA</b> factors a real general matrix.
</li>
<li>
<b>DGESL</b> solves a real general linear system A * X = B.
</li>
<li>
<b>DSCAL</b> scales a vector by a constant.
</li>
<li>
<b>IDAMAX</b> finds the index of the vector element of maximum absolute value.
</li>
<li>
<b>R8_ABS</b> returns the absolute value of an R8.
</li>
<li>
<b>R8_EPSILON</b> returns the R8 round off unit.
</li>
<li>
<b>R8_MAX</b> returns the maximum of two R8's.
</li>
<li>
<b>R8_RANDOM</b> returns a uniformly distributed random number between 0 and 1.
</li>
<li>
<b>R8MAT_GEN</b> generates a random R8MAT..
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 07 March 2008.
</i>
<!-- John Burkardt -->
</body>
</html>