Skip to content

comm_get_name: allow MPI_COMM_NULL as argument #13276

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
May 25, 2025

Conversation

edgargabriel
Copy link
Member

MPI 4.1 explicitely allows MPI_COMM_NULL as an argument to MPI_Comm_get_name. Hence, adjust the argument checking accordingly.

Fixes Issue #12079

if ( ompi_comm_invalid ( comm ) )
/* Note that MPI 4.1. explicitely allows to invoke comm_get_name
on MPI_COMM_NULL */
if (ompi_comm_invalid(comm) && MPI_COMM_NULL != comm)
Copy link
Member

Choose a reason for hiding this comment

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

Assumedly the rest of this function will work properly if MPI_COMM_NULL is passed (e.g., return the string MPI_COMM_NULL)?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I tested it :-)

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.

Can you squash?

MPI 4.1 explicitely allows MPI_COMM_NULL as an argument to MPI_Comm_get_name. Hence, adjust the argument checking accordingly.

Fixes Issue open-mpi#12079

Signed-off-by: Edgar Gabriel <[email protected]>
Co-authored-by: Jeff Squyres <[email protected]>
@edgargabriel edgargabriel force-pushed the topic/comm-null-name branch from 8bb26fa to abd5c65 Compare May 25, 2025 21:19
@edgargabriel edgargabriel merged commit 4453cf3 into open-mpi:main May 25, 2025
15 checks passed
@edgargabriel edgargabriel deleted the topic/comm-null-name branch May 25, 2025 21:59
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.

2 participants