-
Notifications
You must be signed in to change notification settings - Fork 9
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
510 - Assert-fail if MPI functions are accessed inside scheduled callbacks from within VT #792
Conversation
518333a
to
85c15aa
Compare
Codecov Report
@@ Coverage Diff @@
## develop #792 +/- ##
===========================================
+ Coverage 80.02% 80.07% +0.04%
===========================================
Files 342 343 +1
Lines 10696 10724 +28
===========================================
+ Hits 8560 8587 +27
- Misses 2136 2137 +1
|
85c15aa
to
f0dd2e0
Compare
Looks like this is headed in the right direction. Could we get a negative test added to ensure that the guards actually catch an undesired call? |
This comment has been minimized.
This comment has been minimized.
Guess that's 'ASSERT_DEATH' :| |
f0dd2e0
to
82a5a39
Compare
It looks like you lost some of Paul's changes - there are things he's commented as done, that are back to what I'd remarked on as needing to change |
- The casing of the value can differ between environments. (Despite documentation claims of allowed values.)
72a269e
to
10bfe63
Compare
- All symbols now included to prevent breaking CMake/gtest regex scanning. - Using MPI_Test for more reliable failure detection. - Includes when access is explicitly granted in positive case.
457fca5
to
d818865
Compare
- Excluded from generation by request. Also added MPI_Wticks for parity with MPI_Wtime. - Guard exclusions can be specified via regular expression patterns.
83e728f
to
11c2fe3
Compare
- Not needed, got re-included. The code in these handlers is expected to run in a context where MPI is used.
I've generated and pushed a full list of 3.1 that includes the missing calls from before. |
bc7ea01
to
64faf90
Compare
Clones added
============
- src/vt/messaging/active.cc 2
See the complete overview on Codacy |
When running in a non-release build, MPI access guard will be enabled by default.
These access guards utilize PMPI (ie. exposing MPI symbols first from VT) to intercept MPI calls.
If enabled, a call to [almost] any MPI_* function from a scheduler-executed handler will trigger a vtAssert. (Various MPI calls, such as WTime, Test, Probe, Get_count are excluded from checks for simplification of usages and benign or non-solo nature.)
Code inside VT explicitly grants itself scoped access to MPI functions via RAII hidden behind a conditional macro.
As an alternative/extension to the scope access, could also expose internal
vt_MPI_xyz
wrappers that would bypass (or disable the guard internally) and use those throughout VT. Would be trivial macro toMPI_xyz
when disabled. It also might be possible to do similar withconst auto vt_MPI_xyz = MPI_xyz;
and rely on an optimizing compiler to elide the proxy call in release build (not guarded) cases.Fixes #510