diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 943682017e7..674f6bcf0ce 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -41,6 +41,7 @@ from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import apply_regex_substitutions, change_dir, extract_file, mkdir, write_file +from easybuild.tools.modules import get_software_root from easybuild.tools.run import run_cmd from easybuild.tools.systemtools import get_shared_lib_ext from easybuild.tools.toolchain.mpi import get_mpi_cmd_template @@ -313,4 +314,11 @@ def make_module_extra(self, *args, **kwargs): # -fc also works, but -f90 takes precedence txt += self.module_generator.set_alias('mpiifort', 'mpiifort -f90=ifort') + # set environment variable UCX_TLS to 'all', this will work in all setups + # needed with UCX regardless of the transports available (even without a Mellanox HCA) + # since impi v2019.8, the MLX provider works without UCX_TLS, but setting it does not hurt + ucx_root = get_software_root('UCX') + if ucx_root: + txt += self.module_generator.set_environment('UCX_TLS', 'all') + return txt