-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature support testing for IAllreduce and IReduce for GPU backends
- Loading branch information
Showing
4 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include("common.jl") | ||
|
||
MPI.Init() | ||
|
||
# Those MPI calls may be unsupported features (e.g. for GPU backends), and will raise SIGSEGV | ||
# (or a similar signal) when called, which cannot be handled in Julia in a portable way. | ||
|
||
op = ARGS[1] | ||
if op == "IAllreduce" | ||
# IAllreduce is unsupported for CUDA with OpenMPI + UCX | ||
# See https://docs.open-mpi.org/en/main/tuning-apps/networking/cuda.html#which-mpi-apis-do-not-work-with-cuda-aware-ucx | ||
send_arr = ArrayType(zeros(Int, 1)) | ||
recv_arr = ArrayType{Int}(undef, 1) | ||
synchronize() | ||
req = MPI.IAllreduce!(send_arr, recv_arr, +, MPI.COMM_WORLD) | ||
MPI.Wait(req) | ||
|
||
elseif op == "IReduce" | ||
# IAllreduce is unsupported for CUDA with OpenMPI + UCX | ||
send_arr = ArrayType(zeros(Int, 1)) | ||
recv_arr = ArrayType{Int}(undef, 1) | ||
synchronize() | ||
req = MPI.IReduce!(send_arr, recv_arr, +, MPI.COMM_WORLD; root=0) | ||
MPI.Wait(req) | ||
|
||
else | ||
error("unknown test: $op") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters