From 81b4294a2b8a9f2fedf90488ce246fc9a5f639b2 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 31 May 2024 15:44:00 +0000 Subject: [PATCH] Allow external PRRTE in openmpi easyblock --- easybuild/easyblocks/o/openmpi.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/o/openmpi.py b/easybuild/easyblocks/o/openmpi.py index 8460aad58a..e8261d0ca3 100644 --- a/easybuild/easyblocks/o/openmpi.py +++ b/easybuild/easyblocks/o/openmpi.py @@ -72,6 +72,8 @@ def config_opt_used(key, enable_opt=False): known_dependencies = ['CUDA', 'hwloc', 'libevent', 'libfabric', 'PMIx', 'UCX'] if LooseVersion(self.version) >= '4.1.4': known_dependencies.append('UCC') + if LooseVersion(self.version) >= '5.0.0': + known_dependencies.append('PRRTE') # Value to use for `--with-=` if the dependency is not specified in the easyconfig # No entry is interpreted as no option added at all @@ -85,6 +87,8 @@ def config_opt_used(key, enable_opt=False): # For these the default is to use an internal copy and not using any is not supported for dep in ('hwloc', 'libevent', 'PMIx'): unused_dep_value[dep] = 'internal' + if LooseVersion(self.version) >= '5.0.0': + unused_dep_value['PRRTE'] = 'internal' # handle dependencies for dep in known_dependencies: @@ -165,7 +169,8 @@ def sanity_check_step(self): bin_names = ['mpicc', 'mpicxx', 'mpif90', 'mpifort', 'mpirun', 'ompi_info', 'opal_wrapper'] if LooseVersion(self.version) >= LooseVersion('5.0.0'): - bin_names.append('prterun') + if not get_software_root('PRRTE'): + bin_names.append('prterun') else: bin_names.append('orterun') bin_files = [os.path.join('bin', x) for x in bin_names] @@ -173,13 +178,14 @@ def sanity_check_step(self): shlib_ext = get_shared_lib_ext() lib_names = ['mpi_mpifh', 'mpi', 'open-pal'] if LooseVersion(self.version) >= LooseVersion('5.0.0'): - lib_names.append('prrte') + if not get_software_root('PRRTE'): + lib_names.append('prrte') else: lib_names.extend(['ompitrace', 'open-rte']) lib_files = [os.path.join('lib', 'lib%s.%s' % (x, shlib_ext)) for x in lib_names] inc_names = ['mpi-ext', 'mpif-config', 'mpif', 'mpi', 'mpi_portable_platform'] - if LooseVersion(self.version) >= LooseVersion('5.0.0'): + if LooseVersion(self.version) >= LooseVersion('5.0.0') and not get_software_root('PRRTE'): inc_names.append('prte') inc_files = [os.path.join('include', x + '.h') for x in inc_names]