public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/auto-numerical-bench:unstable commit in: /
@ 2011-08-05 17:23 Andrea Arteaga
  0 siblings, 0 replies; 7+ messages in thread
From: Andrea Arteaga @ 2011-08-05 17:23 UTC (permalink / raw
  To: gentoo-commits

commit:     c103439560e69536ed281066867672b92b4e5949
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Aug  5 17:22:58 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Aug  5 17:22:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=c1034395

Implemented METIS tests (pmetis, kmetis).

---
 metis.py     |  162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 testdescr.py |   10 +++-
 2 files changed, 170 insertions(+), 2 deletions(-)

diff --git a/metis.py b/metis.py
new file mode 100644
index 0000000..c65d8a8
--- /dev/null
+++ b/metis.py
@@ -0,0 +1,162 @@
+import os, shlex, numpy as np, subprocess as sp
+from os.path import realpath, exists as pexists, join as pjoin
+from random import randint
+
+import basemodule
+import benchconfig as cfg
+from benchutils import mkdir
+from benchprint import Print
+
+inputsdir = pjoin(cfg.testsdir, 'metis-input')
+mkdir(inputsdir)
+
+avail_graph = ['pmetis-8', 'kmetis-8', 'pmetis-64', 'kmetis-64']
+avail_mesh = []
+avail_matrix = []
+
+class Module(basemodule.BaseModule):
+    
+    #classmethod
+    def _initialize(cls):
+        cls.avail = avail_graph + avail_mesh + avail_matrix
+    
+    def _parse_args(self, args):
+        tests = []
+        
+        # Parse arguments
+        for i in args:
+            if i in self.avail:
+                tests.append(i)
+            else:
+                raise Exception("Argument not recognized: " + i)
+                
+        if len(tests) == 0:
+            # If not test provided, perform all
+            self.tests = self.avail
+        else:
+            # Sort tests
+            self.tests = [i for i in self.avail if i in tests]
+    
+    @staticmethod
+    def get_impls(*args, **kwargs):
+        return ('metis',)
+    
+    def save_results(self, results):
+        basemodule.BaseModule.save_results(self, results, 'loglog', 'Seconds')
+    
+    def getTest(self, root, impl, testdir, logdir):
+        t = MetisTest(root, testdir, logdir, self.tests)
+        return t
+    
+
+class MetisTest:
+    sizes = None
+    
+    def __init__(self, root, testdir, logdir, tests):
+        self.root = root
+        self.testdir = testdir
+        self.logdir = logdir
+        self.tests = tests
+        mkdir(logdir)
+        mkdir(testdir)
+        
+    @classmethod
+    def _getSizes(cls):
+        if cls.sizes is None:
+            cls.sizes = [int(i) for i in np.logspace(3, 6, 100)]
+        return cls.sizes
+    
+    def _generateFiles(self):
+        Print("Generating input files...")
+        # Graph
+        if len([i for i in self.tests if i in avail_graph]) != 0:
+            for size in self._getSizes():
+                fname = pjoin(inputsdir, 'input_%i.graph' % size)
+                if not pexists(fname):
+                    writeGraph(size, fname)
+        Print("Done")
+                    
+        
+    def run_test(self, changes={}):
+        self._generateFiles()
+        result = {}
+        
+        for t in [i for i in self.tests if i in avail_graph]:
+            Print('Doing ' + t)
+            Print.down()
+            res = []
+            
+            for s,size in enumerate(self._getSizes(), 1):
+                inputfile = pjoin(inputsdir, 'input_%i.graph' % size)
+                
+                # Setting environment
+                env = os.environ.copy()
+                envpath = env.has_key('PATH') and env['PATH'] or ''
+                env['PATH'] = ':'.join([pjoin(self.root, p) for p in \
+                  ('bin', 'usr/bin')]) + ':' + envpath
+                envlib = env.has_key('LD_LIBARY_PATH') and \
+                  env['LD_LIBARY_PATH'] or ''
+                env['LD_LIBRARY_PATH'] = ':'.join([pjoin(self.root,p) for p in \
+                  ('usr/lib', 'usr/lib64', 'usr/lib32')]) + ':' + envlib
+                  
+                # Get executable
+                exe, parts = t.split('-')
+                exe = pjoin(self.root, 'usr/bin', exe)
+                
+                # Check dynamic linking
+                logf = file(pjoin(self.logdir, 'ldd.log'), 'w')
+                p = sp.Popen(\
+                  ['ldd', '-v', exe], stdout=logf, stderr=sp.STDOUT, env=env
+                )
+                p.wait()
+                
+                # Execute
+                logname = pjoin(self.logdir, t + '_%i.log' % size)
+                cmd = [exe, inputfile, parts]
+                pr = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.STDOUT, env=env)
+                lines = pr.communicate()[0].split('\n')
+                
+                # Interpret output
+                for i,line in enumerate(lines):
+                    if line[:18] == "Timing Information":
+                        begin_timing = i+1
+                        break
+                    
+                lines = [i[:-1] for i in lines[begin_timing+1:]]
+                for l in lines:
+                    if l.strip()[:13] == "Partitioning:":
+                        time = float(shlex.split(l)[1])
+                        break
+                res.append((size,time))
+                Print("size: %6i    %2.3f sec.  (%i/%i)" % (size, time, s, 100))
+            
+            Print.up()
+            
+            # Write sizes / times to result file
+            resfname = pjoin(self.testdir, t+'.dat')
+            resfs = file(resfname, 'w')
+            for i in res:
+                print >> resfs, i[0], i[1]
+            resfs.close()
+            result[t] = resfname
+        return result
+            
+            
+def writeGraph(size, filename):
+    edges = [[] for i in xrange(size)]
+    nedges = 0
+    for e1 in xrange(len(edges)):
+        n = 0
+        tot = randint(1, min(size / 4, 5))
+        while n < tot:
+            e2 = randint(0, size - 1)
+            if e2 not in edges[e1] and e1 != e2:
+                edges[e1].append(e2)
+                edges[e2].append(e1)
+                n += 1
+                nedges += 1
+    fs = file(filename, 'w')
+    print >> fs, size, nedges
+    for s in edges:
+        print >> fs, ' '.join([str(i+1) for i in s])
+    fs.close()

diff --git a/testdescr.py b/testdescr.py
index a6f0fe4..51ad714 100644
--- a/testdescr.py
+++ b/testdescr.py
@@ -1,5 +1,5 @@
 testdescr = {
-# (C)BLAS             
+# (C)BLAS
 'axpy' : 'y = a*x + y',
 'axpby' : 'y = a*x + b*y',
 'rot': 'Apply Givens rotation',
@@ -27,5 +27,11 @@ testdescr = {
 'FFTW_1D_Forward_Measure': 'FFTW 1D Forward (Measure)',
 'FFTW_1D_Backward_Measure': 'FFTW 1D Backward (Measure)',
 'FFTW_1D_Forward_Estimate': 'FFTW 1D Forward (Estimate)',
-'FFTW_1D_Backward_Estimate': 'FFTW 1D Backward (Estimate)'
+'FFTW_1D_Backward_Estimate': 'FFTW 1D Backward (Estimate)',
+
+# METIS
+'pmetis-8': 'Graph partitioning using pmetis - 8 partitions',
+'kmetis-8': 'Graph partitioning using kmetis - 8 partitions',
+'pmetis-64': 'Graph partitioning using pmetis - 64 partitions',
+'kmetis-64': 'Graph partitioning using kmetis - 64 partitions',
 }



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-14 12:35 Andrea Arteaga
  2011-08-14 11:15 ` [gentoo-commits] proj/auto-numerical-bench:unstable " Andrea Arteaga
  0 siblings, 1 reply; 7+ messages in thread
From: Andrea Arteaga @ 2011-08-14 12:35 UTC (permalink / raw
  To: gentoo-commits

commit:     1bd7537c4e72fc15f126cb35d3a84e4a87e6ad52
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sun Aug 14 11:15:00 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sun Aug 14 11:15:00 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=1bd7537c

Merge remote branch 'origin/master'


 basemodule.py  |   13 +++++
 benchconfig.py |    4 --
 benchprint.py  |   15 ++++--
 blasbase.py    |   17 +++++--
 btlbase.py     |   11 ++++
 lapack.py      |    9 ++-
 main.py        |  147 ++++++++++++++++++++++++++++++++++++++++++++++----------
 7 files changed, 172 insertions(+), 44 deletions(-)



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:unstable commit in: /
@ 2011-08-14 11:15 Andrea Arteaga
  0 siblings, 0 replies; 7+ messages in thread
From: Andrea Arteaga @ 2011-08-14 11:15 UTC (permalink / raw
  To: gentoo-commits

commit:     cd7edaa52900ab114ad31a785987bafc00e9f8ff
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sun Aug 14 11:14:30 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sun Aug 14 11:14:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=cd7edaa5

A few changes to btlbase

---
 btlbase.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/btlbase.py b/btlbase.py
index 5a7c555..890cbc5 100644
--- a/btlbase.py
+++ b/btlbase.py
@@ -137,9 +137,10 @@ class BTLTest(basemodule.BaseTest):
                     Print('Execution error')
                     return 1
                 logfile.write(outline)
+		logfile.flush()
                 Print(outline.strip())
             Print.up()
         logfile.close()
         proc.wait()
         Print("Execution finished with return code " + str(proc.returncode))
-        return proc.returncode
\ No newline at end of file
+        return proc.returncode



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-09  0:00 Andrea Arteaga
  2011-08-14 11:15 ` [gentoo-commits] proj/auto-numerical-bench:unstable " Andrea Arteaga
  0 siblings, 1 reply; 7+ messages in thread
From: Andrea Arteaga @ 2011-08-09  0:00 UTC (permalink / raw
  To: gentoo-commits

commit:     21035a61148d88293ba8af84d7c96555aa19428e
Author:     spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug  8 22:40:53 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug  8 22:40:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=21035a61

Merge branch 'unstable' of git+ssh://git.overlays.gentoo.org/proj/auto-numerical-bench


 PortageUtils.py                                    |  109 +++-
 accuracy/lapack/diff.hh                            |   30 +
 accuracy/lapack/lapack_LU.hh                       |   57 ++
 accuracy/lapack/lapack_QR.hh                       |   57 ++
 accuracy/lapack/lapack_STEV.hh                     |   35 +
 accuracy/lapack/lapack_SVD.hh                      |   40 ++
 accuracy/lapack/lapack_SYEV.hh                     |   43 ++
 accuracy/lapack/lapack_cholesky.hh                 |   37 ++
 accuracy/lapack/main_lapack.cpp                    |  103 +++
 accuracy/lapack/timer.hh                           |   50 ++
 accuracy/sizes.hh                                  |   42 ++
 basemodule.py                                      |   12 +-
 benchconfig.py                                     |   44 +-
 btl/COPYING                                        |  340 ----------
 btl/README                                         |  154 -----
 btl/actions/action_aat_product.hh                  |  145 -----
 btl/actions/action_ata_product.hh                  |  145 -----
 btl/actions/action_atv_product.hh                  |  134 ----
 btl/actions/action_axpby.hh                        |  127 ----
 btl/actions/action_axpy.hh                         |  139 ----
 btl/actions/action_cholesky.hh                     |  129 ----
 btl/actions/action_fftw_1d_backward_estimate.hh    |   94 ---
 btl/actions/action_fftw_1d_backward_measure.hh     |   94 ---
 btl/actions/action_fftw_1d_forward_estimate.hh     |   94 ---
 btl/actions/action_fftw_1d_forward_measure.hh      |   94 ---
 btl/actions/action_general_solve.hh                |  120 ----
 btl/actions/action_ger.hh                          |  128 ----
 btl/actions/action_hessenberg.hh                   |  233 -------
 btl/actions/action_least_squares.hh                |  120 ----
 btl/actions/action_lu_decomp.hh                    |  124 ----
 btl/actions/action_lu_solve.hh                     |  136 ----
 btl/actions/action_matrix_matrix_product.hh        |  150 -----
 btl/actions/action_matrix_matrix_product_bis.hh    |  152 -----
 btl/actions/action_matrix_vector_product.hh        |  153 -----
 btl/actions/action_partial_lu.hh                   |  125 ----
 btl/actions/action_rot.hh                          |  116 ----
 btl/actions/action_symm_ev.hh                      |   87 ---
 btl/actions/action_symv.hh                         |  139 ----
 btl/actions/action_syr2.hh                         |  133 ----
 btl/actions/action_trisolve.hh                     |  137 ----
 btl/actions/action_trisolve_matrix.hh              |  165 -----
 btl/actions/action_trmm.hh                         |  165 -----
 btl/actions/basic_actions.hh                       |   21 -
 btl/actions/fftw_actions.hh                        |    9 -
 btl/data/action_settings.txt                       |   18 -
 btl/data/gnuplot_common_settings.hh                |   87 ---
 btl/data/go_mean                                   |   57 --
 btl/data/mean.cxx                                  |  182 ------
 btl/data/mk_gnuplot_script.sh                      |   68 --
 btl/data/mk_mean_script.sh                         |   52 --
 btl/data/mk_new_gnuplot.sh                         |   54 --
 btl/data/perlib_plot_settings.txt                  |   16 -
 btl/data/regularize.cxx                            |  131 ----
 btl/data/smooth.cxx                                |  198 ------
 btl/data/smooth_all.sh                             |   68 --
 btl/generic_bench/bench.hh                         |  168 -----
 btl/generic_bench/bench_parameter.hh               |   53 --
 btl/generic_bench/btl.hh                           |  247 -------
 btl/generic_bench/init/init_function.hh            |   54 --
 btl/generic_bench/init/init_matrix.hh              |   64 --
 btl/generic_bench/init/init_vector.hh              |   37 --
 btl/generic_bench/static/bench_static.hh           |   80 ---
 btl/generic_bench/static/intel_bench_fixed_size.hh |   66 --
 btl/generic_bench/static/static_size_generator.hh  |   57 --
 btl/generic_bench/timers/STL_perf_analyzer.hh      |   82 ---
 btl/generic_bench/timers/STL_timer.hh              |   78 ---
 btl/generic_bench/timers/mixed_perf_analyzer.hh    |   73 ---
 btl/generic_bench/timers/portable_perf_analyzer.hh |  103 ---
 .../timers/portable_perf_analyzer_old.hh           |  134 ----
 btl/generic_bench/timers/portable_timer.hh         |  145 -----
 btl/generic_bench/timers/x86_perf_analyzer.hh      |  108 ----
 btl/generic_bench/timers/x86_timer.hh              |  246 -------
 btl/generic_bench/utils/size_lin_log.hh            |   70 --
 btl/generic_bench/utils/size_log.hh                |   54 --
 btl/generic_bench/utils/utilities.h                |   90 ---
 btl/generic_bench/utils/xy_file.hh                 |   75 ---
 btl/libs/BLAS/CMakeLists.txt                       |   60 --
 btl/libs/BLAS/blas.h                               |  675 --------------------
 btl/libs/BLAS/blas_interface.hh                    |   76 ---
 btl/libs/BLAS/blas_interface_impl.hh               |   79 ---
 btl/libs/BLAS/c_interface_base.h                   |   72 ---
 btl/libs/BLAS/cblas_interface_impl.hh              |   79 ---
 btl/libs/BLAS/main.cpp                             |  106 ---
 btl/libs/FFTW/fftw_interface.hh                    |   62 --
 btl/libs/FFTW/main.cpp                             |   45 --
 btl/libs/LAPACK/lapack_interface.hh                |   53 --
 btl/libs/LAPACK/lapack_interface_impl.hh           |   68 --
 btl/libs/LAPACK/main.cpp                           |   48 --
 btl/libs/STL/CMakeLists.txt                        |    2 -
 btl/libs/STL/STL_interface.hh                      |  244 -------
 btl/libs/STL/main.cpp                              |   42 --
 btl/libs/eigen3/CMakeLists.txt                     |   65 --
 btl/libs/eigen3/btl_tiny_eigen3.cpp                |   46 --
 btl/libs/eigen3/eigen3_interface.hh                |  240 -------
 btl/libs/eigen3/main_adv.cpp                       |   44 --
 btl/libs/eigen3/main_linear.cpp                    |   35 -
 btl/libs/eigen3/main_matmat.cpp                    |   35 -
 btl/libs/eigen3/main_vecmat.cpp                    |   36 -
 btlbase.py                                         |   18 +-
 fftw.py                                            |    5 +-
 lapack.py                                          |    5 +-
 blas_accuracy.py => lapack_accuracy.py             |   29 +-
 main.py                                            |   64 +-
 metis.py                                           |  162 +++++
 scalapack.py                                       |   68 ++
 testdescr.py                                       |   14 +-
 106 files changed, 925 insertions(+), 9428 deletions(-)



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:unstable commit in: /
@ 2011-08-08 11:53 Andrea Arteaga
  0 siblings, 0 replies; 7+ messages in thread
From: Andrea Arteaga @ 2011-08-08 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     e5a2c34a80bc1cfd984789f8c82a84c70c19f8bb
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug  8 11:50:33 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug  8 11:50:33 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=e5a2c34a

Solve a PBLAS block issue. Log the pkg-config runs.

---
 basemodule.py |    6 ++++++
 pblas.py      |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/basemodule.py b/basemodule.py
index 8a1d180..b55adfc 100644
--- a/basemodule.py
+++ b/basemodule.py
@@ -181,9 +181,13 @@ class BaseTest:
         # 1. Run with no requires
         pfile = pc.GetFile(self.libname, self.impl, self.root)
         flags = pc.Run(pfile, self.root, False)
+        logfile = file(pjoin(self.logdir, 'pkg-config.log'), 'w')
+        print >> logfile, "File:", pfile
+        print >> logfile, "Result:", flags
         
         # 2. Get requires
         requires = pc.Requires(pfile)
+        print >> logfile, "Requires:", requires
         
         # 3.Substitute requires and add flags
         for r in requires:
@@ -192,6 +196,8 @@ class BaseTest:
                 flags += ' ' + pc.Run(pfile)
             else:
                 flags += ' ' + pc.Run(r)
+        print >> logfile, "Third run:", flags
+        logfile.close()
         
         return shlex.split(flags)
     

diff --git a/pblas.py b/pblas.py
index 64d1eb7..e4a7d73 100644
--- a/pblas.py
+++ b/pblas.py
@@ -62,7 +62,7 @@ class PBLASTest(btlbase.BTLTest):
     
     @staticmethod
     def _btl_includes():
-        return ["libs/BLAS", "libs/BLACS", "libs/PBLAS", "libs/STL"]
+        return ["libs/"+i for i in ("BLAS", "LAPACK", "BLACS", "PBLAS", "STL")]
     
     def _btl_defines(self):
         return ["PBLASNAME="+self.libname]
\ No newline at end of file



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:unstable commit in: /
@ 2011-08-08 11:53 Andrea Arteaga
  0 siblings, 0 replies; 7+ messages in thread
From: Andrea Arteaga @ 2011-08-08 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     ab6cb1ff54b439901cc1c2e61a1835733ccf315d
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug  8 11:52:51 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug  8 11:52:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=ab6cb1ff

pblas renamed to scalapack.

---
 pblas.py => scalapack.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pblas.py b/scalapack.py
similarity index 94%
rename from pblas.py
rename to scalapack.py
index e4a7d73..1d38782 100644
--- a/pblas.py
+++ b/scalapack.py
@@ -37,10 +37,10 @@ class Module(btlbase.BTLBase):
         
     @staticmethod
     def _testClass():
-        return PBLASTest
+        return ScaLAPACKTest
 
 
-class PBLASTest(btlbase.BTLTest):    
+class ScaLAPACKTest(btlbase.BTLTest):    
 #    def __init__(self, *args, **kwargs):
 #        os.environ['CXX'] = 'mpic++'
 #        btlbase.BTLTest.__init__(self, *args, **kwargs)



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:unstable commit in: /
@ 2011-07-25 11:23 Andrea Arteaga
  0 siblings, 0 replies; 7+ messages in thread
From: Andrea Arteaga @ 2011-07-25 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f737882e10972a73328f57e35a394246d6837b19
Author:     spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Jul 25 11:23:20 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Jul 25 11:23:20 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=f737882e

Merge some changes.

---
 basemodule.py |    2 +-
 btlbase.py    |   12 +++++-------
 main.py       |   26 ++++----------------------
 pblas.py      |    1 +
 4 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/basemodule.py b/basemodule.py
index 71e2bea..169744b 100644
--- a/basemodule.py
+++ b/basemodule.py
@@ -238,7 +238,7 @@ class BaseTest:
         logfile = pjoin(self.logdir, name+"_run.log")
         retcode = self._executeTest(exe)
         if retcode != 0:
-            Print("Test failed")
+            Print("Test failed with code " + str(retcode))
             Print("See log: " + logfile)
             return
         Print("Test successful")

diff --git a/btlbase.py b/btlbase.py
index 7ac0818..4b28e0c 100644
--- a/btlbase.py
+++ b/btlbase.py
@@ -22,11 +22,9 @@ class BTLBase(basemodule.BaseModule):
     
 class BTLTest(basemodule.BaseTest):
     
-    compileenv = {}
-    runenv = {}
-    
     def _compileTest(self):
         self.compileenv = {}
+        self.runenv = {}
         
         # Includes
         includes = [pjoin(cfg.btldir, i) for i in \
@@ -105,13 +103,12 @@ class BTLTest(basemodule.BaseTest):
         # Open pipe
         logfile = file(pjoin(self.logdir, 'btlrun.log'), 'w')
         args = preargs + [exe] + list(self.tests)
-        logfile.write(' '.join([n+'='+v for n,v in self.runenv.items()]) + ' ')
+        logfile.write(' '.join( \
+          [n + '="'+v+'"' for n,v in self.runenv.items()]  ) + ' ')
         logfile.write(' '.join(args) + '\n')
         logfile.write(80*'-' + '\n')
         proc = sp.Popen(args, bufsize=1, stdout=sp.PIPE, stderr=sp.PIPE, 
-          #env=self.runenv,
-          env={'LD_LIBRARY_PATH' : self.runenv['LD_LIBRARY_PATH']},
-          cwd=self.testdir)
+          env=self.runenv, cwd=self.testdir)
         
         # Interpret output
         while True:
@@ -138,4 +135,5 @@ class BTLTest(basemodule.BaseTest):
             Print.up()
         logfile.close()
         proc.wait()
+        Print("Execution finished with return code " + str(proc.returncode))
         return proc.returncode
\ No newline at end of file

diff --git a/main.py b/main.py
index 561d5d9..f0a6200 100755
--- a/main.py
+++ b/main.py
@@ -24,10 +24,13 @@ try:
     mod = tmp.Module(sys.argv[3:])
     del tmp
     cfg.makedirs()
-except ImportError, IndexError:
+except ImportError as e:
     print e
     print_usage()
     exit(1)
+except IndexError:
+    print_usage()
+    exit(1)
   
     
 def tests_from_input(input):
@@ -84,27 +87,6 @@ used at compile-time as dictionary (it can just be a void one).
 After the tests every successful tested item will contain the item "result",
 which can contain any type of data and will be used for the final report.
 """
-#tests = {
-#    "reference-gfortran" : {
-#        "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
-#        "env" : {'FC' : 'gfortran'}
-#    },
-#         
-#    "eigen-gcc" : {
-#        "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
-#        "env" : {'CXX' : 'g++', 'CXXFLAGS' : '-O2'}
-#    },
-#         
-#    "eigen-icc" : {
-#        "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
-#        "env" : {'CXX' : 'icc', 'CXXFLAGS' : '-O3'}
-#    },
-#
-#    "reference-ifort" : {
-#        "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
-#        "env" : {'FC' : 'ifort'}
-#    }
-#}
 
 
 """

diff --git a/pblas.py b/pblas.py
index 64d1eb7..9f136c6 100644
--- a/pblas.py
+++ b/pblas.py
@@ -54,6 +54,7 @@ class PBLASTest(btlbase.BTLTest):
         return shlex.split(out)[1:] + btlbase.BTLTest._get_flags(self)
     
     def _executeTest(self, exe):
+        self.runenv = os.environ
         btlbase.BTLTest._executeTest(self, exe, ['mpirun', '-n', str(numproc)])
     
     @staticmethod



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-14 11:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 17:23 [gentoo-commits] proj/auto-numerical-bench:unstable commit in: / Andrea Arteaga
  -- strict thread matches above, loose matches on Subject: below --
2011-08-14 12:35 [gentoo-commits] proj/auto-numerical-bench:master " Andrea Arteaga
2011-08-14 11:15 ` [gentoo-commits] proj/auto-numerical-bench:unstable " Andrea Arteaga
2011-08-14 11:15 Andrea Arteaga
2011-08-09  0:00 [gentoo-commits] proj/auto-numerical-bench:master " Andrea Arteaga
2011-08-14 11:15 ` [gentoo-commits] proj/auto-numerical-bench:unstable " Andrea Arteaga
2011-08-08 11:53 Andrea Arteaga
2011-08-08 11:53 Andrea Arteaga
2011-07-25 11:23 Andrea Arteaga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox