1 preCheckHooks
+=('setupMpiCheck')
2 preInstallCheckHooks
+=('setupMpiCheck')
6 # Find out which MPI implementation we are using
7 # and set safe defaults that are guaranteed to run
12 if command ompi_info
&> /dev
/null
; then
16 # MPICH based implementations
17 if command mpichversion
&> /dev
/null
; then
18 if [ "$mpiType" != "NONE" ]; then
19 echo "WARNING: found OpenMPI and MPICH/MVAPICH executables"
22 version
=$
(mpichversion
)
23 if [[ "$version" == *"MPICH"* ]]; then
26 if [[ "$version" == *"MVAPICH"* ]]; then
31 echo "Found MPI implementation: $mpiType"
35 # Note, that openmpi-5 switched to using PRRTE.
36 # Thus we need to set PRTE_MCA_* instead of OMPI_MCA_*.
37 # We keep the openmpi-4 parameters for backward compatability.
39 # Make sure the test starts even if we have less than the requested amount of cores
40 export OMPI_MCA_rmaps_base_oversubscribe
=1
41 export PRTE_MCA_rmaps_default_mapping_policy
=node
:oversubscribe
43 # Make sure we do not need openssh in the checkPhase
44 export OMPI_MCA_plm_ssh_agent
=false
45 export PRRTE_MCA_plm_ssh_agent
=false
48 export OMPI_MCA_hwloc_base_binding_policy
=none
49 export PRTE_MCA_hwloc_default_binding_policy
=none
51 # OpenMPI get confused by the sandbox environment and spew errors like this (both to stdout and stderr):
52 # [hwloc/linux] failed to find sysfs cpu topology directory, aborting linux discovery.
53 # [1729458724.473282] [localhost:78 :0] tcp_iface.c:893 UCX ERROR scandir(/sys/class/net) failed: No such file or directory
54 # These messages contaminate test output, which makes the difftest to fail.
55 # The solution is to use a preset cpu topology file and disable ucx model.
57 # Disable sysfs cpu topology directory discovery.
58 export PRTE_MCA_hwloc_use_topo_file
="@topology@"
59 # Use the network model ob1 instead of ucx.
60 export OMPI_MCA_pml
=ob1
63 # Fix to make mpich run in a sandbox
65 # Disable sysfs cpu topology directory discovery.
66 export HWLOC_XMLFILE
="@topology@"
70 export MV2_ENABLE_AFFINITY
=0
74 # Limit number of OpenMP threads. Default is "all cores".
75 export OMP_NUM_THREADS
=1