diff --git a/config/opal_check_cuda.m4 b/config/opal_check_cuda.m4 index 9ddb97ccf79..87f5dc01ef1 100644 --- a/config/opal_check_cuda.m4 +++ b/config/opal_check_cuda.m4 @@ -59,8 +59,8 @@ AC_ARG_WITH([cuda-libdir], [Search for CUDA libraries in DIR])], [], [AS_IF([test -d "$with_cuda"], - [with_cuda_libdir=$(dirname $(find $with_cuda -name libcuda.so) 2> /dev/null)], - [with_cuda_libdir=$(dirname $(find /usr/local/cuda -name libcuda.so) 2> /dev/null)]) + [with_cuda_libdir=$(dirname $(find $with_cuda -name libcuda.so 2> /dev/null) 2> /dev/null)], + [with_cuda_libdir=$(dirname $(find /usr/local/cuda -name libcuda.so 2> /dev/null) 2> /dev/null)]) ]) # Note that CUDA support is off by default. To turn it on, the user has to diff --git a/docs/tuning-apps/networking/cuda.rst b/docs/tuning-apps/networking/cuda.rst index c6f44955e51..188cf841881 100644 --- a/docs/tuning-apps/networking/cuda.rst +++ b/docs/tuning-apps/networking/cuda.rst @@ -41,14 +41,16 @@ Open MPI offers two flavors of CUDA support: shell$ ./configure --prefix=/path/to/ucx-cuda-install --with-cuda=/usr/local/cuda --with-gdrcopy=/usr # Configure Open MPI this way - shell$ ./configure --with-cuda=/usr/local/cuda --with-cuda-libdir=/usr/local/cuda/lib64/stubs/ --with-ucx=/path/to/ucx-cuda-install + shell$ ./configure --with-cuda=/usr/local/cuda --with-ucx=/path/to/ucx-cuda-install #. Via internal Open MPI CUDA support Regardless of which flavor of CUDA support (or both) you plan to use, Open MPI should be configured using the ``--with-cuda=`` -and ``--with-cuda-libdir=`` configure options to -build CUDA support into Open MPI. +configure option to build CUDA support into Open MPI. The configure +script will automatically search the path given for ``libcuda.so``. If it cannot +be found, please also pass ``--with-cuda-libdir``. For example: +``--with-cuda= --with-cuda-libdir=/usr/local/cuda/lib64/stubs``. Open MPI supports building with CUDA libraries and running on systems without CUDA libraries or hardware. In order to take advantage of @@ -65,7 +67,7 @@ An example configure command would look like the following: .. code-block:: sh # Configure Open MPI this way - shell$ ./configure --with-cuda=/usr/local/cuda --with-cuda-libdir=/usr/local/cuda/lib64/stubs \ + shell$ ./configure --with-cuda=/usr/local/cuda \ --enable-mca-dso=btl-smcuda,rcache-rgpusm,rcache-gpusm,accelerator-cuda /////////////////////////////////////////////////////////////////////////