From 51aa604ed275ca54ee8121b3b5607153a81378ea Mon Sep 17 00:00:00 2001 From: Tom Merrick Date: Thu, 2 Aug 2018 13:06:39 -0500 Subject: [PATCH] Fix openmpi to work with slurm/pmi and mxm (#8427) * Add binutils+libiberty for mxm fabric * Help find the pmi library when using the slurm scheduler --- var/spack/repos/builtin/packages/openmpi/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 79ad131132..fbe75db893 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -242,6 +242,8 @@ class Openmpi(AutotoolsPackage): depends_on('valgrind~mpi', when='+memchecker') depends_on('ucx', when='fabrics=ucx') depends_on('libfabric', when='fabrics=libfabric') + depends_on('slurm', when='schedulers=slurm') + depends_on('binutils+libiberty', when='fabrics=mxm') conflicts('+cuda', when='@:1.6') # CUDA support was added in 1.7 conflicts('fabrics=psm2', when='@:1.8') # PSM2 support was added in 1.10.0 @@ -354,8 +356,11 @@ def configure_args(self): # https://github.com/open-mpi/ompi/issues/4338#issuecomment-383982008 # # adding --enable-static silently disables slurm support via pmi/pmi2 - if not spec.satisfies('schedulers=slurm'): + if spec.satisfies('schedulers=slurm'): + config_args.append('--with-pmi={0}'.format(spec['slurm'].prefix)) + else: config_args.append('--enable-static') + config_args.extend(self.with_or_without('pmi')) if spec.satisfies('@2.0:'): # for Open-MPI 2.0:, C++ bindings are disabled by default. @@ -368,8 +373,6 @@ def configure_args(self): config_args.extend(self.with_or_without('fabrics')) # Schedulers config_args.extend(self.with_or_without('schedulers')) - # PMI - config_args.extend(self.with_or_without('pmi')) config_args.extend(self.enable_or_disable('memchecker')) if spec.satisfies('+memchecker', strict=True):