Skip to content

Conversation

@kawashima-fj
Copy link
Member

There were three bugs in the source code.

  • ompi_datatype_number_of_predefined_data was one less because
    it tracked the last f2c index number which starts with zero.
    (ompi_datatype_number_of_predefined_data is used in the
    ompi_datatype_match_size function and it expects the number,
    not the index.)
  • Two for loops did not visit ompi_mpi_count because the
    comparison is < for the index, not <=.
  • Two for loops did not visit four datatypes which were added
    after ompi_mpi_count.

I don't know whether these are real (user-observable) bugs.

@kawashima-fj
Copy link
Member Author

@bosilca Could you review?

@bosilca
Copy link
Member

bosilca commented Feb 1, 2021

sorry @kawashima-fj I reviewed this last week but I forgot to press submit.

There were three bugs.

- `ompi_datatype_number_of_predefined_data` was one less because
  it tracked the last f2c index number which starts with zero.
  (`ompi_datatype_number_of_predefined_data` is used in the
  `ompi_datatype_match_size` function and it expects the number,
  not the index.)
- Two `for` loops did not visit `ompi_mpi_count` because the
  comparison is `<` for the index, not `<=`.
- Two `for` loops did not visit four datatypes which were added
  after `ompi_mpi_count`.

And, allow us to add the datatypes not in the monotonically
increasing order.

Signed-off-by: KAWASHIMA Takahiro <[email protected]>
@kawashima-fj kawashima-fj force-pushed the fix-predef-dt-init-fini branch from d074ce0 to 9f1d313 Compare February 3, 2021 13:20
@jjhursey
Copy link
Member

jjhursey commented Feb 3, 2021

bot:ibm:retest

@open-mpi open-mpi deleted a comment from ibm-ompi Feb 3, 2021
@open-mpi open-mpi deleted a comment from ibm-ompi Feb 3, 2021
@kawashima-fj
Copy link
Member Author

I run some datatype tests and had no problems.

@bosilca Thanks for your review. Could you approve if you are happy with this change? The PR is still blocked.

@kawashima-fj kawashima-fj merged commit 651e2ed into open-mpi:master Feb 4, 2021
@kawashima-fj kawashima-fj deleted the fix-predef-dt-init-fini branch February 4, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants