MPI_Session_get_pset_info(3)
π MPI_Session_get_pset_info π
okay bestie, gather round, it's time for another MPI manual page and this one is literally so useful. Welcome to MPI_Session_get_pset_info(3), from the MPI manual, third section, iykyk. β¨
πΈ NAME πΈ
MPI_Session_get_pset_info β get the info associated with the processes set π«Ά
like, it hands you the tea about a process set. that's it, that's the job.
π SYNOPSIS π
int MPI_Session_get_pset_info(MPI_Session session, const char *pset_name,
MPI_Info *info)
look at that signature. so clean. so iconic. π
π¦ INPUT PARAMETERS π¦
sessionβ the session (handle) πpset_nameβ name of process set (string) π₯
π OUTPUT PARAMETERS π
infoβ info object containing information about the given process set (handle) β¨
π THREAD AND INTERRUPT SAFETY π
This routine is thread-safe. π What that means, bestie: multiple threads can use it at the same time and you do not need to bring your own thread locks. No user-provided locking era. nope!
However β and this is the part where I grab your shoulders β the routine is not interrupt safe. π Typically this is because it uses memory allocation routines like malloc or other non-MPICH runtime routines, and those are themselves not interrupt-safe. so like, don't get cute with signals, fr fr.
π§ 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 are invoked with the call statement. periodt.
All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran. π
π 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 the value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job. π¨
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 (ma'am that is old news, we don't do that anymore π
). 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. π
here's the error code lineup, star by star:
MPI_SUCCESSβ No error; MPI routine completed successfully. βMPI_ERR_ARGβ Invalid argument. Some argument is invalid and is not identified by a specific error class (e.g.,MPI_ERR_RANK). π΅MPI_ERR_SESSIONβ Invalid session handle π«MPI_ERR_OTHERβ Other error; useMPI_Error_stringto get more information about this error code. π
and that's the whole vibe check, bestie. You now know MPI_Session_get_pset_info better than it knows itself. go forth and slay π
π
this page is from MPI, dated 4/10/2026, and it's MPI_Session_get_pset_info(3) β mwah, iconic, no notes πβ¨
π¦ 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