Skip to content

Commit c7e27b9

Browse files
committed
Only pick one CUDA
In some cases the CUDA install directory contains two libcuda.so and this breaks OMPI CUDA detection. Pick the first of these libraries seems to be a good soltuion for all cases. Signed-off-by: George Bosilca <[email protected]>
1 parent 41a68b5 commit c7e27b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/opal_check_cuda.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ AC_ARG_WITH([cuda-libdir],
6060
[Search for CUDA libraries in DIR])],
6161
[],
6262
[AS_IF([test -d "$with_cuda"],
63-
[with_cuda_libdir=$(dirname $(find -H $with_cuda -name libcuda.so 2> /dev/null) 2> /dev/null)],
64-
[with_cuda_libdir=$(dirname $(find -H /usr/local/cuda -name libcuda.so 2> /dev/null) 2> /dev/null)])
63+
[with_cuda_libdir=$(dirname $(find -H $with_cuda -name libcuda.so 2> /dev/null | head -n 1) 2> /dev/null)],
64+
[with_cuda_libdir=$(dirname $(find -H /usr/local/cuda -name libcuda.so 2> /dev/null) 2> /dev/null | head -n 1)])
6565
])
6666
6767
# Note that CUDA support is off by default. To turn it on, the user has to

0 commit comments

Comments
 (0)