OpenMPI: add +cxx variant (#15477)
* OpenMPI: add +cxx variant * C++ support will be removed in 5.0.X release
This commit is contained in:
parent
284e450c91
commit
28995b25bc
@ -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 @@ def configure_args(self):
|
||||
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 @@ def configure_args(self):
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user