MPI_GROUP_FREE(3)
π
MPI_GROUP_FREE(3) β the MPI_Group_free glow-up π¦
okay bestie, so this is a page from Open MPI (that's the manual collection it lives in, MPI_GROUP_FREE(3) is the whole vibe) and honestly? it's a short one. it's literally about letting a group go. self-care for handles, periodt. β¨
πΈ NAME πΈ
MPI_Group_free β frees a group. that's it. that's the whole thing. she releases the group and moves on. π
π SYNTAX π
C Syntax
#include <mpi.h>
int MPI_Group_free(MPI_Group *group)
Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_GROUP_FREE(GROUP, IERROR)
INTEGER GROUP, IERROR
Fortran 2008 Syntax
USE mpi_f08
MPI_Group_free(group, ierror)
TYPE(MPI_Group), INTENT(INOUT) :: group
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
three flavours, same energy π
π INPUT/OUTPUT PARAMETER π
groupβ the group handle. it goes in and it comes out, because that's literally why it's an input/output situation β the call is gonna touch it (see the note below, iykyk π).
π«Ά OUTPUT PARAMETER π«Ά
ierrorβ Fortran only, bestie: the error status, and it's an integer. C girlies get their error as the function's return value instead, we don't make the rules π
π DESCRIPTION π
okay so what this operation actually does: it marks a group object for deallocation. not "instantly vaporizes", not "yeets it into the sun" β it marks it. the handle group is set to MPI_GROUP_NULL by the call. and listen, if some ongoing operation is still using this group? it will complete normally. no drama, no chaos, no ripped-out rug. the vibe check passes. π
β NOTE β
just in case you scrolled past it: on return, group is set to MPI_GROUP_NULL. that's the whole note. it's important enough to say twice, clearly. π―
π₯ ERRORS π₯
almost all MPI routines return an error value β C routines as the return result of the function, and Fortran routines in the last argument. so yeah, check it, bestie. π
before that error value gets returned, the current MPI error handler associated with the communication object (e.g., communicator, window, file) gets called. and if there's no communication object associated with the MPI call? then the call is considered attached to MPI_COMM_SELF and it'll call the associated MPI error handler. when MPI_COMM_SELF is not initialized (i.e., before MPI_Init/MPI_Init_thread, after MPI_Finalize, or when using the Sessions Model exclusively) the error raises the initial error handler. and that initial error handler can be changed by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when using the World model, or the mpi_initial_errhandler CLI argument to mpiexec or info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. if no other appropriate error handler has been set, then MPI_ERRORS_RETURN is called for MPI I/O functions and MPI_ERRORS_ABORT is called for all other MPI functions. π it's a whole pipeline, I know.
Open MPI ships three predefined error handlers you can use:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. yes, ALL of them. nuclear option, no cap πMPI_ERRORS_ABORTβ an error handler that can be invoked on a communicator, window, file, or session. when called on a communicator, it acts as ifMPI_Abortwas called on that communicator. if called on a window or file, it acts as ifMPI_Abortwas called on a communicator containing the group of processes in the corresponding window or file. if called on a session, it aborts only the local process. context-aware queen πMPI_ERRORS_RETURNβ returns an error code to the application. the polite one π«Ά
MPI applications can also implement their own error handlers by calling:
MPI_Comm_create_errhandlerthenMPI_Comm_set_errhandlerMPI_File_create_errhandlerthenMPI_File_set_errhandlerMPI_Session_create_errhandlerthenMPI_Session_set_errhandleror atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
β οΈ note that MPI does not guarantee that an MPI program can continue past an error. like, it might just not. be aware. fr fr.
see the MPI man page for a full list of MPI error codes. π
see the Error Handling section of the MPI-3.1 standard for more information. π
π COPYRIGHT π
2003-2026, The Open MPI Community
and that's the page, bestie!! πβ¨ brought to you by the Open MPI girlies, dated Sep 11, 2026 β go free those groups responsibly, mwah ππ
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms