Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DirectVerbs] Add support to Spectrum MPI #95

Open
wants to merge 1 commit into
base: devel-dv
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bin_PROGRAMS = tests/gds_kernel_latency tests/gds_poll_lat tests/gds_kernel_loop
noinst_PROGRAMS = tests/rstest tests/wqtest

tests_gds_kernel_latency_SOURCES = tests/gds_kernel_latency.c tests/gpu_kernels.cu tests/pingpong.c tests/gpu.cpp
tests_gds_kernel_latency_LDADD = $(top_builddir)/src/libgdsync.la -lmpi $(LIBGDSTOOLS) -lgdrapi $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)
tests_gds_kernel_latency_LDADD = $(top_builddir)/src/libgdsync.la $(MPILDFLAGS) $(LIBGDSTOOLS) -lgdrapi $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)

tests_rstest_SOURCES = tests/rstest.cpp
tests_rstest_LDADD =
Expand All @@ -45,10 +45,10 @@ tests_wqtest_SOURCES = tests/task_queue_test.cpp
tests_wqtest_LDADD = $(PTHREAD_LIBS)

tests_gds_poll_lat_SOURCES = tests/gds_poll_lat.c tests/gpu.cpp tests/gpu_kernels.cu
tests_gds_poll_lat_LDADD = $(top_builddir)/src/libgdsync.la $(LIBGDSTOOLS) -lgdrapi -lmpi $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)
tests_gds_poll_lat_LDADD = $(top_builddir)/src/libgdsync.la $(LIBGDSTOOLS) -lgdrapi $(MPILDFLAGS) $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)

tests_gds_sanity_SOURCES = tests/gds_sanity.cpp tests/gpu.cpp tests/gpu_kernels.cu
tests_gds_sanity_LDADD = $(top_builddir)/src/libgdsync.la $(LIBGDSTOOLS) -lgdrapi -lmpi $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)
tests_gds_sanity_LDADD = $(top_builddir)/src/libgdsync.la $(LIBGDSTOOLS) -lgdrapi $(MPILDFLAGS) $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)

tests_gds_kernel_loopback_latency_SOURCES = tests/gds_kernel_loopback_latency.c tests/pingpong.c tests/gpu.cpp tests/gpu_kernels.cu
tests_gds_kernel_loopback_latency_LDADD = $(top_builddir)/src/libgdsync.la $(LIBGDSTOOLS) -lgdrapi $(LIBNVTX) -lcuda -lcudart $(PTHREAD_LIBS)
Expand Down
44 changes: 37 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,54 @@ else
AC_SUBST(LIBGDSTOOLS)
fi

AC_ARG_WITH([mpi],
AC_HELP_STRING([--with-mpi], [ Set path to mpi installation ]))
if test x$with_mpi = x || test x$with_mpi = xno; then
AC_ARG_WITH([spectrum-mpi],
AC_HELP_STRING([--with-spectrum-mpi], [ Set path to Spectrum MPI installation ]))
if test x$with_spectrum_mpi = x || test x$with_spectrum_mpi = xno; then
# assuming system location
mpi_home=/usr
MPICC=$with_home/bin/mpicc
MPICXX=$with_home/bin/mpic++
MPICC=/bin/mpicc
MPICXX=/bin/mpic++
MPILDFLAGS="-lmpi_ibm"
else
if test -d $with_mpi; then
mpi_home=$with_mpi
if test -d $with_spectrum_mpi; then
mpi_home=$with_spectrum_mpi
MPICC=${mpi_home}/bin/mpicc
MPICXX=${mpi_home}/bin/mpic++
CPPFLAGS="$CPPFLAGS -I${mpi_home}/include"
LDFLAGS="$LDFLAGS -L${mpi_home}/lib -L${mpi_home}/lib64"
MPILDFLAGS="-lmpi_ibm"
else
echo "MPI dir does not exist"
fi
fi

AC_ARG_WITH([mpi],
AC_HELP_STRING([--with-mpi], [ Set path to MPI installation ]))
if test x$with_spectrum_mpi = x || test x$with_spectrum_mpi == xno; then
if test x$with_mpi = x || test x$with_mpi = xno; then
# assuming system location
mpi_home=/usr
MPICC=/bin/mpicc
MPICXX=/bin/mpic++
MPILDFLAGS="-lmpi"
else
if test -d $with_mpi; then
mpi_home=$with_mpi
MPICC=${mpi_home}/bin/mpicc
MPICXX=${mpi_home}/bin/mpic++
CPPFLAGS="$CPPFLAGS -I${mpi_home}/include"
LDFLAGS="$LDFLAGS -L${mpi_home}/lib -L${mpi_home}/lib64"
MPILDFLAGS="-lmpi"
else
echo "MPI dir does not exist"
fi
fi
fi

if test x$with_spectrum_mpi != x && test x$with_spectrum_mpi != xno && test x$with_mpi != x && test x$with_mpi != xno; then
AC_MSG_ERROR([--with-mpi and --with-spectrum-mpi are mutually exclusive.])
fi

dnl Specify CUDA Location
AC_ARG_WITH(cuda-toolkit,
AC_HELP_STRING([--with-cuda-toolkit=CUDATKDIR], [ Specify CUDA toolkit installation directory (default: /usr/local/cuda)]),
Expand Down Expand Up @@ -186,6 +215,7 @@ AC_MSG_NOTICE([Setting MPI_PATH = ${mpi_home} ])
AC_SUBST( MPI_PATH, [${mpi_home} ])
AC_SUBST( MPICC, [${MPICC} ])
AC_SUBST( MPICXX, [${MPICXX} ])
AC_SUBST( MPILDFLAGS, [${MPILDFLAGS} ])

CPPFLAGS="$CPPFLAGS -I$CUDA_DRV_PATH/include -I$CUDA_PATH/include"
LDFLAGS="$LDFLAGS -L$CUDA_DRV_PATH/lib64 -L$CUDA_DRV_PATH/lib -L$CUDA_PATH/lib64 -L$CUDA_PATH/lib"
Expand Down