Skip to content

What is the exact value of MPI_Comm for processes under the same communicator. #6174

Answered by hzhou
AtlantaPepsi asked this question in Q&A
Discussion options

You must be logged in to vote

You can think MPI_Comm as a pointer to the internal communicator structure MPIR_Comm. It is an integer because we use an internal object memory allocation system, but it is equivalent to a pointer. Each process does not share the address space, thus you should not expect the handle to have the same value for each process. They can coincidentally share the same value depending on the state of the internal memory allocation, but it is purely coincidental. The same handle can refer to objects with no relationship.

The handle is defined by the macro MPIR_OBJECT_HEADER.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@AtlantaPepsi
Comment options

@hzhou
Comment options

@AtlantaPepsi
Comment options

Answer selected by AtlantaPepsi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants