openmpi: inherit CudaPackage (#29917)

OpenMPI includes cuda_runtime.h, which errors with `#error --
unsupported GNU version! gcc versions later than 9 are not supported!`

By inheriting CudaPackage, the proper conflicts between `cuda` and
`gcc`/`clang` are added.
This commit is contained in:
Harmen Stoppels 2022-04-07 09:08:37 +02:00 committed by GitHub
parent 57f5c92a39
commit cd0b6b9088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@
import llnl.util.tty as tty
class Openmpi(AutotoolsPackage):
class Openmpi(AutotoolsPackage, CudaPackage):
"""An open source Message Passing Interface implementation.
The Open MPI Project is an open source Message Passing Interface
@ -232,7 +232,6 @@ class Openmpi(AutotoolsPackage):
variant('vt', default=True, description='Build VampirTrace support')
variant('thread_multiple', default=False,
description='Enable MPI_THREAD_MULTIPLE support')
variant('cuda', default=False, description='Enable CUDA support')
variant('pmi', default=False, description='Enable PMI support')
variant('pmix', default=False, description='Enable PMIx support')
variant('wrapper-rpath', default=True,
@ -292,7 +291,6 @@ class Openmpi(AutotoolsPackage):
depends_on('hwloc@:1', when='@:3 ~internal-hwloc')
depends_on('hwloc +cuda', when='+cuda ~internal-hwloc')
depends_on('cuda', when='+cuda')
depends_on('java', when='+java')
depends_on('sqlite', when='+sqlite3@:1.11')
depends_on('zlib', when='@3.0.0:')
@ -756,7 +754,6 @@ def configure_args(self):
# CUDA support
# See https://www.open-mpi.org/faq/?category=buildcuda
if spec.satisfies('@1.7:'):
if '+cuda' in spec:
# OpenMPI dynamically loads libcuda.so, requires dlopen
config_args.append('--enable-dlopen')