Skip to content

Commit 854ab87

Browse files
authored
Spectrum MPI, does not have MPIX_Query_cuda_support (#358)
1 parent 2d00fb6 commit 854ab87

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/environment.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,12 @@ or `false`.
172172
function has_cuda()
173173
flag = get(ENV, "JULIA_MPI_HAS_CUDA", nothing)
174174
if flag === nothing
175-
# Only Open MPI provides a function to check CUDA support
176-
@static if startswith(MPI_LIBRARY_VERSION, "Open MPI")
175+
# Only OpenMPI provides a function to check CUDA support
176+
# - Spectrum MPI is an OpenMPI, but IBM removed the functionality
177+
# check, therefore force true
178+
@static if occursin("IBM Spectrum MPI", MPI_LIBRARY_VERSION)
179+
return true
180+
elseif startswith(MPI_LIBRARY_VERSION, "Open MPI")
177181
# int MPIX_Query_cuda_support(void)
178182
return 0 != ccall((:MPIX_Query_cuda_support, libmpi), Cint, ())
179183
else

0 commit comments

Comments
 (0)