summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-03-26 00:31:34 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-03-26 00:31:34 -0700
commitc10773503b2b07d1968cabda48f845075f9117a4 (patch)
treeaf9ed97952ef7a926a2ab7e2f02b748c0081531f
parentfa53bb835ce50bc9fe548e0311fa0c4868b13f02 (diff)
parent1b75b34eb648a187ed300848422e5125c804b734 (diff)
downloadspack-c10773503b2b07d1968cabda48f845075f9117a4.tar.gz
spack-c10773503b2b07d1968cabda48f845075f9117a4.tar.bz2
spack-c10773503b2b07d1968cabda48f845075f9117a4.tar.xz
spack-c10773503b2b07d1968cabda48f845075f9117a4.zip
Merge branch 'benjaminwalters-develop' into features/blas
Conflicts: var/spack/packages/lapack/package.py
-rw-r--r--var/spack/packages/lapack/package.py29
-rw-r--r--var/spack/packages/netlib_blas/package.py28
2 files changed, 52 insertions, 5 deletions
diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py
index b1a41442aa..7013ba37b4 100644
--- a/var/spack/packages/lapack/package.py
+++ b/var/spack/packages/lapack/package.py
@@ -1,4 +1,6 @@
from spack import *
+import sys
+import glob
class Lapack(Package):
"""
@@ -18,12 +20,29 @@ class Lapack(Package):
version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70')
version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4')
- depends_on('atlas')
+ # blas is a virtual dependency.
+ depends_on('blas')
- def install(self, spec, prefix):
- atlas_libs = ['libf77blas.a', 'libatlas.a']
- atlas_libs = [join_path(spec['atlas'].prefix.lib, lib,) for lib in atlas_libs]
+ # Doesn't always build correctly in parallel
+ parallel = False
+
+ @when('^netlib_blas')
+ def get_blas_libs(self):
+ blas = self.spec['netlib_blas']
+ return [join_path(blas.prefix.lib, 'blas.a')]
+
+
+ @when('^atlas')
+ def get_blas_libs(self):
+ blas = self.spec['atlas']
+ return [join_path(blas.prefix.lib, l)
+ for l in ('libf77blas.a', 'libatlas.a')]
- cmake(".", '-DBLAS_LIBRARIES=' + ";".join(atlas_libs), *std_cmake_args)
+
+ def install(self, spec, prefix):
+ blas_libs = ";".join(self.get_blas_libs())
+ cmake(".", '-DBLAS_LIBRARIES=' + blas_libs, *std_cmake_args)
make()
make("install")
+
+
diff --git a/var/spack/packages/netlib_blas/package.py b/var/spack/packages/netlib_blas/package.py
new file mode 100644
index 0000000000..725bda1309
--- /dev/null
+++ b/var/spack/packages/netlib_blas/package.py
@@ -0,0 +1,28 @@
+from spack import *
+
+class NetlibBlas(Package):
+ """Netlib reference BLAS"""
+ homepage = "http://www.netlib.org/lapack/"
+ url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz"
+
+ version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf')
+
+ # virtual dependency
+ provides('blas')
+
+ # Doesn't always build correctly in parallel
+ parallel = False
+
+ def install(self, spec, prefix):
+ symlink('make.inc.example', 'make.inc')
+ make('blaslib')
+
+ # Tests that blas builds correctly
+ make('blas_testing')
+
+ # No install provided
+ mkdirp(prefix.lib)
+ install('librefblas.a', prefix.lib)
+
+ # Blas virtual package should provide blas.a
+ symlink(prefix.lib + '/librefblas.a', prefix.lib + '/blas.a') \ No newline at end of file