Skip to content

Commit fd12b14

Browse files
committed
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.
1 parent 8d74a87 commit fd12b14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkgs/by-name/mp/mpiCheckPhaseHook/mpi-check-hook.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ setupMpiCheck() {
5555
# The solution is to use a preset cpu topology file and disable ucx model.
5656

5757
# Disable sysfs cpu topology directory discovery.
58-
export PRTE_MCA_hwloc_use_topo_file="@topology@"
58+
export HWLOC_XMLFILE="@topology@"
5959
# Use the network model ob1 instead of ucx.
6060
export OMPI_MCA_pml=ob1
6161
;;
@@ -68,6 +68,8 @@ setupMpiCheck() {
6868
MVAPICH)
6969
# Disable CPU pinning
7070
export MV2_ENABLE_AFFINITY=0
71+
# Disable sysfs cpu topology directory discovery.
72+
export HWLOC_XMLFILE="@topology@"
7173
;;
7274
esac
7375

0 commit comments

Comments
 (0)