zoltan: add optional dependency on parmetis (#6387)
This commit is contained in:
parent
6fd1009081
commit
951679376e
@ -53,9 +53,14 @@ class Zoltan(Package):
|
|||||||
|
|
||||||
variant('fortran', default=True, description='Enable Fortran support.')
|
variant('fortran', default=True, description='Enable Fortran support.')
|
||||||
variant('mpi', default=True, description='Enable MPI support.')
|
variant('mpi', default=True, description='Enable MPI support.')
|
||||||
|
variant('parmetis', default=False, description='Enable ParMETIS support.')
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
|
|
||||||
|
depends_on('parmetis@4:', when='+parmetis')
|
||||||
|
|
||||||
|
conflicts('+parmetis', when='~mpi')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers
|
# FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers
|
||||||
# because of some complicated generic type problem.
|
# because of some complicated generic type problem.
|
||||||
@ -80,6 +85,13 @@ def install(self, spec, prefix):
|
|||||||
if spec.satisfies('%gcc'):
|
if spec.satisfies('%gcc'):
|
||||||
config_args.append('--with-libs={0}'.format('-lgfortran'))
|
config_args.append('--with-libs={0}'.format('-lgfortran'))
|
||||||
|
|
||||||
|
if '+parmetis' in spec:
|
||||||
|
config_args.append('--with-parmetis')
|
||||||
|
config_args.append('--with-parmetis-libdir={0}'
|
||||||
|
.format(spec['parmetis'].prefix.lib))
|
||||||
|
config_args.append('--with-parmetis-incdir={0}'
|
||||||
|
.format(spec['parmetis'].prefix.include))
|
||||||
|
|
||||||
if '+mpi' in spec:
|
if '+mpi' in spec:
|
||||||
config_args.append('CC={0}'.format(spec['mpi'].mpicc))
|
config_args.append('CC={0}'.format(spec['mpi'].mpicc))
|
||||||
config_args.append('CXX={0}'.format(spec['mpi'].mpicxx))
|
config_args.append('CXX={0}'.format(spec['mpi'].mpicxx))
|
||||||
|
Loading…
Reference in New Issue
Block a user