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; use MPI_Error_string to 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