diff options
author | spiros <andyspiros@gmail.com> | 2011-07-01 01:44:58 +0200 |
---|---|---|
committer | spiros <andyspiros@gmail.com> | 2011-07-01 01:44:58 +0200 |
commit | de13fa33730ce07913211fcf889a8cca9482a219 (patch) | |
tree | 9113af38993df7acfa27a54d3adcf0be820a3fc1 /lapack.py | |
parent | Correct bug at main.py:207. (diff) | |
download | auto-numerical-bench-de13fa33730ce07913211fcf889a8cca9482a219.tar.gz auto-numerical-bench-de13fa33730ce07913211fcf889a8cca9482a219.tar.bz2 auto-numerical-bench-de13fa33730ce07913211fcf889a8cca9482a219.zip |
Introduced portage tree.
Diffstat (limited to 'lapack.py')
-rw-r--r-- | lapack.py | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/lapack.py b/lapack.py deleted file mode 100644 index ec98cd5..0000000 --- a/lapack.py +++ /dev/null @@ -1,56 +0,0 @@ -import os, btlbase -import subprocess as sp -import shlex - -class Module(btlbase.BTLBase): - def _initialize(self): - self.libname = "lapack" - self.avail = ['general_solve', 'least_squares', 'lu_decomp', \ - 'cholesky', 'symm_ev'] - - def _parse_args(self, args): - # Parse arguments - tests = [] - for i in args: - if i in self.avail: - tests.append(i) - continue - raise Exception("Argument not recognized: " + i) - - # Sort tests - self.tests = [i for i in self.avail if i in tests] - - # If no test is specified, run everything - if len(self.tests) == 0: - self.tests = self.avail - - @staticmethod - def _btl_source(): - return "/libs/LAPACK/main.cpp" - - @staticmethod - def _btl_includes(): - return ["/libs/BLAS", "libs/LAPACK"] - - def _btl_defines(self): - return ["LAPACKNAME=" + self.libname] - - def _get_flags(self, root, impl, libdir): - # Retrieve pkgconfig settings and map the directories to the new root - path = "%s/etc/env.d/alternatives/%s/%s/%s/pkgconfig" % \ - (root, self.libname, impl, libdir) - pkgconf = sp.Popen('pkg-config --libs --cflags lapack', shell=True, \ - stdout=sp.PIPE, env={'PKG_CONFIG_PATH':path}).communicate()[0] - pkgconf = pkgconf.replace('-L/', '-L'+root+'/') - pkgconf = pkgconf.replace('-I/', '-I'+root+'/') - return shlex.split(pkgconf) - - - def get_impls(self, root): - output = sp.Popen( - ['eselect', '--no-color', '--brief', self.libname, 'list'], - env={'ROOT' : root}, stdout=sp.PIPE - ).communicate()[0] - return output.strip().split('\n') - -del btlbase |