Fix zoltan installation issue on bg-q #3193 (#3194)

Zoltan expects mpi libraries with option --with-mpi-libs.
If this option is not provided then it uses '-lmpi' which
may not be correct. To avoid this, we have to explicitly
pass empty string.

This adds notes to the source explaining the change.
This commit is contained in:
Pramod Kumbhar 2017-02-21 00:39:51 +01:00 committed by Todd Gamblin
parent 4de85ab4b7
commit 8c2f5baa19

View File

@ -88,9 +88,18 @@ def install(self, spec, prefix):
config_args.append('CXX={0}'.format(spec['mpi'].mpicxx))
config_args.append('FC={0}'.format(spec['mpi'].mpifc))
mpi_libs = ' -l'.join(self.get_mpi_libs())
config_args.append('--with-mpi={0}'.format(spec['mpi'].prefix))
mpi_libs = self.get_mpi_libs()
# NOTE: Some external mpi installations may have empty lib
# directory (e.g. bg-q). In this case we need to explicitly
# pass empty library name.
if mpi_libs:
mpi_libs = ' -l'.join(mpi_libs)
config_args.append('--with-mpi-libs=-l{0}'.format(mpi_libs))
else:
config_args.append('--with-mpi-libs= ')
# NOTE: Early versions of Zoltan come packaged with a few embedded
# library packages (e.g. ParMETIS, Scotch), which messes with Spack's