hypre: make mpi dependency optional (#5905)
This commit is contained in:
parent
68f7b7863a
commit
39616a2fe1
@ -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 @@ def install(self, spec, prefix):
|
||||
'--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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user