NAME
MMPPIIGGeettaaddddrreessss - Gets the address of a location in memory.
SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPIGetaddress(void *location, MPIAint *address) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPIGETADDRESS(LOCATION, ADDRESS, IERROR)
LOCATION(*) INTEGER ADDRESS, IERROR
CC++++ SSyynnttaaxx#include
MPI::Aint MPI::Getaddress(void* location) IINNPPUUTT PPAARRAAMMEETTEERRSS location Location in caller memory (choice). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS address Address of location (integer).IERROR Fortran only: Error status (integer).
DESCRIPTION
MPIGetaddress returns the byte address of a location in memory. Example: Using MPIGetaddress for an array. EAL A(100,100) INTEGER I1, I2, DIFFCALL MPIGETADDRESS(A(1,1), I1, IERROR)
CALL MPIGETADDRESS(A(10,10), I2, IERROR)
DIFF = I2 - I1
! The value of DIFF is 909*sizeofreal; the values of I1 and I2 are ! implementation dependent. NNOOTTEESSCurrent Fortran MPI codes will run unmodified and will port to any sys-
tem. However, they may fail if addresses larger than 2^32 - 1 are used
in the program. New codes should be written so that they use the new functions. This provides compatibility with C/C++ and avoids errors on64-bit architectures. However, such newly written codes may need to be
(slightly) rewritten to port to old Fortran 77 environments that do not support KIND declarations. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
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. Open MPI 1.2 September 2006 MPIGetaddress(3OpenMPI)