MPI_ADDRESS(3)
π MPI_ADDRESS π
okay bestie, listen β this is the Open MPI man page for MPI_Address, and it is literally an iconic little routine that gets the address of a location in memory... except it's deprecated in favor of MPI_Get_address. we'll get to that. sit down, hydrate, let's go β¨
πΈ NAME πΈ
MPI_Address β gets the address of a location in memory β and no cap, this routine is deprecated in favor of MPI_Get_address. π
π SYNTAX π
β¨ C Syntax β¨
#include <mpi.h>
int MPI_Address(void *location, MPI_Aint *address)
π¦ Fortran Syntax π¦
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_ADDRESS(LOCATION, ADDRESS, IERROR)
<type> LOCATION (*)
INTEGER ADDRESS, IERROR
like yes, she's vintage, she's serving old-school compilation units π§
π INPUT PARAMETER π
locationβ a location in caller memory, and the type is choice (so, like, whatever type you want, she's flexible, main character energy). π
π«Ά OUTPUT PARAMETERS π«Ά
addressβ the address oflocation, and it's an integer. slay. πierrorβ Fortran only: error status, as an integer. the Fortran girlies get their own little error slot, and we love that for them. β
π DESCRIPTION π
not me having to be the one to tell you this, but... use of this routine is deprecated as of MPI-2. π
please use MPI_Get_address instead. fr fr. that's the whole tea. π
π ERRORS π
okay so basically almost all MPI routines return an error value: C routines hand it back as the return result of the function, and Fortran routines put it in that last argument. periodt.
Before the error value is returned, the current MPI error handler associated with the communication object (like a communicator, window, or file β iykyk) gets called. If there's no communication object associated with the MPI call, then the call is considered attached to MPI_COMM_SELF and it will call the associated MPI error handler. π
And when MPI_COMM_SELF is not initialized β meaning 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. lowkey important. π
That initial error handler can be changed by:
- calling
MPI_Comm_set_errhandleronMPI_COMM_SELFwhen using the World model, or - the
mpi_initial_errhandlerCLI argument tompiexec, or - the info key to
MPI_Comm_spawn/MPI_Comm_spawn_multiple.
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. β¨
Open MPI includes three predefined error handlers that can be used:
MPI_ERRORS_ARE_FATALβ causes the program to abort all connected MPI processes. dramatic? yes. effective? also yes. π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. 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_errhandleror atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
note that MPI does not guarantee that an MPI program can continue past an error. this is not a drill, bestie. π¨
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.
See also:
MPI_Get_address
π Copyright π
2003-2026, The Open MPI Community
and that's the whole page, bestie!! π go forth and use MPI_Get_address instead, love her, respect her, she's the upgrade π
this scoop of a page came from Open MPI, dated Sep 10, 2026, and it bears the copyright of 2003-2026, The Open MPI Community β mwah, iconic, no notes. πβ¨
π¦ 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