diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-04-17 16:29:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 16:29:50 -0500 |
commit | 28995b25bc0cd28295eb4b1623460367fd005d45 (patch) | |
tree | fc321fefb63176495f62c8bda6fb5af6ac66dc76 /var | |
parent | 284e450c91f5fdc0a71f6c1f7c2823c84918122f (diff) | |
download | spack-28995b25bc0cd28295eb4b1623460367fd005d45.tar.gz spack-28995b25bc0cd28295eb4b1623460367fd005d45.tar.bz2 spack-28995b25bc0cd28295eb4b1623460367fd005d45.tar.xz spack-28995b25bc0cd28295eb4b1623460367fd005d45.zip |
OpenMPI: add +cxx variant (#15477)
* OpenMPI: add +cxx variant
* C++ support will be removed in 5.0.X release
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openmpi/package.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index a2b75bd67e..00cae9023b 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -77,7 +77,7 @@ class Openmpi(AutotoolsPackage): maintainers = ['hppritcha'] - version('develop', branch='master') + version('master', branch='master') # Current version('4.0.3', sha256='1402feced8c3847b3ab8252165b90f7d1fa28c23b6b2ca4632b6e4971267fd03') # libmpi.so.40.20.3 @@ -237,7 +237,8 @@ class Openmpi(AutotoolsPackage): description='Enable MPI_THREAD_MULTIPLE support') variant('cuda', default=False, description='Enable CUDA support') variant('pmi', default=False, description='Enable PMI support') - variant('cxx_exceptions', default=True, description='Enable C++ Exception support') + variant('cxx', default=False, description='Enable C++ MPI bindings') + variant('cxx_exceptions', default=False, description='Enable C++ Exception support') # Adding support to build a debug version of OpenMPI that activates # Memchecker, as described here: # @@ -299,6 +300,10 @@ class Openmpi(AutotoolsPackage): conflicts('schedulers=loadleveler', when='@3.0.0:', msg='The loadleveler scheduler is not supported with ' 'openmpi(>=3.0.0).') + conflicts('+cxx', when='@5:', + msg='C++ MPI bindings are removed in 5.0.X release') + conflicts('+cxx_exceptions', when='@5:', + msg='C++ exceptions are removed in 5.0.X release') filter_compiler_wrappers('openmpi/*-wrapper-data*', relative_root='share') conflicts('fabrics=libfabric', when='@:1.8') # libfabric support was added in 1.10.0 @@ -431,10 +436,6 @@ class Openmpi(AutotoolsPackage): 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. - config_args.extend(['--enable-mpi-cxx']) - if spec.satisfies('@3.0.0:', strict=True): config_args.append('--with-zlib={0}'.format(spec['zlib'].prefix)) @@ -532,10 +533,17 @@ class Openmpi(AutotoolsPackage): else: config_args.append('--without-cuda') - if '+cxx_exceptions' in spec: - config_args.append('--enable-cxx-exceptions') - else: - config_args.append('--disable-cxx-exceptions') + if spec.satisfies('@:4'): + if '+cxx' in spec: + config_args.append('--enable-mpi-cxx') + else: + config_args.append('--disable-mpi-cxx') + + if '+cxx_exceptions' in spec: + config_args.append('--enable-cxx-exceptions') + else: + config_args.append('--disable-cxx-exceptions') + return config_args @run_after('install') |