Skip to content

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
bosilca added a commit to bosilca/ompi that referenced this pull request Jul 10, 2025
This PR complements open-mpi#13276 to add support for MPI_*_get_name for
predefined NULL objects (MPI_DATATYPE_NULL and MPI_WIN_NULL) as
requested in MPI 4.1 chapter B 1.2 item 18.

Fixes open-mpi#12079.

Signed-off-by: George Bosilca <[email protected]>
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