Finally, there is a complementary routine to MPI_TYPE_COMMIT, namely, MPI_TYPE_FREE, which marks a datatype for deallocation. The form of MPI_TYPE_FREE is:
- C
int MPI_Type_free (MPI_datatype *datatype)
- FORTRAN
MPI_TYPE_FREE (DATATYPE, MPIERROR)
INTEGER DATATYPE, MPIERROR
Any datatypes derived from a freed datatype are unaffected when it is freed, as are any communications that are using the freed datatype at the time of the freeing. datatype is both an input and output argument. It is returned as MPI_DATATYPE_NULL.