summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/autoconf/package.py1
-rw-r--r--var/spack/repos/builtin/packages/automake/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py11
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py28
-rw-r--r--var/spack/repos/builtin/packages/m4/package.py2
-rw-r--r--var/spack/repos/builtin/packages/m4/pgi.patch10
-rw-r--r--var/spack/repos/builtin/packages/mpfr/package.py3
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py98
8 files changed, 120 insertions, 35 deletions
diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index 5189faf054..6412e810a6 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -6,6 +6,7 @@ class Autoconf(Package):
url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz"
version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b')
+ version('2.62', '6c1f3b3734999035d77da5024aab4fbd')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py
index 9115822730..2172a42030 100644
--- a/var/spack/repos/builtin/packages/automake/package.py
+++ b/var/spack/repos/builtin/packages/automake/package.py
@@ -5,7 +5,9 @@ class Automake(Package):
homepage = "http://www.gnu.org/software/automake/"
url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz"
+ version('1.15', '716946a105ca228ab545fc37a70df3a3')
version('1.14.1', 'd052a3e884631b9c7892f2efce542d75')
+ version('1.11.6', '0286dc30295b62985ca51919202ecfcc')
depends_on('autoconf')
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index ed4e7c35c9..513a38ee8a 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -46,7 +46,6 @@ class Hdf5(Package):
variant('cxx', default=True, description='Enable C++ support')
variant('fortran', default=True, description='Enable Fortran support')
- variant('unsupported', default=True, description='Enables unsupported configuration options')
variant('mpi', default=False, description='Enable MPI support')
variant('szip', default=False, description='Enable szip support')
@@ -74,6 +73,13 @@ class Hdf5(Package):
self.validate(spec)
# Handle compilation after spec validation
extra_args = []
+
+ # Always enable this option. This does not actually enable any
+ # features: it only *allows* the user to specify certain
+ # combinations of other arguments. Enabling it just skips a
+ # sanity check in configure, so this doesn't merit a variant.
+ extra_args.append("--enable-unsupported")
+
if '+debug' in spec:
extra_args.append('--enable-debug=all')
else:
@@ -84,9 +90,6 @@ class Hdf5(Package):
else:
extra_args.append('--enable-static-exec')
- if '+unsupported' in spec:
- extra_args.append("--enable-unsupported")
-
if '+cxx' in spec:
extra_args.append('--enable-cxx')
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index 0f7f14dd89..242ee100d7 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -1,4 +1,5 @@
from spack import *
+import os
class Hypre(Package):
"""Hypre is a library of high performance preconditioners that
@@ -8,8 +9,11 @@ class Hypre(Package):
homepage = "http://computation.llnl.gov/project/linear_solvers/software.php"
url = "http://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz"
+ version('2.10.1', 'dc048c4cabb3cd549af72591474ad674')
version('2.10.0b', '768be38793a35bb5d055905b271f5b8e')
+ variant('shared', default=True, description="Build shared library version (disables static library)")
+
depends_on("mpi")
depends_on("blas")
depends_on("lapack")
@@ -17,16 +21,26 @@ class Hypre(Package):
def install(self, spec, prefix):
blas_dir = spec['blas'].prefix
lapack_dir = spec['lapack'].prefix
+ mpi_dir = spec['mpi'].prefix
+
+ os.environ['CC'] = os.path.join(mpi_dir, 'bin', 'mpicc')
+ os.environ['CXX'] = os.path.join(mpi_dir, 'bin', 'mpicxx')
+ os.environ['F77'] = os.path.join(mpi_dir, 'bin', 'mpif77')
+
+
+ configure_args = [
+ "--prefix=%s" % prefix,
+ "--with-lapack-libs=lapack",
+ "--with-lapack-lib-dirs=%s/lib" % lapack_dir,
+ "--with-blas-libs=blas",
+ "--with-blas-lib-dirs=%s/lib" % blas_dir]
+ if '+shared' in self.spec:
+ configure_args.append("--enable-shared")
# Hypre's source is staged under ./src so we'll have to manually
# cd into it.
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")
+ configure(*configure_args)
+
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
index d6829dbcd4..a4b9dcb623 100644
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -7,6 +7,8 @@ class M4(Package):
version('1.4.17', 'a5e9954b1dae036762f7b13673a2cf76')
+ patch('pgi.patch', when='@1.4.17')
+
variant('sigsegv', default=True, description="Build the libsigsegv dependency")
depends_on('libsigsegv', when='+sigsegv')
diff --git a/var/spack/repos/builtin/packages/m4/pgi.patch b/var/spack/repos/builtin/packages/m4/pgi.patch
new file mode 100644
index 0000000000..1ad63e2cf1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/m4/pgi.patch
@@ -0,0 +1,10 @@
+--- a/lib/config.hin
++++ b/lib/config.hin
+@@ -1510,6 +1510,7 @@
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
++ && !defined __PGI \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+ # define _GL_INLINE inline
diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py
index a1bd7529cf..7e6e7d5bb6 100644
--- a/var/spack/repos/builtin/packages/mpfr/package.py
+++ b/var/spack/repos/builtin/packages/mpfr/package.py
@@ -28,8 +28,9 @@ class Mpfr(Package):
"""The MPFR library is a C library for multiple-precision
floating-point computations with correct rounding."""
homepage = "http://www.mpfr.org"
- url = "http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.bz2"
+ url = "https://gforge.inria.fr/frs/download.php/latestfile/159/mpfr-3.1.2.tar.bz2"
+ version('3.1.4', 'b8a2f6b0e68bef46e53da2ac439e1cf4')
version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138')
version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19')
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 87f700629d..efe172fc08 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -1,39 +1,91 @@
+import os
from spack import *
+
class Petsc(Package):
- """PETSc is a suite of data structures and routines for the
- scalable (parallel) solution of scientific applications modeled by
- partial differential equations."""
+ """
+ PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications
+ modeled by partial differential equations.
+ """
homepage = "http://www.mcs.anl.gov/petsc/index.html"
- url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
+ url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
+ version('3.6.3', '91dd3522de5a5ef039ff8f50800db606')
version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13')
version('3.5.1', 'a557e029711ebf425544e117ffa44d8f')
+ version('3.4.4', '7edbc68aa6d8d6a3295dd5f6c2f6979d')
+
+ variant('shared', default=True, description='Enables the build of shared libraries')
+ variant('mpi', default=True, description='Activates MPI support')
+ variant('double', default=True, description='Switches between single and double precision')
+
+ variant('metis', default=True, description='Activates support for metis and parmetis')
+ variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)')
+ variant('boost', default=True, description='Activates support for Boost')
+ variant('hypre', default=True, description='Activates support for Hypre')
+
+ # Virtual dependencies
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('mpi', when='+mpi')
- depends_on("python @2.6:2.9") # requires Python for building
+ # Build dependencies
+ depends_on('python @2.6:2.7')
- depends_on("boost")
- depends_on("blas")
- depends_on("lapack")
- depends_on("hypre")
- depends_on("parmetis")
- depends_on("metis")
- depends_on("hdf5+mpi")
- depends_on("mpi")
+ # Other dependencies
+ depends_on('boost', when='+boost')
+ depends_on('metis', when='+metis')
+
+ depends_on('hdf5+mpi', when='+hdf5+mpi')
+ depends_on('parmetis', when='+metis+mpi')
+ depends_on('hypre', when='+hypre+mpi')
+
+ def mpi_dependent_options(self):
+ if '~mpi' in self.spec:
+ compiler_opts = [
+ '--with-cc=%s' % os.environ['CC'],
+ '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'),
+ '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'),
+ '--with-mpi=0'
+ ]
+ error_message_fmt = '\t{library} support requires "+mpi" to be activated'
+
+ # If mpi is disabled (~mpi), it's an error to have any of these enabled.
+ # This generates a list of any such errors.
+ errors = [error_message_fmt.format(library=x)
+ for x in ('hdf5', 'hypre', 'parmetis')
+ if ('+'+x) in self.spec]
+ if errors:
+ errors = ['incompatible variants given'] + errors
+ raise RuntimeError('\n'.join(errors))
+ else:
+ compiler_opts = [
+ '--with-mpi=1',
+ '--with-mpi-dir=%s' % self.spec['mpi'].prefix,
+ ]
+ return compiler_opts
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix,
- "--with-blas-lib=%s/libblas.a" % spec['blas'].prefix.lib,
- "--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib,
- "--with-boost-dir=%s" % spec['boost'].prefix,
- "--with-hypre-dir=%s" % spec['hypre'].prefix,
- "--with-parmetis-dir=%s" % spec['parmetis'].prefix,
- "--with-metis-dir=%s" % spec['metis'].prefix,
- "--with-hdf5-dir=%s" % spec['hdf5'].prefix,
- "--with-mpi-dir=%s" % spec['mpi'].prefix,
- "--with-shared-libraries=0")
+ options = []
+ options.extend(self.mpi_dependent_options())
+ options.extend([
+ '--with-precision=%s' % ('double' if '+double' in spec else 'single'),
+ '--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
+ '--with-blas-lapack-dir=%s' % spec['lapack'].prefix
+ ])
+ # Activates library support if needed
+ for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis'):
+ options.append(
+ '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0'))
+ )
+ if library in spec:
+ options.append(
+ '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix)
+ )
+
+ configure('--prefix=%s' % prefix, *options)
# PETSc has its own way of doing parallel make.
make('MAKE_NP=%s' % make_jobs, parallel=False)