Fix the code coverage for mpi error paths#101
Merged
danielhollas merged 1 commit intomasterfrom Mar 31, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #101 +/- ##
==========================================
+ Coverage 85.24% 86.06% +0.82%
==========================================
Files 42 42
Lines 5821 5813 -8
==========================================
+ Hits 4962 5003 +41
+ Misses 859 810 -49
|
Do not call MPI_Abort for TC MPI interface, since it screws up code coverage, and it is not needed anyway since we only have one MPI process. Add a test case for failing REMD.
1600ad3 to
f14c422
Compare
danielhollas
commented
Mar 31, 2022
| ! For REMD, we need to ensure that all replicas are stopped, | ||
| ! so MPI_Abort is safer. | ||
| if (error_code /= 0 .and. get_mpi_size() > 1) then | ||
| call MPI_Abort(MPI_COMM_WORLD, error_code, ierr) |
Contributor
Author
There was a problem hiding this comment.
This line is in fact covered by the new REMD test case, but Codecov does not see it. I Guess that MPI_Abort is so aggressive that it somehow stops the code coverage generation prematurely.
suchanj
approved these changes
Mar 31, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up on #97. Do not call
MPI_Abort()for TC-MPI interface, since it screws up code coverage for some reason (very strange 😱), and it is not needed anyway since we only have one MPI process.Add a test case for failing REMD.
Also minor cleanup in
remd_init().