Skip to content

single_predefined_type with MPI_LB/UB #4302

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

Merged
merged 1 commit into from
Mar 28, 2018
Merged

Conversation

markalle
Copy link
Contributor

@markalle markalle commented Oct 4, 2017

The ompi_datatype_get_single_predefined_type_from_args() recurses down
into a constructed type to identify what base datatype it's built from
if it's built from a single type. But if the type has MPI_LB/MPI_UB,
for example
lens[0] = 1;
lens[1] = 1;
disps[0] = 0;
disps[1] = 0;
types[0] = MPI_LB;
types[1] = MPI_INT;
MPI_Type_create_struct(2, lens, disps, types, &mydt);
then this function will see the base type MPI_LB as differing from MPI_INT
and will identify mydt as not being constructed from a single base type, so
the type will be rejected for calls like MPI_Accumulate.

I think those "meta data" types shouldn't result in rejection like that, and
the above mydt should still be identified as having a single base type
of MPI_INT.

Addition: boslica wanted another change discussed here
#3609
relating to the calculation for "count" after identifying the
predefined_type that was being used.

Signed-off-by: Mark Allen [email protected]
(cherry picked from commit e24d5cc)
Signed-off-by: Mark Allen [email protected]

The ompi_datatype_get_single_predefined_type_from_args() recurses down
into a constructed type to identify what base datatype it's built from
if it's built from a single type.  But if the type has MPI_LB/MPI_UB,
for example
    lens[0] = 1;
    lens[1] = 1;
    disps[0] = 0;
    disps[1] = 0;
    types[0] = MPI_LB;
    types[1] = MPI_INT;
    MPI_Type_create_struct(2, lens, disps, types, &mydt);
then this function will see the base type MPI_LB as differing from MPI_INT
and will identify mydt as not being constructed from a single base type, so
the type will be rejected for calls like MPI_Accumulate.

I think those "meta data" types shouldn't result in rejection like that, and
the above mydt should still be identified as having a single base type
of MPI_INT.

Addition: boslica wanted another change discussed here
    open-mpi#3609
relating to the calculation for "count" after identifying the
predefined_type that was being used.

Signed-off-by: Mark Allen <[email protected]>
(cherry picked from commit e24d5cc)
Signed-off-by: Mark Allen <[email protected]>
@gpaulsen
Copy link
Member

gpaulsen commented Dec 4, 2017

@bosilca, can you please take a look?

@gpaulsen gpaulsen requested a review from bosilca December 4, 2017 19:17
@hjelmn hjelmn added this to the v3.1.0 milestone Mar 21, 2018
@bwbarrett
Copy link
Member

This popped up recently on the 3.1 list. @bosilca and @markalle, is this still desired for 3.1?

@bosilca
Copy link
Member

bosilca commented Mar 27, 2018

Absolutely it should go in 3.1

@bwbarrett bwbarrett merged commit 8c4c4b2 into open-mpi:v3.1.x Mar 28, 2018
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.

5 participants