IBM Books

MPI Subroutine Reference

MPI_ADDRESS, MPI_Address

Purpose

Returns the address of a variable in memory.

C synopsis

#include <mpi.h>
int MPI_Address(void* location,MPI_Aint *address);

FORTRAN synopsis

include 'mpif.h' or use mpi
MPI_ADDRESS(CHOICE LOCATION,INTEGER ADDRESS,INTEGER IERROR)

Parameters

location
is the location in caller memory (choice) (IN)

address
is the address of location (integer) (OUT)

IERROR
is the FORTRAN return code. It is always the last argument.

Description

This subroutine returns the byte address of location.

Notes

MPI_GET_ADDRESS supersedes MPI_ADDRESS.

The FORTRAN MPI_ADDRESS binding is not valid for 64-bit FORTRAN programs because it is not possible to predict when an address will fit in 32 bits.

On the IBM RS/6000 SP, MPI_ADDRESS is equivalent to address= (MPI_Aint) location in C, but this subroutine is portable to processors with less straightforward addressing.

Errors

MPI not initialized

MPI already finalized

Related information

MPI_TYPE_HINDEXED
MPI_TYPE_INDEXED
MPI_TYPE_STRUCT


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]