openmpi: don't build static libraries if slurm is activated (#8021)

According to this comment:

    https://github.com/open-mpi/ompi/issues/4338#issuecomment-383982008

on an OpenMPI issue, using `--enable-static` silently disable slurm
support.
This commit is contained in:
Massimiliano Culpo 2018-05-04 16:27:54 +02:00 committed by GitHub
parent 593ad23a9f
commit 0570b075d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -336,8 +336,16 @@ def configure_args(self):
spec = self.spec spec = self.spec
config_args = [ config_args = [
'--enable-shared', '--enable-shared',
'--enable-static'
] ]
# According to this comment on github:
#
# 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'):
config_args.append('--enable-static')
if spec.satisfies('@2.0:'): if spec.satisfies('@2.0:'):
# for Open-MPI 2.0:, C++ bindings are disabled by default. # for Open-MPI 2.0:, C++ bindings are disabled by default.
config_args.extend(['--enable-mpi-cxx']) config_args.extend(['--enable-mpi-cxx'])