MPI_Session_get_nth_pset(3)
π MPI_Session_get_nth_pset β get the nth process set π
okay bestie, welcome to the MPI manual (section 3, the library-calls girlies β¨). Today's main character is MPI_Session_get_nth_pset, and she does exactly one thing: she hands you the name of the *n*th process set. no cap. π
β¨ NAME β¨
MPI_Session_get_nth_pset β Get the nth processes set π¦
πΈ SYNOPSIS πΈ
int MPI_Session_get_nth_pset(MPI_Session session, MPI_Info info, int n,
int *pset_len, char *pset_name)
π INPUT PARAMETERS π
sessionβ the session, babes. it's a handle. πinfoβ an info object. also a handle. πnβ the index of the process set name you're craving (an integer, obviously). β¨
π«Ά INPUT/OUTPUT PARAMETERS π«Ά
pset_lenβ the length of thepset_lenβ¦ wait no, the length of thepset_nameargument. it's an integer, and she's both an input and an output, so she's giving versatile π. (yes the original really does writepset_lenwith an escaped underscore:pset\_name. we love a quirky legend.)
π OUTPUT PARAMETERS π
pset_nameβ the name of the nth process set. it's a string, she's the prize at the end of the scavenger hunt π
π§ THREAD AND INTERRUPT SAFETY π§
This routine is thread-safe. which means you can absolutely let multiple threads hit it at the same time, no user-provided thread locks required, she can handle the group chat solo π β¨
But β and this is the important part β the routine is not interrupt safe. typically that's because it uses memory allocation routines like malloc, or other non-MPICH runtime routines that are themselves not interrupt-safe. so yeah. lowkey it's giving "don't interrupt me while I'm allocating" π
π NOTES FOR FORTRAN π
All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK) have an additional argument ierr at the end of the argument list. ierr is an integer and has the same meaning as the return value of the routine in C. In Fortran, MPI routines are subroutines, and they're invoked with the call statement. fr fr.
All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. periodt. π₯
π ERRORS π
All MPI routines (except MPI_Wtime and MPI_Wtick) return an error value; C routines as the value of the function and Fortran routines in the last argument. Before that value comes back to you, the current MPI error handler gets called. By default, this error handler aborts the MPI job β like, full dramatic exit, everyone out π. The error handler may be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). The MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated (we do not stan). The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible. π«Ά
MPI_SUCCESSβ no error; the MPI routine completed successfully. slay, we love a clean run β¨MPI_ERR_ARGβ invalid argument. some argument is invalid and is not identified by a specific error class (e.g.,MPI_ERR_RANK). something's off and we can't even tell you which thing πMPI_ERR_INFOβ invalid Info πMPI_ERR_SESSIONβ invalid session handle πMPI_ERR_OTHERβ other error; useMPI_Error_stringto get more information about this error code. the catch-all bestie who says "idk askMPI_Error_string" π
and that's the whole page, no notes π
this was from the MPI manual, dated 4/10/2026, page MPI_Session_get_nth_pset(3) β mwah, go forth and get your nth process set, bestie π¦πΈβ¨
π¦ where this page comes from
- nixos 26.05: mpich 5.0.1
- ubuntu stonking: mpich-doc 5.0.1-9 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms