Skip to content

MPI4: implement mpi_isendrecv and variant #9667

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
Jan 25, 2022

Conversation

hppritcha
Copy link
Member

Signed-off-by: Howard Pritchard howardp@lanl.gov

@ggouaillardet
Copy link
Contributor

@hppritcha at first glance, that looks good to me.

I am just wondering if adding a ompi_status_public_t *statuses[OMPI_COMM_REQUEST_MAX_SUBREQ] field to ompi_comm_request_item_t is the best strategy (my main concern is memory overhead).
Could we simple not use this field and let the status attached to the subrequest?
Then at MPI_Wait() time, the status will be copied from the subrequest to the main request.

I did not check the full specification, but if for example irecv() works but isend() has an error, should we "return" the error status of isend() instead of the successful status of irecv()?

@bosilca
Copy link
Member

bosilca commented Nov 16, 2021

Unfortunately what error to return is as well defined as for MPI_Sendrecv. But from a logical perspective it makes more sense to return the status of the receive part of the communication, as the status for a receive contains more information than the send. Plus, what really matters for the send is that the buffer can be modified.

@hppritcha hppritcha force-pushed the topic/add_isendrecv_variants branch from b0416f3 to 608abd5 Compare November 21, 2021 00:54
@hppritcha hppritcha force-pushed the topic/add_isendrecv_variants branch from 608abd5 to 509b87e Compare November 29, 2021 17:51
@hppritcha hppritcha force-pushed the topic/add_isendrecv_variants branch from 509b87e to 8e976a1 Compare December 21, 2021 20:14
@hppritcha hppritcha requested review from jsquyres and removed request for ggouaillardet January 11, 2022 16:31
Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to #9707, I think this PR is missing the mpi module bindings (both tkr and ignore-tkr).

@hppritcha hppritcha force-pushed the topic/add_isendrecv_variants branch from b4c3b89 to 669cd10 Compare January 19, 2022 19:42
@hppritcha hppritcha requested review from jsquyres and removed request for kawashima-fj January 19, 2022 21:02
Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Can you squash?

@hppritcha hppritcha requested review from kawashima-fj and removed request for kawashima-fj January 24, 2022 17:26
@hppritcha hppritcha dismissed kawashima-fj’s stale review January 25, 2022 16:04

all points have been addressed

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
@hppritcha hppritcha force-pushed the topic/add_isendrecv_variants branch from 669cd10 to 47c8063 Compare January 25, 2022 16:08
@hppritcha hppritcha merged commit c7c24e4 into open-mpi:master Jan 25, 2022
Copy link
Member

@kawashima-fj kawashima-fj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hppritcha I'm sorry I' late. I added additional comments.

Comment on lines +155 to +156
OMPI_SPC_ISENDRECV,
OMPI_SPC_ISENDRECV_REPLACE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment of this enum (line 26-33) says:

/* INSTRUCTIONS FOR ADDING COUNTERS
 * 1.) Add a new counter name in the ompi_spc_counters_t enum before
 *     OMPI_SPC_NUM_COUNTERS below.
 * 2.) Add corresponding counter name and descriptions to the
 *     counter_names and counter_descriptions arrays in
 *     ompi_spc.c  NOTE: The names and descriptions
 *     MUST be in the same array location as where you added the
 *     counter name in step 1.

Though I don't know detail of SPC, according to this comment, you need to insert lines in the same position in ompi_spc_counters in ompi_spc.h and ompi_spc_events_desc in ompi_spc.c

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kawashima-fj thanks for noting this. i'll open a PR to patch this.

Comment on lines +100 to +101
OMPI_COPY_STATUS(&request->super.req_status,
context->subreq[0]->req_status, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you forgot to erase these two lines when you inserted line 91-97.

.nf
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_SENDRECV_REPLACE(\fIBUF, COUNT, DATATYPE, DEST, SENDTAG, SOURCE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing I before SENDRECV.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks I'll file a PR to fix this too.

hppritcha added a commit to hppritcha/ompi that referenced this pull request Jan 26, 2022
see review comments for PR open-mpi#9667

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
hppritcha added a commit to hppritcha/ompi that referenced this pull request Jan 26, 2022
per review feedback for PR open-mpi#9667

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
hppritcha added a commit to hppritcha/ompi that referenced this pull request Jan 31, 2022
see review comments for PR open-mpi#9667

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
(cherry picked from commit 1babb92)
hppritcha added a commit to hppritcha/ompi that referenced this pull request Jan 31, 2022
per review feedback for PR open-mpi#9667

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
(cherry picked from commit b2183d3)
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