diff options
author | Ondřej Čertík <ondrej@certik.us> | 2017-10-24 19:53:12 -0600 |
---|---|---|
committer | scheibelp <scheibel1@llnl.gov> | 2017-10-24 18:53:12 -0700 |
commit | 39616a2fe1fe6cb0172c2e2a79a362112002a290 (patch) | |
tree | db1041031f30e5bfb2a678b2f453a81663455b88 /var | |
parent | 68f7b7863ab50cd8790bac04ca0c49febe66b9ad (diff) | |
download | spack-39616a2fe1fe6cb0172c2e2a79a362112002a290.tar.gz spack-39616a2fe1fe6cb0172c2e2a79a362112002a290.tar.bz2 spack-39616a2fe1fe6cb0172c2e2a79a362112002a290.tar.xz spack-39616a2fe1fe6cb0172c2e2a79a362112002a290.zip |
hypre: make mpi dependency optional (#5905)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hypre/package.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 35ed1b138b..0d5dfa7f0a 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -51,19 +51,16 @@ class Hypre(Package): description="Use internal Superlu routines") variant('int64', default=False, description="Use 64bit integers") + variant('mpi', default=True, description='Enable MPI support') # Patch to add ppc64le in config.guess patch('ibm-ppc64le.patch', when='@:2.11.1') - depends_on("mpi") + depends_on("mpi", when='+mpi') depends_on("blas") depends_on("lapack") def install(self, spec, prefix): - os.environ['CC'] = spec['mpi'].mpicc - os.environ['CXX'] = spec['mpi'].mpicxx - os.environ['F77'] = spec['mpi'].mpif77 - # Note: --with-(lapack|blas)_libs= needs space separated list of names lapack = spec['lapack'].libs blas = spec['blas'].libs @@ -76,6 +73,14 @@ class Hypre(Package): '--with-blas-lib-dirs=%s' % ' '.join(blas.directories) ] + if '+mpi' in self.spec: + os.environ['CC'] = spec['mpi'].mpicc + os.environ['CXX'] = spec['mpi'].mpicxx + os.environ['F77'] = spec['mpi'].mpif77 + configure_args.append('--with-MPI') + else: + configure_args.append('--without-MPI') + if '+int64' in self.spec: configure_args.append('--enable-bigint') |