diff options
-rw-r--r-- | var/spack/repos/builtin/packages/zoltan/package.py | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 3fd29e17c3..bda22c0757 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -87,16 +87,11 @@ class Zoltan(Package): 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: Zoltan assumes that it's linking against an MPI library + # that can be found with '-lmpi' which isn't the case for many + # MPI packages. We rely on the MPI-wrappers to automatically add + # what is required for linking and thus pass an empty list of libs + 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 @@ -135,18 +130,3 @@ class Zoltan(Package): def get_config_flag(self, flag_name, flag_variant): flag_pre = 'en' if '+{0}'.format(flag_variant) in self.spec else 'dis' return '--{0}able-{1}'.format(flag_pre, flag_name) - - # NOTE: Zoltan assumes that it's linking against an MPI library that can - # be found with '-lmpi,' which isn't the case for many MPI packages. This - # function finds the names of the actual libraries for Zoltan's MPI dep. - def get_mpi_libs(self): - mpi_libs = set() - - for lib_path in glob.glob(join_path(self.spec['mpi'].prefix.lib, '*')): - mpi_lib_match = re.match( - r'^(lib)((\w*)mpi(\w*))\.((a)|({0}))$'.format(dso_suffix), - os.path.basename(lib_path)) - if mpi_lib_match: - mpi_libs.add(mpi_lib_match.group(2)) - - return list(mpi_libs) |