MPI_GROUP_COMPARE(3)
π MPI_GROUP_COMPARE(3) β Open MPI π
okay bestie, this is the MPI_Group_compare page from the Open MPI manual, section 3. yes we are reading a manpage together, it's giving study date energy πΈ
short version: it compares two groups. that's it. that's the whole vibe check.
β¨ SYNTAX β¨
π C Syntax
#include <mpi.h>
int MPI_Group_compare(MPI_Group group1, MPI_Group group2,
int *result)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_GROUP_COMPARE(GROUP1, GROUP2, RESULT, IERROR)
INTEGER GROUP1, GROUP2, RESULT, IERROR
π Fortran 2008 Syntax
USE mpi_f08
MPI_Group_compare(group1, group2, result, ierror)
TYPE(MPI_Group), INTENT(IN) :: group1, group2
INTEGER, INTENT(OUT) :: result
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π«Ά INPUT PARAMETERS
group1: the first group, as a handle. bestie number one πgroup2: the second group, as a handle. bestie number two π
π OUTPUT PARAMETERS
result(Integer) β and the way this one works is: it'sMPI_IDENTif the order and the members of the two groups are the same,MPI_SIMILARif only the members are the same, andMPI_UNEQUALotherwise. three possible outcomes, one little int, iconic.ierror: Fortran only β the error status (integer). π
π¦ DESCRIPTION
so here's the tea β
MPI_IDENTshows up if the group members and the group order are exactly the same in both groups. this happens, for instance, ifgroup1andgroup2are literally the same handle. same handle = same everything, no cap.MPI_SIMILARshows up if the group members are the same but the order is different. same people, different seating chart, you know how it is.MPI_UNEQUALshows up otherwise. not the same members, not the same order, not the same anything. it's giving exes. π
π ERRORS
almost all MPI routines return an error value, fr fr. C routines hand it back as the return result of the function, and Fortran routines put it in the last argument.
before that error value comes back to you, the current MPI error handler that's associated with the communication object (like a communicator, window, or file) gets called. and if there's no communication object associated with the MPI call, then the call counts as attached to MPI_COMM_SELF and it'll call the associated MPI error handler. and when MPI_COMM_SELF isn't initialized β i.e., before MPI_Init/MPI_Init_thread, after MPI_Finalize, or when you're using the Sessions Model exclusively β the error raises the initial error handler instead.
you can change that initial error handler by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when you're using the World model, or with the mpi_initial_errhandler CLI argument to mpiexec, or with an info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. and if no other appropriate error handler has been set, then the MPI_ERRORS_RETURN error handler gets called for MPI I/O functions, and the MPI_ERRORS_ABORT error handler gets called for all the other MPI functions. yeah. whole system, honestly.
Open MPI ships three predefined error handlers you can use:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. everyone. gone. πMPI_ERRORS_ABORTβ an error handler that can be invoked on a communicator, window, file, or session. when it's called on a communicator, it acts as ifMPI_Abortwas called on that communicator. if it's 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. and if it's called on a session, it aborts only the local process. context is everything, bestie.MPI_ERRORS_RETURNβ returns an error code to the application. the chill 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_errhandler, or atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
β οΈ note that MPI does not guarantee that an MPI program can continue past an error. so like... plan accordingly. π
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. slay, standards. π
π Copyright
2003-2026, The Open MPI Community
and that's the whole page, bestie!! you understood it, I'm so proud of you π₯Ήπ this was MPI_GROUP_COMPARE(3) from Open MPI, dated Sep 10, 2026. go forth and compare some groups. periodt. π
β¨
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms