17.1. Deprecated since MPI-2.0

PreviousUpNext
Up: Deprecated Interfaces Next: Deprecated since MPI-2.2 Previous: Deprecated Interfaces

The following function is deprecated and is superseded by MPI_COMM_CREATE_KEYVAL in MPI-2.0. The language independent definition of the deprecated function is the same as that of the new function, except for the function name and a different behavior in the C/Fortran language interoperability, see Section Attributes. The language bindings are modified.

MPI_KEYVAL_CREATE(copy_fn, delete_fn, keyval, extra_state)
IN copy_fnCopy callback function for keyval
IN delete_fnDelete callback function for keyval
OUT keyvalkey value for future access (integer)
IN extra_stateExtra state for callback functions
int MPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void *extra_state)
For this routine, an interface within the mpi_f08 module was never defined.
Fortran binding
MPI_KEYVAL_CREATE(COPY_FN, DELETE_FN, KEYVAL, EXTRA_STATE, IERROR)
EXTERNAL COPY_FN, DELETE_FN
INTEGER KEYVAL, EXTRA_STATE, IERROR

The copy_fn function is invoked when a communicator is duplicated by MPI_COMM_DUP. copy_fn should be of type MPI_Copy_function, which is defined as follows:

typedef int MPI_Copy_function(MPI_Comm oldcomm, int keyval, void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag);

A Fortran declaration for such a function is as follows:

For this routine, an interface within the mpi_f08 module was never defined.

SUBROUTINE COPY_FUNCTION(OLDCOMM, KEYVAL, EXTRA_STATE, ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, FLAG, IERR)
INTEGER OLDCOMM, KEYVAL, EXTRA_STATE, ATTRIBUTE_VAL_IN, ATTRIBUTE_VAL_OUT, IERR
LOGICAL FLAG

copy_fn may be specified as MPI_NULL_COPY_FN or MPI_DUP_FN from either C or Fortran; MPI_NULL_COPY_FN is a function that does nothing other than return flag = 0 and MPI_SUCCESS. MPI_DUP_FN is a simple-minded copy function that sets flag = 1, returns the value of attribute_val_in in attribute_val_out, and returns MPI_SUCCESS. Note that MPI_NULL_COPY_FN and MPI_DUP_FN are also deprecated.

Analogous to copy_fn is a callback deletion function, defined as follows. The delete_fn function is invoked when a communicator is deleted by MPI_COMM_FREE or when a call is made explicitly to MPI_ATTR_DELETE. delete_fn should be of type MPI_Delete_function, which is defined as follows:

typedef int MPI_Delete_function(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state);

A Fortran declaration for such a function is as follows:

For this routine, an interface within the mpi_f08 module was never defined.

SUBROUTINE DELETE_FUNCTION(COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR)

INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, EXTRA_STATE, IERR

delete_fn may be specified as MPI_NULL_DELETE_FN from either C or Fortran; MPI_NULL_DELETE_FN is a function that does nothing other than return MPI_SUCCESS. Note that MPI_NULL_DELETE_FN is also deprecated.

The following function is deprecated and is superseded by MPI_COMM_FREE_KEYVAL in MPI-2.0. The language independent definition of the deprecated function is the same as the new function, except for the function name. The language bindings are modified.

MPI_KEYVAL_FREE(keyval)
INOUT keyvalFrees the integer key value (integer)
C binding
int MPI_Keyval_free(int *keyval)
For this routine, an interface within the mpi_f08 module was never defined.
Fortran binding
MPI_KEYVAL_FREE(KEYVAL, IERROR)

INTEGER KEYVAL, IERROR

The following function is deprecated and is superseded by MPI_COMM_SET_ATTR in MPI-2.0. The language independent definition of the deprecated function is the same as the new function, except for the function name. The language bindings are modified.

MPI_ATTR_PUT(comm, keyval, attribute_val)
INOUT commcommunicator to which attribute will be attached (handle)
IN keyvalkey value, as returned by MPI_KEYVAL_CREATE (integer)
IN attribute_valattribute value
C binding
int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
For this routine, an interface within the mpi_f08 module was never defined.
Fortran binding
MPI_ATTR_PUT(COMM, KEYVAL, ATTRIBUTE_VAL, IERROR)

INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, IERROR

The following function is deprecated and is superseded by MPI_COMM_GET_ATTR in MPI-2.0. The language independent definition of the deprecated function is the same as the new function, except for the function name. The language bindings are modified.

MPI_ATTR_GET(comm, keyval, attribute_val, flag)
IN commcommunicator to which attribute is attached (handle)
IN keyvalkey value (integer)
OUT attribute_valattribute value, unless flag = false
OUT flag true if an attribute value was extracted; false if no attribute is associated with the key
C binding
int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag)
For this routine, an interface within the mpi_f08 module was never defined.
Fortran binding
MPI_ATTR_GET(COMM, KEYVAL, ATTRIBUTE_VAL, FLAG, IERROR)
INTEGER COMM, KEYVAL, ATTRIBUTE_VAL, IERROR
LOGICAL FLAG

The following function is deprecated and is superseded by MPI_COMM_DELETE_ATTR in MPI-2.0. The language independent definition of the deprecated function is the same as the new function, except for the function name. The language bindings are modified.

MPI_ATTR_DELETE(comm, keyval)
INOUT commcommunicator to which attribute is attached (handle)
IN keyvalThe key value of the deleted attribute (integer)
C binding
int MPI_Attr_delete(MPI_Comm comm, int keyval)
For this routine, an interface within the mpi_f08 module was never defined.
Fortran binding
MPI_ATTR_DELETE(COMM, KEYVAL, IERROR)

INTEGER COMM, KEYVAL, IERROR


PreviousUpNext
Up: Deprecated Interfaces Next: Deprecated since MPI-2.2 Previous: Deprecated Interfaces


Return to MPI-5.0 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-5.0 of June 9, 2025
HTML Generated on March 2, 2025