ompi/datatype: Fix predefined datatype initialization/finalization #8415
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.
There were three bugs in the source code.
ompi_datatype_number_of_predefined_datawas one less becauseit tracked the last f2c index number which starts with zero.
(
ompi_datatype_number_of_predefined_datais used in theompi_datatype_match_sizefunction and it expects the number,not the index.)
forloops did not visitompi_mpi_countbecause thecomparison is
<for the index, not<=.forloops did not visit four datatypes which were addedafter
ompi_mpi_count.I don't know whether these are real (user-observable) bugs.