Commit 9f1d313
committed
Fix predefined datatype initialization/finalization
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 <t-kawashima@fujitsu.com>1 parent 7948278 commit 9f1d313
1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
551 | 553 | | |
552 | 554 | | |
553 | 555 | | |
| |||
653 | 655 | | |
654 | 656 | | |
655 | 657 | | |
656 | | - | |
| 658 | + | |
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
| |||
676 | 678 | | |
677 | 679 | | |
678 | 680 | | |
679 | | - | |
| 681 | + | |
680 | 682 | | |
681 | 683 | | |
682 | 684 | | |
| |||
0 commit comments