summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-06-06 17:20:33 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-06-06 17:21:11 -0700
commitd266bf0184ca0d3a466d2370be0e61c13ff30dcd (patch)
tree28e700b22a51edf0a8106f847861923cc473d98b /var
parent5294e2b9b9a6d3301062577fc726c059a3c495cd (diff)
downloadspack-d266bf0184ca0d3a466d2370be0e61c13ff30dcd.tar.gz
spack-d266bf0184ca0d3a466d2370be0e61c13ff30dcd.tar.bz2
spack-d266bf0184ca0d3a466d2370be0e61c13ff30dcd.tar.xz
spack-d266bf0184ca0d3a466d2370be0e61c13ff30dcd.zip
Working Hypre, PARPACK.
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/arpack/package.py6
-rw-r--r--var/spack/packages/hypre/package.py31
-rw-r--r--var/spack/packages/parpack/package.py41
3 files changed, 48 insertions, 30 deletions
diff --git a/var/spack/packages/arpack/package.py b/var/spack/packages/arpack/package.py
index df46bdda83..8c67c536f3 100644
--- a/var/spack/packages/arpack/package.py
+++ b/var/spack/packages/arpack/package.py
@@ -30,10 +30,12 @@ class Arpack(Package):
makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
# build the library in our own prefix.
- makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/lib/libarpack.a' % self.prefix)
+ makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd())
def install(self, spec, prefix):
- mkdirp(self.prefix.lib)
with working_dir('SRC'):
make('all')
+
+ mkdirp(prefix.lib)
+ install('libarpack.a', prefix.lib)
diff --git a/var/spack/packages/hypre/package.py b/var/spack/packages/hypre/package.py
index 34bdab57a1..198b3f00dc 100644
--- a/var/spack/packages/hypre/package.py
+++ b/var/spack/packages/hypre/package.py
@@ -1,15 +1,16 @@
from spack import *
class Hypre(Package):
- """Hypre is a library of high performance preconditioners that features parallel multigrid
- methods for both structured and unstructured grid problems."""
+ """Hypre is a library of high performance preconditioners that
+ features parallel multigrid methods for both structured and
+ unstructured grid problems."""
homepage = "https://computation.llnl.gov/project/linear_solvers/software.php"
url = "https://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz"
version('2.10.0b', '768be38793a35bb5d055905b271f5b8e')
- depends_on("openmpi")
+ depends_on("mpi")
depends_on("blas")
depends_on("lapack")
@@ -17,17 +18,15 @@ class Hypre(Package):
blas_dir = spec['blas'].prefix
lapack_dir = spec['lapack'].prefix
- # Hypre's source is staged under ./src so we'll have to manually
+ # Hypre's source is staged under ./src so we'll have to manually
# cd into it.
- cd("./src")
-
- configure(
- "--prefix=%s" % prefix,
- "--with-blas-libs=blas",
- "--with-blas-lib-dirs=%s/lib" % blas_dir,
- "--with-lapack-libs=\"lapack blas\"",
- "--with-lapack-lib-dirs=%s/lib" % lapack_dir,
- "--with-MPI")
-
- make()
- make("install")
+ with working_dir("src"):
+ configure(
+ "--prefix=%s" % prefix,
+ "--with-blas-libs=blas",
+ "--with-blas-lib-dirs=%s/lib" % blas_dir,
+ "--with-lapack-libs=\"lapack blas\"",
+ "--with-lapack-lib-dirs=%s/lib" % lapack_dir,
+ "--with-MPI")
+ make()
+ make("install")
diff --git a/var/spack/packages/parpack/package.py b/var/spack/packages/parpack/package.py
index 1b9faf9354..622aceca04 100644
--- a/var/spack/packages/parpack/package.py
+++ b/var/spack/packages/parpack/package.py
@@ -1,7 +1,9 @@
from spack import *
+import os
+import shutil
class Parpack(Package):
- """ARPACK is a collection of Fortran77 subroutines designed to solve large
+ """ARPACK is a collection of Fortran77 subroutines designed to solve large
scale eigenvalue problems."""
homepage = "http://www.caam.rice.edu/software/ARPACK/download.html"
@@ -9,18 +11,33 @@ class Parpack(Package):
version('96', 'a175f70ff71837a33ff7e4b0b6054f43')
+ depends_on('mpi')
depends_on('blas')
depends_on('lapack')
+ def patch(self):
+ # Filter the CJ makefile to make a spack one.
+ shutil.move('ARMAKES/ARmake.CJ', 'ARmake.inc')
+ mf = FileFilter('ARmake.inc')
+
+ # Be sure to use Spack F77 wrapper
+ mf.filter('^FC.*', 'FC = f77')
+ mf.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
+
+ # Set up some variables.
+ mf.filter('^PLAT.*', 'PLAT = ')
+ mf.filter('^home.*', 'home = %s' % os.getcwd())
+ mf.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
+ mf.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+ mf.filter('^MAKE.*', 'MAKE = make')
+
+ # build the library in our own prefix.
+ mf.filter('^ARPACKLIB.*', 'PARPACKLIB = %s/libparpack.a' % os.getcwd())
+
+
def install(self, spec, prefix):
- move("./ARMAKES/ARmake.CJ", "./ARmake.inc");
- filter_file('home = /home1/Netlib/ARPACK', 'home = %s' % pwd(), './ARmake.inc', string=True)
- filter_file('PLAT = CJ', 'PLAT = ', './ARmake.inc', string=True)
- filter_file('LAPACKdir = $(home)/LAPACK', 'LAPACKLIB = %s' % spec['lapack'].prefix, './ARmake.inc', string=True)
- filter_file('BLASdir = $(home)/BLAS', 'BLASLIB = %s' % spec['blas'].prefix, './ARmake.inc', string=True)
- filter_file('ARPACKLIB = $(home)/libarpack_$(PLAT).a', 'ARPACKLIB = %s/libarpack.a' % prefix, './ARmake.inc', string=True)
- filter_file('MAKE = /bin/make', 'MAKE = make', './ARmake.inc', string=True)
- filter_file('FFLAGS', '#FFLAGS', './ARmake.inc', string=True)
- filter_file('FC = f77', 'FC = gfortran', './ARmake.inc', string=True)
- cd('./PARPACK/SRC/MPI')
- make('all')
+ with working_dir('PARPACK/SRC/MPI'):
+ make('all')
+
+ mkdirp(prefix.lib)
+ install('libparpack.a', prefix.lib)