Gentoo Archives: gentoo-commits

From: Andrea Arteaga <andyspiros@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/auto-numerical-bench:master commit in: app-benchmarks/autobench/files/python/btl/libs/BLAS/, ...
Date: Tue, 05 Jul 2011 22:38:21
Message-Id: f3e79601c542eac23afe8fbae826381d60b8aa3d.spiros@gentoo
1 commit: f3e79601c542eac23afe8fbae826381d60b8aa3d
2 Author: spiros <andyspiros <AT> gmail <DOT> com>
3 AuthorDate: Tue Jul 5 22:37:42 2011 +0000
4 Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
5 CommitDate: Tue Jul 5 22:37:42 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=f3e79601
7
8 Added support for FFTW. Some work on btl and reports. Example input
9 files updated.
10
11 ---
12 .../autobench/files/python/basemodule.py | 5 +-
13 app-benchmarks/autobench/files/python/blastests.in | 7 +-
14 .../actions/action_fftw_1d_backward_estimate.hh | 94 ++++++++++++++++++++
15 .../btl/actions/action_fftw_1d_backward_measure.hh | 94 ++++++++++++++++++++
16 .../btl/actions/action_fftw_1d_forward_estimate.hh | 94 ++++++++++++++++++++
17 .../btl/actions/action_fftw_1d_forward_measure.hh | 94 ++++++++++++++++++++
18 .../files/python/btl/actions/fftw_actions.hh | 9 ++
19 .../files/python/btl/libs/BLAS/c_interface_base.h | 1 -
20 .../files/python/btl/libs/FFTW/fftw_interface.hh | 62 +++++++++++++
21 .../autobench/files/python/btl/libs/FFTW/main.cpp | 45 +++++++++
22 app-benchmarks/autobench/files/python/btlbase.py | 3 +-
23 .../autobench/files/python/cblastests.in | 6 +-
24 app-benchmarks/autobench/files/python/fftw.py | 57 ++++++++++++
25 .../autobench/files/python/htmlreport.py | 3 +-
26 .../autobench/files/python/lapacktests.in | 5 +-
27 15 files changed, 569 insertions(+), 10 deletions(-)
28
29 diff --git a/app-benchmarks/autobench/files/python/basemodule.py b/app-benchmarks/autobench/files/python/basemodule.py
30 index e405032..b7ea426 100644
31 --- a/app-benchmarks/autobench/files/python/basemodule.py
32 +++ b/app-benchmarks/autobench/files/python/basemodule.py
33 @@ -40,7 +40,6 @@ class BaseModule:
34 self._parse_args(passargs)
35
36 # Alternatives-2 version
37 -
38 def get_impls(self, root):
39 output = sp.Popen(
40 ['eselect', '--no-color', '--brief', self.libname, 'list'],
41 @@ -101,6 +100,8 @@ class BaseModule:
42 x,y = np.loadtxt(newresults[test][impl], unpack=True)
43 plotf(x,y, label=impl, hold=True)
44 plt.legend(loc='best')
45 + plt.xlabel('size')
46 + plt.ylabel('MFlops')
47 plt.grid(True)
48 fname = pjoin(cfg.reportdir, 'summary.png')
49 plt.savefig(fname, format='png')
50 @@ -115,6 +116,8 @@ class BaseModule:
51 x,y = np.loadtxt(newresults[test][impl], unpack=True)
52 plotf(x,y, label=impl, hold=True)
53 plt.legend(loc='best')
54 + plt.xlabel('size')
55 + plt.ylabel('MFlops')
56 plt.grid(True)
57 fname = pjoin(cfg.reportdir, test+".png")
58 plt.savefig(fname, format='png')
59
60 diff --git a/app-benchmarks/autobench/files/python/blastests.in b/app-benchmarks/autobench/files/python/blastests.in
61 index 3b80df7..1ebea85 100644
62 --- a/app-benchmarks/autobench/files/python/blastests.in
63 +++ b/app-benchmarks/autobench/files/python/blastests.in
64 @@ -1,2 +1,5 @@
65 -eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O2 -march=native'
66 -eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O3 -march=native'
67 +#blas-reference sci-libs/blas-reference-3.3.1-r1 FFLAGS=-O3
68 +acml sci-libs/acml-4.4.0-r1
69 +#goto sci-libs/gotoblas2-1.13 CFLAGS=-O3 USE='incblas'
70 +#atlas sci-libs/atlas-3.8.4 CFLAGS=-O3 FFLAGS=-O3
71 +#openblas sci-libs/openblas CFLAGS=-O3 USE=incblas
72
73 diff --git a/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_backward_estimate.hh b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_backward_estimate.hh
74 new file mode 100644
75 index 0000000..eda5468
76 --- /dev/null
77 +++ b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_backward_estimate.hh
78 @@ -0,0 +1,94 @@
79 +#ifndef ACTION_FFTW_1D_BACKWARD_ESTIMATE
80 +#define ACTION_FFTW_1D_BACKWARD_ESTIMATE
81 +#include "utilities.h"
82 +#include "STL_interface.hh"
83 +#include <string>
84 +#include <cmath>
85 +#include "init/init_function.hh"
86 +#include "init/init_vector.hh"
87 +
88 +using namespace std;
89 +
90 +template<class Interface>
91 +class Action_FFTW_1D_Backward_Estimate {
92 +
93 +public :
94 +
95 + // Ctor
96 +
97 + Action_FFTW_1D_Backward_Estimate( int size ):_size(size)
98 + {
99 + MESSAGE("Action_FFTW_1D_Backward_Estimate Ctor");
100 +
101 + // STL vector initialization
102 +
103 + init_vector<pseudo_random>(X_stl,_size);
104 + init_vector<null_function>(Y_stl,_size);
105 +
106 + // generic matrix and vector initialization
107 +
108 + Interface::vector_from_stl(X,X_stl);
109 + Interface::vector_from_stl(Y,Y_stl);
110 +
111 + Interface::fftw_init_plan(p,_size, X, Y, FFTW_FORWARD, FFTW_MEASURE);
112 +
113 + }
114 +
115 + // invalidate copy ctor
116 +
117 + Action_FFTW_1D_Backward_Estimate( const Action_FFTW_1D_Backward_Estimate & )
118 + {
119 + INFOS("illegal call to Action_FFTW_1D_Backward_Estimate Copy Ctor");
120 + exit(1);
121 + }
122 +
123 + // Dtor
124 +
125 + ~Action_FFTW_1D_Backward_Estimate( void ){
126 +
127 + MESSAGE("Action_FFTW_1D_Backward_Estimate Dtor");
128 +
129 + // deallocation
130 +
131 + Interface::free_vector(X);
132 + Interface::free_vector(Y);
133 + }
134 +
135 + // action name
136 +
137 + static inline std::string name( void )
138 + {
139 + return "FFTW_1D_Backward_Estimate_"+Interface::name();
140 + }
141 +
142 + double nb_op_base( void ){
143 + const static double log_2 = log(2.);
144 + return _size * log(_size)/log_2;
145 + }
146 +
147 + inline void initialize( void ){
148 + }
149 +
150 + inline void calculate( void ) {
151 + BTL_ASM_COMMENT("mybegin FFTW_1D_Backward_Estimate");
152 + Interface::fftw_run(p);
153 + BTL_ASM_COMMENT("myend FFTW_1D_Backward_Estimate");
154 + }
155 +
156 + void check_result( void ){
157 + }
158 +
159 +private :
160 +
161 + typename Interface::stl_vector X_stl;
162 + typename Interface::stl_vector Y_stl;
163 +
164 + typename Interface::gene_vector X;
165 + typename Interface::gene_vector Y;
166 +
167 + typename Interface::plan p;
168 +
169 + int _size;
170 +};
171 +
172 +#endif // ACTION_FFTW_1D_BACKWARD_ESTIMATE
173
174 diff --git a/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_backward_measure.hh b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_backward_measure.hh
175 new file mode 100644
176 index 0000000..e204423
177 --- /dev/null
178 +++ b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_backward_measure.hh
179 @@ -0,0 +1,94 @@
180 +#ifndef ACTION_FFTW_1D_BACKWARD_MEASURE
181 +#define ACTION_FFTW_1D_BACKWARD_MEASURE
182 +#include "utilities.h"
183 +#include "STL_interface.hh"
184 +#include <string>
185 +#include <cmath>
186 +#include "init/init_function.hh"
187 +#include "init/init_vector.hh"
188 +
189 +using namespace std;
190 +
191 +template<class Interface>
192 +class Action_FFTW_1D_Backward_Measure {
193 +
194 +public :
195 +
196 + // Ctor
197 +
198 + Action_FFTW_1D_Backward_Measure( int size ):_size(size)
199 + {
200 + MESSAGE("Action_FFTW_1D_Backward_Measure Ctor");
201 +
202 + // STL vector initialization
203 +
204 + init_vector<pseudo_random>(X_stl,_size);
205 + init_vector<null_function>(Y_stl,_size);
206 +
207 + // generic matrix and vector initialization
208 +
209 + Interface::vector_from_stl(X,X_stl);
210 + Interface::vector_from_stl(Y,Y_stl);
211 +
212 + Interface::fftw_init_plan(p,_size, X, Y, FFTW_FORWARD, FFTW_MEASURE);
213 +
214 + }
215 +
216 + // invalidate copy ctor
217 +
218 + Action_FFTW_1D_Backward_Measure( const Action_FFTW_1D_Backward_Measure & )
219 + {
220 + INFOS("illegal call to Action_FFTW_1D_Backward_Measure Copy Ctor");
221 + exit(1);
222 + }
223 +
224 + // Dtor
225 +
226 + ~Action_FFTW_1D_Backward_Measure( void ){
227 +
228 + MESSAGE("Action_FFTW_1D_Backward_Measure Dtor");
229 +
230 + // deallocation
231 +
232 + Interface::free_vector(X);
233 + Interface::free_vector(Y);
234 + }
235 +
236 + // action name
237 +
238 + static inline std::string name( void )
239 + {
240 + return "FFTW_1D_Backward_Measure_"+Interface::name();
241 + }
242 +
243 + double nb_op_base( void ){
244 + const static double log_2 = log(2.);
245 + return _size * log(_size)/log_2;
246 + }
247 +
248 + inline void initialize( void ){
249 + }
250 +
251 + inline void calculate( void ) {
252 + BTL_ASM_COMMENT("mybegin FFTW_1D_Backward_Measure");
253 + Interface::fftw_run(p);
254 + BTL_ASM_COMMENT("myend FFTW_1D_Backward_Measure");
255 + }
256 +
257 + void check_result( void ){
258 + }
259 +
260 +private :
261 +
262 + typename Interface::stl_vector X_stl;
263 + typename Interface::stl_vector Y_stl;
264 +
265 + typename Interface::gene_vector X;
266 + typename Interface::gene_vector Y;
267 +
268 + typename Interface::plan p;
269 +
270 + int _size;
271 +};
272 +
273 +#endif // ACTION_FFTW_1D_BACKWARD_MEASURE
274
275 diff --git a/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_forward_estimate.hh b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_forward_estimate.hh
276 new file mode 100644
277 index 0000000..efd8743
278 --- /dev/null
279 +++ b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_forward_estimate.hh
280 @@ -0,0 +1,94 @@
281 +#ifndef ACTION_FFTW_1D_FORWARD_ESTIMATE
282 +#define ACTION_FFTW_1D_FORWARD_ESTIMATE
283 +#include "utilities.h"
284 +#include "STL_interface.hh"
285 +#include <string>
286 +#include <cmath>
287 +#include "init/init_function.hh"
288 +#include "init/init_vector.hh"
289 +
290 +using namespace std;
291 +
292 +template<class Interface>
293 +class Action_FFTW_1D_Forward_Estimate {
294 +
295 +public :
296 +
297 + // Ctor
298 +
299 + Action_FFTW_1D_Forward_Estimate( int size ):_size(size)
300 + {
301 + MESSAGE("Action_FFTW_1D_Forward_Estimate Ctor");
302 +
303 + // STL vector initialization
304 +
305 + init_vector<pseudo_random>(X_stl,_size);
306 + init_vector<null_function>(Y_stl,_size);
307 +
308 + // generic matrix and vector initialization
309 +
310 + Interface::vector_from_stl(X,X_stl);
311 + Interface::vector_from_stl(Y,Y_stl);
312 +
313 + Interface::fftw_init_plan(p,_size, X, Y, FFTW_FORWARD, FFTW_MEASURE);
314 +
315 + }
316 +
317 + // invalidate copy ctor
318 +
319 + Action_FFTW_1D_Forward_Estimate( const Action_FFTW_1D_Forward_Estimate & )
320 + {
321 + INFOS("illegal call to Action_FFTW_1D_Forward_Estimate Copy Ctor");
322 + exit(1);
323 + }
324 +
325 + // Dtor
326 +
327 + ~Action_FFTW_1D_Forward_Estimate( void ){
328 +
329 + MESSAGE("Action_FFTW_1D_Forward_Estimate Dtor");
330 +
331 + // deallocation
332 +
333 + Interface::free_vector(X);
334 + Interface::free_vector(Y);
335 + }
336 +
337 + // action name
338 +
339 + static inline std::string name( void )
340 + {
341 + return "FFTW_1D_Forward_Estimate_"+Interface::name();
342 + }
343 +
344 + double nb_op_base( void ){
345 + const static double log_2 = log(2.);
346 + return _size * log(_size)/log_2;
347 + }
348 +
349 + inline void initialize( void ){
350 + }
351 +
352 + inline void calculate( void ) {
353 + BTL_ASM_COMMENT("mybegin FFTW_1D_Forward_Estimate");
354 + Interface::fftw_run(p);
355 + BTL_ASM_COMMENT("myend FFTW_1D_Forward_Estimate");
356 + }
357 +
358 + void check_result( void ){
359 + }
360 +
361 +private :
362 +
363 + typename Interface::stl_vector X_stl;
364 + typename Interface::stl_vector Y_stl;
365 +
366 + typename Interface::gene_vector X;
367 + typename Interface::gene_vector Y;
368 +
369 + typename Interface::plan p;
370 +
371 + int _size;
372 +};
373 +
374 +#endif // ACTION_FFTW_1D_FORWARD_ESTIMATE
375
376 diff --git a/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_forward_measure.hh b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_forward_measure.hh
377 new file mode 100644
378 index 0000000..2697230
379 --- /dev/null
380 +++ b/app-benchmarks/autobench/files/python/btl/actions/action_fftw_1d_forward_measure.hh
381 @@ -0,0 +1,94 @@
382 +#ifndef ACTION_FFTW_1D_FORWARD_MEASURE
383 +#define ACTION_FFTW_1D_FORWARD_MEASURE
384 +#include "utilities.h"
385 +#include "STL_interface.hh"
386 +#include <string>
387 +#include <cmath>
388 +#include "init/init_function.hh"
389 +#include "init/init_vector.hh"
390 +
391 +using namespace std;
392 +
393 +template<class Interface>
394 +class Action_FFTW_1D_Forward_Measure {
395 +
396 +public :
397 +
398 + // Ctor
399 +
400 + Action_FFTW_1D_Forward_Measure( int size ):_size(size)
401 + {
402 + MESSAGE("Action_FFTW_1D_Forward_Measure Ctor");
403 +
404 + // STL vector initialization
405 +
406 + init_vector<pseudo_random>(X_stl,_size);
407 + init_vector<null_function>(Y_stl,_size);
408 +
409 + // generic matrix and vector initialization
410 +
411 + Interface::vector_from_stl(X,X_stl);
412 + Interface::vector_from_stl(Y,Y_stl);
413 +
414 + Interface::fftw_init_plan(p,_size, X, Y, FFTW_FORWARD, FFTW_MEASURE);
415 +
416 + }
417 +
418 + // invalidate copy ctor
419 +
420 + Action_FFTW_1D_Forward_Measure( const Action_FFTW_1D_Forward_Measure & )
421 + {
422 + INFOS("illegal call to Action_FFTW_1D_Forward_Measure Copy Ctor");
423 + exit(1);
424 + }
425 +
426 + // Dtor
427 +
428 + ~Action_FFTW_1D_Forward_Measure( void ){
429 +
430 + MESSAGE("Action_FFTW_1D_Forward_Measure Dtor");
431 +
432 + // deallocation
433 +
434 + Interface::free_vector(X);
435 + Interface::free_vector(Y);
436 + }
437 +
438 + // action name
439 +
440 + static inline std::string name( void )
441 + {
442 + return "FFTW_1D_Forward_Measure_"+Interface::name();
443 + }
444 +
445 + double nb_op_base( void ){
446 + const static double log_2 = log(2.);
447 + return _size * log(_size)/log_2;
448 + }
449 +
450 + inline void initialize( void ){
451 + }
452 +
453 + inline void calculate( void ) {
454 + BTL_ASM_COMMENT("mybegin FFTW_1D_Forward_Measure");
455 + Interface::fftw_run(p);
456 + BTL_ASM_COMMENT("myend FFTW_1D_Forward_Measure");
457 + }
458 +
459 + void check_result( void ){
460 + }
461 +
462 +private :
463 +
464 + typename Interface::stl_vector X_stl;
465 + typename Interface::stl_vector Y_stl;
466 +
467 + typename Interface::gene_vector X;
468 + typename Interface::gene_vector Y;
469 +
470 + typename Interface::plan p;
471 +
472 + int _size;
473 +};
474 +
475 +#endif // ACTION_FFTW_1D_FORWARD_MEASURE
476
477 diff --git a/app-benchmarks/autobench/files/python/btl/actions/fftw_actions.hh b/app-benchmarks/autobench/files/python/btl/actions/fftw_actions.hh
478 new file mode 100644
479 index 0000000..3aced22
480 --- /dev/null
481 +++ b/app-benchmarks/autobench/files/python/btl/actions/fftw_actions.hh
482 @@ -0,0 +1,9 @@
483 +#ifndef ACTION_FFTW
484 +#define ACTION_FFTW
485 +
486 +#include "action_fftw_1d_forward_measure.hh"
487 +#include "action_fftw_1d_forward_estimate.hh"
488 +#include "action_fftw_1d_backward_measure.hh"
489 +#include "action_fftw_1d_backward_estimate.hh"
490 +
491 +#endif // ACTION_FFTW
492
493 diff --git a/app-benchmarks/autobench/files/python/btl/libs/BLAS/c_interface_base.h b/app-benchmarks/autobench/files/python/btl/libs/BLAS/c_interface_base.h
494 index 515d8dc..7646b1a 100644
495 --- a/app-benchmarks/autobench/files/python/btl/libs/BLAS/c_interface_base.h
496 +++ b/app-benchmarks/autobench/files/python/btl/libs/BLAS/c_interface_base.h
497 @@ -1,4 +1,3 @@
498 -
499 #ifndef BTL_C_INTERFACE_BASE_H
500 #define BTL_C_INTERFACE_BASE_H
501
502
503 diff --git a/app-benchmarks/autobench/files/python/btl/libs/FFTW/fftw_interface.hh b/app-benchmarks/autobench/files/python/btl/libs/FFTW/fftw_interface.hh
504 new file mode 100644
505 index 0000000..db62519
506 --- /dev/null
507 +++ b/app-benchmarks/autobench/files/python/btl/libs/FFTW/fftw_interface.hh
508 @@ -0,0 +1,62 @@
509 +#ifndef BTL_FFTW_INTERFACE_H
510 +#define BTL_FFTW_INTERFACE_H
511 +
512 +#include <complex>
513 +#include <fftw3.h>
514 +#include <vector>
515 +
516 +class fftw_interface
517 +{
518 +public:
519 +
520 + static inline std::string name()
521 + {
522 + return std::string("fftw");
523 + }
524 +
525 + typedef std::complex<double> real_type;
526 + typedef std::vector<std::complex<double> > stl_vector;
527 +
528 + typedef fftw_complex* gene_vector;
529 +
530 + typedef fftw_plan plan;
531 +
532 + static inline void free_vector(gene_vector & B){
533 + fftw_free(B);
534 + }
535 +
536 + static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){
537 + int N = B_stl.size();
538 + B = (gene_vector) fftw_malloc(sizeof(fftw_complex) * N);
539 + std::complex<double>* B_cplx = reinterpret_cast<std::complex<double>* >(B);
540 +
541 + for (int i=0;i<N;i++)
542 + B_cplx[i] = B_stl[i];
543 + }
544 +
545 + static inline void vector_to_stl(gene_vector & B, stl_vector & B_stl){
546 + int N = B_stl.size();
547 + std::complex<double>* B_cplx = reinterpret_cast<std::complex<double>* >(B);
548 + for (int i=0;i<N;i++)
549 + B_stl[i] = B_cplx[i];
550 + }
551 +
552 + static inline void copy_vector(const gene_vector & source, gene_vector & cible, int N){
553 + for (int i=0;i<N;i++) {
554 + cible[i][0]=source[i][0];
555 + cible[i][1]=source[i][1];
556 + }
557 + }
558 +
559 + /* Begin FFTW operations */
560 +
561 + static inline void fftw_init_plan(plan & p, const int & N, gene_vector & x, gene_vector & y, const int & sign, const int & flags){
562 + p = fftw_plan_dft_1d(N, x, y, sign, flags);
563 + }
564 +
565 + static inline void fftw_run(plan & p){
566 + fftw_execute(p);
567 + }
568 +};
569 +
570 +#endif // BTL_FFTW_INTERFACE_H
571
572 diff --git a/app-benchmarks/autobench/files/python/btl/libs/FFTW/main.cpp b/app-benchmarks/autobench/files/python/btl/libs/FFTW/main.cpp
573 new file mode 100644
574 index 0000000..8f667d1
575 --- /dev/null
576 +++ b/app-benchmarks/autobench/files/python/btl/libs/FFTW/main.cpp
577 @@ -0,0 +1,45 @@
578 +#include "utilities.h"
579 +#include "bench.hh"
580 +#include "fftw_interface.hh"
581 +#include "fftw_actions.hh"
582 +
583 +#include <string>
584 +
585 +BTL_MAIN;
586 +
587 +int main(int argv, char **argc)
588 +{
589 + bool
590 + fftw_1d_forward_measure = false,
591 + fftw_1d_forward_estimate = false,
592 + fftw_1d_backward_measure = false,
593 + fftw_1d_backward_estimate = false
594 + ;
595 +
596 +
597 + for (int i = 1; i < argv; ++i) {
598 + std::string arg = argc[i];
599 + if (arg == "fftw_1d_forward_measure" || arg == "all") fftw_1d_forward_measure = true;
600 + if (arg == "fftw_1d_forward_estimate" || arg == "all") fftw_1d_forward_estimate = true;
601 + if (arg == "fftw_1d_backward_measure" || arg == "all") fftw_1d_backward_measure = true;
602 + if (arg == "fftw_1d_backward_estimate" || arg == "all") fftw_1d_backward_estimate = true;
603 + }
604 +
605 +
606 + if (fftw_1d_forward_measure)
607 + bench<Action_FFTW_1D_Forward_Measure<fftw_interface> >(MIN_MV,MAX_MV,NB_POINT);
608 +
609 + if (fftw_1d_forward_estimate)
610 + bench<Action_FFTW_1D_Forward_Estimate<fftw_interface> >(MIN_MV,MAX_MV,NB_POINT);
611 +
612 + if (fftw_1d_backward_measure)
613 + bench<Action_FFTW_1D_Backward_Measure<fftw_interface> >(MIN_MV,MAX_MV,NB_POINT);
614 +
615 + if (fftw_1d_backward_estimate)
616 + bench<Action_FFTW_1D_Backward_Estimate<fftw_interface> >(MIN_MV,MAX_MV,NB_POINT);
617 +
618 +
619 + return 0;
620 +}
621 +
622 +
623
624 diff --git a/app-benchmarks/autobench/files/python/btlbase.py b/app-benchmarks/autobench/files/python/btlbase.py
625 index 1bcc529..fc99fe2 100644
626 --- a/app-benchmarks/autobench/files/python/btlbase.py
627 +++ b/app-benchmarks/autobench/files/python/btlbase.py
628 @@ -41,6 +41,7 @@ class BTLTest(basemodule.BaseTest):
629
630 # Defines
631 defines = ['NDEBUG'] + self._btl_defines()
632 + defines = self._btl_defines()
633
634 # Flags
635 flags = []
636 @@ -103,7 +104,7 @@ class BTLTest(basemodule.BaseTest):
637
638 # Open pipe
639 logfile = file(pjoin(self.logdir, 'btlrun.log'), 'w')
640 - args = [exe] + self.tests
641 + args = [exe] + list(self.tests)
642 logfile.write(' '.join([n+'='+v for n,v in self.runenv.items()]) + ' ')
643 logfile.write(' '.join(args) + '\n')
644 logfile.write(80*'-' + '\n')
645
646 diff --git a/app-benchmarks/autobench/files/python/cblastests.in b/app-benchmarks/autobench/files/python/cblastests.in
647 index c1b41ea..b96a6f5 100644
648 --- a/app-benchmarks/autobench/files/python/cblastests.in
649 +++ b/app-benchmarks/autobench/files/python/cblastests.in
650 @@ -1,2 +1,4 @@
651 -gsl-gcc gsl-1.15-r1 CC=gcc CFLAGS=-O2
652 -gsl-icc gsl-1.15-r1 CC=gcc CFLAGS=-O3
653 +cblas-reference sci-libs/cblas-reference-20110218 CFLAGS=-O3
654 +gsl gsl-1.15-r1 CC=gcc CFLAGS=-O3
655 +goto sci-libs/gotoblas2-1.13 CFLAGS=-O3 USE='incblas'
656 +openblas sci-libs/openblas CFLAGS=-O3 USE=incblas
657
658 diff --git a/app-benchmarks/autobench/files/python/fftw.py b/app-benchmarks/autobench/files/python/fftw.py
659 new file mode 100644
660 index 0000000..d589509
661 --- /dev/null
662 +++ b/app-benchmarks/autobench/files/python/fftw.py
663 @@ -0,0 +1,57 @@
664 +import os, btlbase
665 +
666 +class Module(btlbase.BTLBase):
667 + def _initialize(self):
668 + self.libname = "fftw"
669 + self.avail = (
670 + "FFTW_1D_Forward_Measure", "FFTW_1D_Forward_Estimate",
671 + "FFTW_1D_Backward_Measure", "FFTW_1D_Backward_Estimate"
672 + )
673 +
674 + def _parse_args(self, args):
675 + # Parse arguments
676 + tests = []
677 + for i in args:
678 + if i in self.avail:
679 + tests.append(i)
680 + continue
681 + raise Exception("Argument not recognized: " + i)
682 +
683 + # Sort tests
684 + self.tests = [i for i in self.avail if i in tests]
685 +
686 + # If no test is specified, run everything
687 + if len(self.tests) == 0:
688 + self.tests = self.avail
689 +
690 + btlbase.BTLBase._parse_args(self, args)
691 +
692 + @staticmethod
693 + def get_impls(root):
694 + return ['fftw', 'fftw_threads']
695 +
696 + @staticmethod
697 + def _testClass():
698 + return FFTWTest
699 +
700 +
701 +
702 +class FFTWTest(btlbase.BTLTest):
703 +
704 + def _get_flags(self):
705 + if self.impl == 'fftw':
706 + return ['-lfftw3', '-lm', '-g3']
707 + elif self.impl == 'fftw_threads':
708 + return ['-lfftw3_threads', '-lm']
709 +
710 + @staticmethod
711 + def _btl_source():
712 + return "libs/FFTW/main.cpp"
713 +
714 + @staticmethod
715 + def _btl_includes():
716 + return ["libs/FFTW"]
717 +
718 + @staticmethod
719 + def _btl_defines():
720 + return []
721 \ No newline at end of file
722
723 diff --git a/app-benchmarks/autobench/files/python/htmlreport.py b/app-benchmarks/autobench/files/python/htmlreport.py
724 index 8241bdc..cb51da2 100644
725 --- a/app-benchmarks/autobench/files/python/htmlreport.py
726 +++ b/app-benchmarks/autobench/files/python/htmlreport.py
727 @@ -42,10 +42,11 @@ h1, h2, .plot, .descr, .date {
728 if descr.strip() != '':
729 self.content += '<p class="descr">' + descr + '</p>'
730 self.content += '<div class="plot">'
731 + self.content += '<a href="' + image + '">'
732 self.content += '<img src="' + image + '" alt="' + alt + '"'
733 if width is not None:
734 self.content += ' style="width:' + str(width) + '"'
735 - self.content += ' />'
736 + self.content += ' /></a>'
737 self.content += '</div>'
738 self.content += '</div>'
739
740
741 diff --git a/app-benchmarks/autobench/files/python/lapacktests.in b/app-benchmarks/autobench/files/python/lapacktests.in
742 index 1dfcfb6..24c6f71 100644
743 --- a/app-benchmarks/autobench/files/python/lapacktests.in
744 +++ b/app-benchmarks/autobench/files/python/lapacktests.in
745 @@ -1,2 +1,3 @@
746 -reference-O2 sci-libs/lapack-reference-3.3.1-r1 FFLAGS=-O2
747 -reference-O3 sci-libs/lapack-reference-3.3.1-r1 FFLAGS=-O3
748 +#lapack-reference sci-libs/lapack-reference-3.3.1-r1 FFLAGS=-O3 CFLAGS=-O3
749 +atlas sci-libs/atlas-3.8.4 CFLAGS=-O3 FFLAGS=-O3
750 +acml sci-libs/acml-4.4.0-r1