diff options
-rw-r--r-- | lib/spack/spack/build_environment.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/package.py | 17 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ipopt/package.py | 51 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mumps/package.py | 7 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-scalapack/package.py | 1 |
5 files changed, 72 insertions, 7 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index f4f8037ac0..eb72f2a6b4 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -304,7 +304,7 @@ def setup_package(pkg): # traverse in postorder so package can use vars from its dependencies spec = pkg.spec - for dspec in pkg.spec.traverse(order='post'): + for dspec in pkg.spec.traverse(order='post', root=False): # If a user makes their own package repo, e.g. # spack.repos.mystuff.libelf.Libelf, and they inherit from # an existing class like spack.repos.original.libelf.Libelf, @@ -321,6 +321,7 @@ def setup_package(pkg): dpkg.setup_dependent_package(pkg.module, spec) dpkg.setup_dependent_environment(spack_env, run_env, spec) + set_module_variables_for_package(pkg, pkg.module) pkg.setup_environment(spack_env, run_env) # Make sure nothing's strange about the Spack environment. diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 513a38ee8a..f26e225b83 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -37,6 +37,7 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 + version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') @@ -80,10 +81,16 @@ class Hdf5(Package): # 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') + if spec.satisfies('@1.10:'): + if '+debug' in spec: + extra_args.append('--enable-build-mode=debug') + else: + extra_args.append('--enable-build-mode=production') else: - extra_args.append('--enable-production') + if '+debug' in spec: + extra_args.append('--enable-debug=all') + else: + extra_args.append('--enable-production') if '+shared' in spec: extra_args.append('--enable-shared') @@ -139,5 +146,7 @@ class Hdf5(Package): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" elif version < Version("1.7"): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" - else: + elif version < Version("1.10"): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + else: + return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py new file mode 100644 index 0000000000..13c37bf79c --- /dev/null +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -0,0 +1,51 @@ +from spack import * + +class Ipopt(Package): + """Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a + software package for large-scale nonlinear optimization.""" + homepage = "https://projects.coin-or.org/Ipopt" + url = "http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.4.tgz" + + version('3.12.4', '12a8ecaff8dd90025ddea6c65b49cb03') + version('3.12.3', 'c560cbfa9cbf62acf8b485823c255a1b') + version('3.12.2', 'ec1e855257d7de09e122c446506fb00d') + version('3.12.1', 'ceaf895ce80c77778f2cab68ba9f17f3') + version('3.12.0', 'f7dfc3aa106a6711a85214de7595e827') + + depends_on("blas") + depends_on("lapack") + depends_on("pkg-config") + depends_on("mumps+double~mpi") + + def install(self, spec, prefix): + # Dependency directories + blas_dir = spec['blas'].prefix + lapack_dir = spec['lapack'].prefix + mumps_dir = spec['mumps'].prefix + + # Add directory with fake MPI headers in sequential MUMPS + # install to header search path + mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq" + mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags + + # By convention, spack links blas & lapack libs to libblas & liblapack + blas_lib = "-L%s" % blas_dir.lib + " -lblas" + lapack_lib = "-L%s" % lapack_dir.lib + " -llapack" + + configure_args = [ + "--prefix=%s" % prefix, + "--with-mumps-incdir=%s" % mumps_dir.include, + "--with-mumps-lib=%s" % mumps_libcmd, + "--enable-shared", + "--with-blas-incdir=%s" % blas_dir.include, + "--with-blas-lib=%s" % blas_lib, + "--with-lapack-incdir=%s" % lapack_dir.include, + "--with-lapack-lib=%s" % lapack_lib + ] + + configure(*configure_args) + + # IPOPT does not build correctly in parallel on OS X + make(parallel=False) + make("test", parallel=False) + make("install", parallel=False) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 26440ab7c8..025d86ebdc 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,5 +1,5 @@ from spack import * -import os, sys +import os, sys, glob class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -164,10 +164,13 @@ class Mumps(Package): install_tree('lib', prefix.lib) install_tree('include', prefix.include) - if '~mpi' in spec: + + if '~mpi' in spec: lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' lib_suffix = lib_dsuffix if '+shared' in spec else '.a' install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) + for f in glob.glob(join_path('libseq','*.h')): + install(f, prefix.include) # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI # FIXME: use something like numdiff to compare blessed output with the current diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index d59f8e41fe..276876d197 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -18,6 +18,7 @@ class NetlibScalapack(Package): provides('scalapack') + depends_on('cmake') depends_on('mpi') depends_on('lapack') |