Skip to content

Commit 6e3cb66

Browse files
committed
Test Open MPI with UCX/OFI
1 parent 09254dc commit 6e3cb66

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

cibw-check-mpi.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,39 @@ if test "$mpiname-$(uname)" = "mpich-Linux"; then
113113
unset MPICH_CH4_NETMOD
114114
unset MPICH_NOLOCAL
115115
fi
116+
117+
if test "$mpiname-$(uname)" = "openmpi-Linux"; then
118+
for backend in ofi ucx; do
119+
printf "testing %s ... " "$backend"
120+
if test "$backend" = "ucx"; then
121+
export OMPI_MCA_pml=ucx
122+
export OMPI_MCA_osc=ucx
123+
export OMPI_MCA_btl=^vader,tcp,openib,uct
124+
export OMPI_MCA_opal_common_ucx_tls=tcp
125+
export OMPI_MCA_opal_common_ucx_devices=lo
126+
export OMPI_MCA_opal_common_ucx_verbose=1
127+
check='mca_pml_ucx_init'
128+
fi
129+
if test "$backend" = "ofi"; then
130+
export OMPI_MCA_pml=cm
131+
export OMPI_MCA_mtl=ofi
132+
export OMPI_MCA_opal_common_ofi_provider_include=tcp
133+
export OMPI_MCA_opal_common_ofi_verbose=1
134+
check='mtl:ofi:prov.*: tcp'
135+
fi
136+
mpiexec -n 1 ./helloworld-c 2>&1 | grep -i "$check" > /dev/null
137+
for n in $(seq 1 4); do
138+
mpiexec -n "$n" ./helloworld-c > /dev/null 2>&1
139+
done
140+
unset OMPI_MCA_pml
141+
unset OMPI_MCA_osc
142+
unset OMPI_MCA_mtl
143+
unset OMPI_MCA_btl
144+
unset OMPI_MCA_opal_common_ucx_tls
145+
unset OMPI_MCA_opal_common_ucx_devices
146+
unset OMPI_MCA_opal_common_ucx_verbose
147+
unset OMPI_MCA_opal_common_ofi_provider_include
148+
unset OMPI_MCA_opal_common_ofi_verbose
149+
printf "OK\n"
150+
done
151+
fi

0 commit comments

Comments
 (0)