Skip to content

Commit 55c7cd4

Browse files
committed
use MPI_LIBRARY_VERSION
1 parent 1bba75d commit 55c7cd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/environment.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ or `false`.
172172
function has_cuda()
173173
flag = get(ENV, "JULIA_MPI_HAS_CUDA", nothing)
174174
if flag === nothing
175-
# Only OpenMPI provides a function to check CUDA support
176-
@static if dlsym_e(dlopen(libmpi), :MPIX_Query_cuda_support) != C_NULL
175+
# Only Open MPI provides a function to check CUDA support
176+
@static if startswith(MPI_LIBRARY_VERSION, "Open MPI")
177177
# int MPIX_Query_cuda_support(void)
178178
return 0 != ccall((:MPIX_Query_cuda_support, libmpi), Cint, ())
179179
else

0 commit comments

Comments
 (0)