Skip to content

Commit 4d06b0e

Browse files
committed
TEST/MPI: Added MPI+CUDA example.
1 parent b9a4d8d commit 4d06b0e

File tree

3 files changed

+722
-3
lines changed

3 files changed

+722
-3
lines changed

contrib/test_jenkins.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,16 +672,18 @@ run_mpi_tests() {
672672
save_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
673673
export LD_LIBRARY_PATH=${ucx_inst}/lib:${MPI_HOME}/lib:${prev_LD_LIBRARY_PATH}
674674

675-
build release --disable-gtest --with-mpi
675+
build release-mt --with-mpi --enable-assertions
676676

677677
# check whether installation is valid (it compiles examples at least)
678678
$MAKEP installcheck
679679

680-
MPIRUN="mpirun \
680+
MPIRUN_COMMON="mpirun \
681681
--allow-run-as-root \
682682
--bind-to none \
683683
-x UCX_ERROR_SIGNALS \
684-
-x UCX_HANDLE_ERRORS \
684+
-x UCX_HANDLE_ERRORS"
685+
686+
MPIRUN="${MPIRUN_COMMON} \
685687
-mca pml ob1 \
686688
-mca osc ^ucx \
687689
-mca btl tcp,self \
@@ -693,6 +695,20 @@ run_mpi_tests() {
693695

694696
test_malloc_hooks_mpi
695697

698+
if [ "X$have_cuda" == "Xyes" ] && [ -x ./test/mpi/test_mpi_cuda ]
699+
then
700+
echo "==== Running MPI CUDA tests ===="
701+
${MPIRUN_COMMON} -np 2 ./test/mpi/test_mpi_cuda
702+
703+
echo "==== Running MPI CUDA tests without cuda_ipc ===="
704+
${MPIRUN_COMMON} -np 2 -x UCX_TLS=^cuda_ipc \
705+
./test/mpi/test_mpi_cuda
706+
707+
echo "==== Running MPI CUDA tests with put_ppln ===="
708+
${MPIRUN_COMMON} -np 2 -x UCX_RNDV_SCHEME=put_ppln \
709+
./test/mpi/test_mpi_cuda
710+
fi
711+
696712
# Restore LD_LIBRARY_PATH so subsequent tests will not take UCX libs
697713
# from installation directory
698714
export LD_LIBRARY_PATH=${save_LD_LIBRARY_PATH}

test/mpi/Makefile.am

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ noinst_PROGRAMS =
1515

1616
if HAVE_MPICC
1717
noinst_PROGRAMS += test_memhooks
18+
if HAVE_CUDA
19+
noinst_PROGRAMS += test_mpi_cuda
20+
endif
1821
endif
1922

2023
if HAVE_SHMEMCC
@@ -32,6 +35,14 @@ if HAVE_MPICC
3235
test_memhooks_SOURCES = test_memhooks.c
3336
test_memhooks_LDFLAGS = -ldl
3437

38+
if HAVE_CUDA
39+
test_mpi_cuda_SOURCES = test_mpi_cuda.c
40+
test_mpi_cuda_CPPFLAGS = $(BASE_CPPFLAGS) $(CUDA_CPPFLAGS)
41+
test_mpi_cuda_CFLAGS = $(BASE_CFLAGS)
42+
test_mpi_cuda_LDFLAGS = $(CUDA_LDFLAGS)
43+
test_mpi_cuda_LDADD = $(CUDA_LIBS) $(top_builddir)/src/ucs/libucs.la
44+
endif
45+
3546
# A library we use for testing that memory hooks work in libraries loaded
3647
# after the hooks were installed
3748
noinst_LTLIBRARIES = libtest_memhooks.la

0 commit comments

Comments
 (0)