Skip to content

yalla with irregular contig datatype -- Fixes 3566 #3782

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

Conversation

alinask
Copy link
Member

@alinask alinask commented Jun 28, 2017

Yalla has a macro PML_YALLA_INIT_MXM_REQ_DATA that checks if a datatype
is contiguous via opal_datatype_is_contiguous_memory_layout(dt,count)
and if so it selects a size and lb that presumably is what will rdma, as
ompi_datatype_type_size(_dtype, &size);
ompi_datatype_type_lb(_dtype, &lb); \

This failed when I gave it a datatype constructed as [ ...] with extent 4.
What I mean by that datatype is
lens[0] = 3;
disps[0] = 1;
types[0] = MPI_CHAR;
MPI_Type_struct(1, lens, disps, types, &tmpdt);
MPI_Type_create_resized(tmpdt, 0, 4, &mydt);
So there are 3 chars at offset 1, and the LB is 0 and the UB is 4.

So that macro decides that size=4 and lb=0 and later I suppose size is getting
updated to 3 for the final rdma, and so a send of a buffer
[ 0 1 2 3 ] gets recved as [ 0 1 2 _ ]. I think it should use the true lb
and the true extent.

For "regular" contig datatypes it would be the same, and for the irregular
ones that are still deemed contiguous by that utility function it should
still be the right thing to use.

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

Fixes #3566

Yalla has a macro PML_YALLA_INIT_MXM_REQ_DATA that checks if a datatype
is contiguous via opal_datatype_is_contiguous_memory_layout(dt,count)
and if so it selects a size and lb that presumably is what will rdma, as
            ompi_datatype_type_size(_dtype, &size); \
            ompi_datatype_type_lb(_dtype, &lb); \

This failed when I gave it a datatype constructed as [ ...] with extent 4.
What I mean by that datatype is
    lens[0] = 3;
    disps[0] = 1;
    types[0] = MPI_CHAR;
    MPI_Type_struct(1, lens, disps, types, &tmpdt);
    MPI_Type_create_resized(tmpdt, 0, 4, &mydt);
So there are 3 chars at offset 1, and the LB is 0 and the UB is 4.

So that macro decides that size=4 and lb=0 and later I suppose size is getting
updated to 3 for the final rdma, and so a send of a buffer
[ 0 1 2 3 ] gets recved as [ 0 1 2 _ ]. I think it should use the true lb
and the true extent.

For "regular" contig datatypes it would be the same, and for the irregular
ones that are still deemed contiguous by that utility function it should
still be the right thing to use.

Signed-off-by: Mark Allen <[email protected]>
(cherry picked from commit 36f51bc)
@jsquyres jsquyres added this to the v3.0.0 milestone Jun 28, 2017
@jsquyres
Copy link
Member

@hppritcha @bwbarrett This seems like an obvious bug fix for v2.0.x-v3.0.x. Good to go.

@alinask
Copy link
Member Author

alinask commented Jun 28, 2017

@jsquyres Shouldn't the milestone be v2.0.x?

@jsquyres jsquyres modified the milestones: v2.0.4, v3.0.0 Jun 28, 2017
@jsquyres
Copy link
Member

@alinask Thanks; I clicked the wrong milestone by accident. I was just checking to see if you don't have permissions to set milestones, and I think you do... Are you able to set milestones on these issues / PRs? If so, you should probably do so -- the release managers probably won't see an issue / PR unless it's set on an active milestone.

@alinask
Copy link
Member Author

alinask commented Jun 28, 2017

@jsquyres I do and I was going to set it but you were quicker :)

@alinask
Copy link
Member Author

alinask commented Jun 28, 2017

This is a cherry-pick of the fix that @markalle committed to the master branch (#3567).
@jladd-mlnx @yosefe

@hppritcha hppritcha merged commit 234655a into open-mpi:v2.0.x Jun 29, 2017
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