Skip to content

docs: add note on how to write MPI tests #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/src/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,23 @@ should confirm your MPI implementation to have the ROCm support (AMDGPU) enabled
your ROCm-aware MPI implementation to use multiple AMD GPUs (one GPU per rank).

The status of ROCm (AMDGPU) support cannot currently be queried.

## Writing MPI tests

It is recommended to use the `mpiexec()` wrapper when writing your package tests in `runtests.jl`:

```julia
# test/runtests.jl
using MPI
using Test

@testset "hello" begin
n = 2 # number of processes
mpiexec() do exe # MPI wrapper
run(`$exe -n $n $(Base.julia_cmd()) [...]/01-hello.jl`)
# alternatively:
# p = run(ignorestatus(`...`))
# @test success(p)
end
end
```