From bbfc519ee5631efa4224d852d9c63446a60a8c07 Mon Sep 17 00:00:00 2001 From: Kevin Brandstatter Date: Thu, 26 Feb 2015 14:20:53 -0600 Subject: Added packaging files for ATLAS with and without netlib's LAPACK --- var/spack/packages/atlas/package.py | 51 +++++++++++++++++++++++++++ var/spack/packages/lapack-atlas/package.py | 56 ++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 var/spack/packages/atlas/package.py create mode 100644 var/spack/packages/lapack-atlas/package.py (limited to 'var') diff --git a/var/spack/packages/atlas/package.py b/var/spack/packages/atlas/package.py new file mode 100644 index 0000000000..3fe42b750e --- /dev/null +++ b/var/spack/packages/atlas/package.py @@ -0,0 +1,51 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install atlas +# +# You can always get back here to change things with: +# +# spack edit atlas +# +# See the spack documentation for more information on building +# packages. +# +from spack import * +from spack.util.executable import Executable +import os + +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. + """ + homepage = "http://math-atlas.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2" + + version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da') + + # FIXME: Add dependencies if this package requires them. + # depends_on("foo") + + def install(self, spec, prefix): + #os.mkdir('ATLAS-Build') + #os.chdir('ATLAS-Build') + with working_dir('ATLAS-Build', create=True): + self.module.configure = Executable('../configure') + # FIXME: Modify the configure line to suit your build system here. + configure("--prefix=%s" % prefix) + + # FIXME: Add logic to build and install here + make() + make('check') + make('ptcheck') + make('time') + make("install") diff --git a/var/spack/packages/lapack-atlas/package.py b/var/spack/packages/lapack-atlas/package.py new file mode 100644 index 0000000000..bdcad22b09 --- /dev/null +++ b/var/spack/packages/lapack-atlas/package.py @@ -0,0 +1,56 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install atlas +# +# You can always get back here to change things with: +# +# spack edit atlas +# +# See the spack documentation for more information on building +# packages. +# +from spack import * +from spack.util.executable import Executable +import os +import urllib + +class LapackAtlas(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. + """ + homepage = "http://math-atlas.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2" + + version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da') + + # FIXME: Add dependencies if this package requires them. + # depends_on("foo") + + def install(self, spec, prefix): + #os.mkdir('ATLAS-Build') + #os.chdir('ATLAS-Build') + with working_dir('ATLAS-Build', create=True): + self.module.configure = Executable('../configure') + lapack_file = 'lapack-3.5.0.tgz' + lapack = urllib.URLopener() + lapack.retrieve('http://www.netlib.org/lapack/' + lapack_file, lapack_file) + + configure("--prefix=%s" % prefix, + "--shared", + '--with-netlib-lapack-tarfile=%s' % os.getcwd() + '/' + lapack_file) + + make() + make('check') + make('ptcheck') + make('time') + make("install") -- cgit v1.2.3-70-g09d2 From 08f37d478f4b9018d99f6fcac9b82977ad6dc84d Mon Sep 17 00:00:00 2001 From: Kevin Brandstatter Date: Sun, 1 Mar 2015 21:26:37 -0600 Subject: Removed FIXME comments from atlas --- var/spack/packages/atlas/package.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'var') diff --git a/var/spack/packages/atlas/package.py b/var/spack/packages/atlas/package.py index 3fe42b750e..f9bf59343c 100644 --- a/var/spack/packages/atlas/package.py +++ b/var/spack/packages/atlas/package.py @@ -32,18 +32,11 @@ class Atlas(Package): version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da') - # FIXME: Add dependencies if this package requires them. - # depends_on("foo") - def install(self, spec, prefix): - #os.mkdir('ATLAS-Build') - #os.chdir('ATLAS-Build') with working_dir('ATLAS-Build', create=True): self.module.configure = Executable('../configure') - # FIXME: Modify the configure line to suit your build system here. configure("--prefix=%s" % prefix) - # FIXME: Add logic to build and install here make() make('check') make('ptcheck') -- cgit v1.2.3-70-g09d2 From 0de021d4273f5d217ad6d499018ebd453d796c19 Mon Sep 17 00:00:00 2001 From: Kevin Brandstatter Date: Tue, 3 Mar 2015 19:21:02 -0600 Subject: Added LAPACK package file that depends on and builds against ATLAS --- var/spack/packages/lapack/package.py | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/packages/lapack/package.py (limited to 'var') diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py new file mode 100644 index 0000000000..682a0a1111 --- /dev/null +++ b/var/spack/packages/lapack/package.py @@ -0,0 +1,43 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install lapack +# +# You can always get back here to change things with: +# +# spack edit lapack +# +# See the spack documentation for more information on building +# packages. +# +from spack import * + +class Lapack(Package): + """ + LAPACK version 3.X is a comprehensive FORTRAN library that does + linear algebra operations including matrix inversions, least + squared solutions to linear sets of equations, eigenvector + analysis, singular value decomposition, etc. It is a very + comprehensive and reputable package that has found extensive + use in the scientific community. + """ + homepage = "http://www.netlib.org/lapack/" + url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + + version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') + version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') + version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') + version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') + version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') + + depends_on('atlas') + + def install(self, spec, prefix): + cmake(".", '-DBLAS_LIBRARIES=f77blas;atlas', *std_cmake_args) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From 8921d52a82c7a6eec50feb5e3138d154c7fabcbb Mon Sep 17 00:00:00 2001 From: Kevin Brandstatter Date: Tue, 3 Mar 2015 22:27:16 -0600 Subject: Working lapack install linking to installed ATLAS --- var/spack/packages/lapack/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py index 682a0a1111..94c05d6173 100644 --- a/var/spack/packages/lapack/package.py +++ b/var/spack/packages/lapack/package.py @@ -37,7 +37,9 @@ class Lapack(Package): depends_on('atlas') def install(self, spec, prefix): - cmake(".", '-DBLAS_LIBRARIES=f77blas;atlas', *std_cmake_args) + atlas_blas = spec['atlas'].prefix.lib + '/libf77blas.a' + atlas_lib = spec['atlas'].prefix.lib + "/libatlas.a" + cmake(".", '-DBLAS_LIBRARIES='+atlas_blas + ";" + atlas_lib, *std_cmake_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 30e45df8a52ba1232d740ea74485006dc32330e4 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 4 Mar 2015 09:34:42 -0800 Subject: Updates to atlas packages. --- var/spack/packages/atlas/package.py | 16 ---------------- var/spack/packages/lapack-atlas/package.py | 16 ---------------- var/spack/packages/lapack/package.py | 22 +++------------------- 3 files changed, 3 insertions(+), 51 deletions(-) (limited to 'var') diff --git a/var/spack/packages/atlas/package.py b/var/spack/packages/atlas/package.py index f9bf59343c..7ee85f7f16 100644 --- a/var/spack/packages/atlas/package.py +++ b/var/spack/packages/atlas/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install atlas -# -# You can always get back here to change things with: -# -# spack edit atlas -# -# See the spack documentation for more information on building -# packages. -# from spack import * from spack.util.executable import Executable import os diff --git a/var/spack/packages/lapack-atlas/package.py b/var/spack/packages/lapack-atlas/package.py index bdcad22b09..209b02cb94 100644 --- a/var/spack/packages/lapack-atlas/package.py +++ b/var/spack/packages/lapack-atlas/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install atlas -# -# You can always get back here to change things with: -# -# spack edit atlas -# -# See the spack documentation for more information on building -# packages. -# from spack import * from spack.util.executable import Executable import os diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py index 94c05d6173..b1a41442aa 100644 --- a/var/spack/packages/lapack/package.py +++ b/var/spack/packages/lapack/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install lapack -# -# You can always get back here to change things with: -# -# spack edit lapack -# -# See the spack documentation for more information on building -# packages. -# from spack import * class Lapack(Package): @@ -37,9 +21,9 @@ class Lapack(Package): depends_on('atlas') def install(self, spec, prefix): - atlas_blas = spec['atlas'].prefix.lib + '/libf77blas.a' - atlas_lib = spec['atlas'].prefix.lib + "/libatlas.a" - cmake(".", '-DBLAS_LIBRARIES='+atlas_blas + ";" + atlas_lib, *std_cmake_args) + atlas_libs = ['libf77blas.a', 'libatlas.a'] + atlas_libs = [join_path(spec['atlas'].prefix.lib, lib,) for lib in atlas_libs] + cmake(".", '-DBLAS_LIBRARIES=' + ";".join(atlas_libs), *std_cmake_args) make() make("install") -- cgit v1.2.3-70-g09d2