From fd12b140a4ab66ec7e2f057701efff3db4e09e57 Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 16 Apr 2025 21:01:01 +0800 Subject: [PATCH] mpiCheckPhaseHook: use low-level env HWLOC_XMLFILE in all MPI implementations HWLOC_XMLFILE is lower-level than PRTE_MCA_hwloc_use_topo_file. Setting PRTE_MCA_hwloc_use_topo_file require processes managed by prterun/mpiexec. While setting HWLOC_XMLFILE will always work in sandbox environment. This commit fix the annoying error message "[hwloc/linux] failed to find sysfs cpu topology directory, aborting linux discovery." When running mpi4py related python tests not managed by mpiexec. --- pkgs/by-name/mp/mpiCheckPhaseHook/mpi-check-hook.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/mp/mpiCheckPhaseHook/mpi-check-hook.sh b/pkgs/by-name/mp/mpiCheckPhaseHook/mpi-check-hook.sh index 77d7290e2ec1..be2203951c0f 100644 --- a/pkgs/by-name/mp/mpiCheckPhaseHook/mpi-check-hook.sh +++ b/pkgs/by-name/mp/mpiCheckPhaseHook/mpi-check-hook.sh @@ -55,7 +55,7 @@ setupMpiCheck() { # The solution is to use a preset cpu topology file and disable ucx model. # Disable sysfs cpu topology directory discovery. - export PRTE_MCA_hwloc_use_topo_file="@topology@" + export HWLOC_XMLFILE="@topology@" # Use the network model ob1 instead of ucx. export OMPI_MCA_pml=ob1 ;; @@ -68,6 +68,8 @@ setupMpiCheck() { MVAPICH) # Disable CPU pinning export MV2_ENABLE_AFFINITY=0 + # Disable sysfs cpu topology directory discovery. + export HWLOC_XMLFILE="@topology@" ;; esac