OpenMPI: Depends on hwlock & libevent (#20658)

* OpenMPI: Depends on hwlock & libevent

Both hwlock & libevent are required dependencies of Open MPI.
While they are also shipped internally, newer releases (>=4.0)
will start looking for external packages by default.

This caused build issues of Open MPI 4.0.5 with Fortran on macOS
10.15.

* Open MPI 4.0: libevent external

Internally shipped libevent just works fine for prior releases.
This commit is contained in:
Axel Huebl 2021-01-04 19:05:11 -08:00 committed by GitHub
parent e5b03770ed
commit e6d462589f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,6 +266,8 @@ class Openmpi(AutotoolsPackage):
depends_on('pkgconfig', type='build')
depends_on('libevent@2.0:', when='@4:')
depends_on('hwloc@2.0:', when='@4:')
# ompi@:3.0.0 doesn't support newer hwloc releases:
# "configure: error: OMPI does not currently support hwloc v2 API"
@ -676,6 +678,9 @@ def configure_args(self):
if spec.satisfies('+lustre'):
lustre_opt = '--with-lustre={0}'.format(spec['lustre'].prefix)
config_args.append(lustre_opt)
# external libevent
if spec.satisfies('@4.0.0:'):
config_args.append('--with-libevent={0}'.format(spec['libevent'].prefix))
# Hwloc support
if spec.satisfies('@1.5.2:'):
config_args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))