8.4.3. Communicator Destructors

PreviousUpNext
Up: Communicator Management Next: Communicator Info Previous: Communicator Constructors

MPI_COMM_FREE(comm)
INOUT commcommunicator to be destroyed (handle)
C binding
int MPI_Comm_free(MPI_Comm *comm)
Fortran 2008 binding
MPI_Comm_free(comm, ierror)

TYPE(MPI_Comm), INTENT(INOUT) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_COMM_FREE(COMM, IERROR)

INTEGER COMM, IERROR

This collective operation marks the communication object for deallocation. Any operations that use the communicator comm (whether active or inactive at the time of this procedure call) will continue to work; the object is actually deallocated only if there are no other active references to it. The handle is set to MPI_COMM_NULL in the calling MPI process. This call applies to intra- and inter-communicators. The delete callback functions for all cached attributes (see Section Caching) are called in arbitrary order.


Advice to implementors.

Though collective, it is anticipated that this operation will normally be implemented to be local, though a debugging version of an MPI library might choose to synchronize. ( End of advice to implementors.)


PreviousUpNext
Up: Communicator Management Next: Communicator Info Previous: Communicator Constructors


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023