IBM Books

MPI Subroutine Reference

MPI_COMM_FREE_KEYVAL, MPI_Comm_free_keyval

Purpose

Marks a communicator attribute key for deallocation.

C synopsis

#include <mpi.h>
int MPI_Comm_free_keyval (int *comm_keyval);

C++ synopsis

#include mpi.h
void MPI::Comm::Free_keyval(int& comm_keyval);

FORTRAN synopsis

include 'mpif.h' or use mpi
MPI_COMM_FREE_KEYVAL(INTEGER COMM_KEYVAL, INTEGER IERROR)

Parameters

comm_keyval
is the key value (integer) (INOUT)

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

Description

This subroutine sets keyval to MPI_KEYVAL_INVALID and marks the attribute key for deallocation. You can free an attribute key that is in use because the actual deallocation occurs only when all active references to it are complete. These references, however, need to be explicitly freed. Use calls to MPI_COMM_DELETE_ATTR to free one attribute instance. To free all attribute instances associated with a communicator, use MPI_COMM_FREE.

Notes

MPI_COMM_FREE_KEYVAL supersedes MPI_KEYVAL_FREE.

MPI_COMM_FREE_KEYVAL does not interoperate with MPI_KEYVAL_FREE. The FORTRAN bindings for MPI-1 caching functions presume that an attribute is an INTEGER. The MPI-2 caching bindings use INTEGER (KIND=MPI_ADDRESS_KIND). In an MPI implementation that uses 64-bit addresses and 32-bit INTEGERS, the two formats would be incompatible.

Errors

Fatal errors:

MPI not initialized

MPI already finalized

Wrong keytype (MPI_ERR_ARG) attribute key is not a communicator key

Related information

MPI_COMM_CREATE_KEYVAL
MPI_KEYVAL_FREE


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