Skip to content

Commit 06bfcc3

Browse files
committed
Test Open MPI with UCX/OFI
1 parent 485f2e9 commit 06bfcc3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

cibw-check-mpi.sh

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

0 commit comments

Comments
 (0)