MPI_GROUP_TRANSLATE_RANKS(3)
π MPI_GROUP_TRANSLATE_RANKS(3) π
okay bestie, welcome to the Open MPI corner of the man pages β this one's MPI_Group_translate_ranks, and it's literally the rank-translation queen π
β¨ SYNOPSIS β¨
πΈ C Syntax
#include <mpi.h>
int MPI_Group_translate_ranks(MPI_Group group1, int n,
const int ranks1[], MPI_Group group2, int ranks2[])
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_GROUP_TRANSLATE_RANKS(GROUP1, N, RANKS1, GROUP2, RANKS2,
IERROR)
INTEGER GROUP1, N, RANKS1(*), GROUP2, RANKS2(*), IERROR
π¦ Fortran 2008 Syntax
USE mpi_f08
MPI_Group_translate_ranks(group1, n, ranks1, group2, ranks2, ierror)
TYPE(MPI_Group), INTENT(IN) :: group1, group2
INTEGER, INTENT(IN) :: n, ranks1(n)
INTEGER, INTENT(OUT) :: ranks2(n)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π INPUT PARAMETERS π
group1β the first group, as a handle. the OG group, the one you're translating from π«Άnβ how many ranks live in theranks1andranks2arrays (an integer, no cap fr)ranks1β an array of zero or more valid ranks ingroup1. yes, zero is allowed, she's flexible like that β¨group2β the second group, also a handle. the destination group, the glow-up group π
π OUTPUT PARAMETERS π
ranks2β the array of corresponding ranks over ingroup2, and it's set toMPI_UNDEFINEDwhenever no correspondence exists (aka when a rank ingroup1has no matching buddy ingroup2π)ierrorβ Fortran only, bestie: the error status (integer)
π DESCRIPTION π
so this function is important β like, main character energy β because it's how you figure out the relative numbering of the same processes across two different groups. ngl, this is the whole point.
for instance: if you know the ranks of certain processes in the group of MPI_COMM_WORLD, you might want to know what their ranks are in a subset of that group. that's it, that's the vibe. translate the rank, get the answer, slay π₯
π ERRORS π
okay so almost all MPI routines return an error value β C routines hand it back as the function's return result, and Fortran routines tuck it into the last argument. periodt.
before that error value gets returned, the current MPI error handler associated with the communication object (e.g., communicator, window, file) is called. and if there's no communication object associated with the MPI call, then the call counts as attached to MPI_COMM_SELF and will 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. the 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. and if no other appropriate error handler has been set, then the MPI_ERRORS_RETURN error handler is called for MPI I/O functions and the MPI_ERRORS_ABORT error handler is called for all other MPI functions. iykyk π
Open MPI includes three predefined error handlers that can be used:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes π like, everyone. gone.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.MPI_ERRORS_RETURNβ returns an error code to the application π«Ά
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
β οΈ heads up bestie: note that MPI does not guarantee that an MPI program can continue past an error. like, do not assume you can just walk it off π
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 whole page, bestie π this was MPI_GROUP_TRANSLATE_RANKS(3) from Open MPI, dated Sep 11, 2026 β the copyright belongs to 2003-2026, The Open MPI Community, and honestly? iconic of them. go translate some ranks, you've got this β¨ππ¦
π¦ 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