summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-24 11:24:04 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-24 11:24:04 -0700
commit38ea75e8ca65dd6c896fe7856efdb1d8355ec524 (patch)
tree5985392f3ebc2522063eb43d5ed617feae6539f4
parent823edd0bb2fb88bc3c7e4bbd8622137ce0814d6d (diff)
parenta2af4940aaf169f3358f19986fc94a02222a8096 (diff)
downloadspack-38ea75e8ca65dd6c896fe7856efdb1d8355ec524.tar.gz
spack-38ea75e8ca65dd6c896fe7856efdb1d8355ec524.tar.bz2
spack-38ea75e8ca65dd6c896fe7856efdb1d8355ec524.tar.xz
spack-38ea75e8ca65dd6c896fe7856efdb1d8355ec524.zip
Merge pull request #490 from epfl-scitas/packages/atlas
atlas : provides both 'blas' and 'lapack'
-rw-r--r--var/spack/repos/builtin/packages/atlas/package.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py
index fc683363a7..b5504122b7 100644
--- a/var/spack/repos/builtin/packages/atlas/package.py
+++ b/var/spack/repos/builtin/packages/atlas/package.py
@@ -1,31 +1,36 @@
from spack import *
from spack.util.executable import Executable
-import os
+import os.path
class Atlas(Package):
"""
- Automatically Tuned Linear Algebra Software, generic shared
- ATLAS is an approach for the automatic generation and optimization of
- numerical software. Currently ATLAS supplies optimized versions for the
- complete set of linear algebra kernels known as the Basic Linear Algebra
- Subroutines (BLAS), and a subset of the linear algebra routines in the
- LAPACK library.
+ Automatically Tuned Linear Algebra Software, generic shared ATLAS is an approach for the automatic generation and
+ optimization of numerical software. Currently ATLAS supplies optimized versions for the complete set of linear
+ algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines
+ in the LAPACK library.
"""
homepage = "http://math-atlas.sourceforge.net/"
+ version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da',
+ url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2', preferred=True)
+ resource(name='lapack',
+ url='http://www.netlib.org/lapack/lapack-3.5.0.tgz',
+ md5='b1d3e3e425b2e44a06760ff173104bdf',
+ destination='spack-resource-lapack',
+ when='@3:')
+
version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825',
url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download')
- version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da',
- url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2')
- # TODO: make this provide BLAS once it works better. Create a way
- # TODO: to mark "beta" packages and require explicit invocation.
+ variant('shared', default=True, description='Builds shared library')
- # provides('blas')
+ provides('blas')
+ provides('lapack')
+ parallel = False
def patch(self):
- # Disable thraed check. LLNL's environment does not allow
+ # Disable thread check. LLNL's environment does not allow
# disabling of CPU throttling in a way that ATLAS actually
# understands.
filter_file(r'^\s+if \(thrchk\) exit\(1\);', 'if (0) exit(1);',
@@ -33,26 +38,21 @@ class Atlas(Package):
# TODO: investigate a better way to add the check back in
# TODO: using, say, MSRs. Or move this to a variant.
- @when('@:3.10')
def install(self, spec, prefix):
- with working_dir('ATLAS-Build', create=True):
- configure = Executable('../configure')
- configure('--prefix=%s' % prefix, '-C', 'ic', 'cc', '-C', 'if', 'f77', "--dylibs")
- make()
- make('check')
- make('ptcheck')
- make('time')
- make("install")
+ options = []
+ if '+shared' in spec:
+ options.append('--shared')
- def install(self, spec, prefix):
- with working_dir('ATLAS-Build', create=True):
- configure = Executable('../configure')
- configure('--incdir=%s' % prefix.include,
- '--libdir=%s' % prefix.lib,
- '--cc=cc',
- "--shared")
+ # Lapack resource
+ lapack_stage = self.stage[1]
+ lapack_tarfile = os.path.basename(lapack_stage.fetcher.url)
+ lapack_tarfile_path = join_path(lapack_stage.path, lapack_tarfile)
+ options.append('--with-netlib-lapack-tarfile=%s' % lapack_tarfile_path)
+ with working_dir('spack-build', create=True):
+ configure = Executable('../configure')
+ configure('--prefix=%s' % prefix, *options)
make()
make('check')
make('ptcheck')