JuliaParallel / JuliaParallel/MPI.jl

Allow setting thread level for tests

Open
#690 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
439
Forks
127
Avg merge
19h 6m
Merged PRs (30d)
17

Description

MVAPICH on Ookami doesn't support threading, but we default `MPI.Init` to `threadlevel=:serialized`
https://github.com/JuliaParallel/MPI.jl/blob/a179cf876a52876d297b7e635881dbc7a2f3a81c/src/environment.jl#L81
and this creates a lot of noise when running the tests because each test would print a series of

```
┌ Warning: MPI thread level requested = MPI.ThreadLevel(2), provided = MPI.ThreadLevel(0)
└ @ MPI ~/.julia/dev/MPI/src/environment.jl:96
┌ Warning: MPI thread level requested = MPI.ThreadLevel(2), provided = MPI.ThreadLevel(0)
└ @ MPI ~/.julia/dev/MPI/src/environment.jl:96
┌ Warning: MPI thread level requested = MPI.ThreadLevel(2), provided = MPI.ThreadLevel(0)
└ @ MPI ~/.julia/dev/MPI/src/environment.jl:96
┌ Warning: MPI thread level requested = MPI.ThreadLevel(2), provided = MPI.ThreadLevel(0)
└ @ MPI ~/.julia/dev/MPI/src/environment.jl:96
```

The solution should be as easy as setting the default value of `threadlevel` in `tests/common.jl` and always initialise with `MPI.Init(; threadlevel)` in all tests, the only question is _how_ to let the user choose the threadlevel for the tests. Another environment variable?

Alternatively, have a smarter `threadlevel` default value, but can we query whether the MPI library supports threading before `Init`?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/environment.jl around the default MPI.Init threadlevel and tests/common.jl, then inspect how the tests initialize MPI. Decide how users should select the test threadlevel, such as through a setting or environment variable. Done means all tests use the selected level and avoid repeated warnings on libraries that do not support threading.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
distributed-systems, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.