There are two situations that cannot be handled by the required representations:
User-defined data representations allow the user to insert a third party converter into the I/O stream to do the data representation conversion.
MPI_REGISTER_DATAREP(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state)
int MPI_Register_datarep(char *datarep, MPI_Datarep_conversion_function *read_conversion_fn, MPI_Datarep_conversion_function *write_conversion_fn, MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state)
MPI_REGISTER_DATAREP(DATAREP, READ_CONVERSION_FN, WRITE_CONVERSION_FN, DTYPE_FILE_EXTENT_FN, EXTRA_STATE, IERROR) CHARACTER*(*) DATAREP
EXTERNAL READ_CONVERSION_FN, WRITE_CONVERSION_FN, DTYPE_FILE_EXTENT_FN
INTEGER(KIND=MPI_ADDRESS_KIND) EXTRA_STATE
INTEGER IERROR
int MPI::Register_datarep(const char* datarep, MPI::Datarep_conversion_function* read_conversion_fn, MPI::Datarep_conversion_function* write_conversion_fn, MPI::Datarep_extent_function* dtype_file_extent_fn, void* extra_state)
void
The call associates read_conversion_fn,
write_conversion_fn, and
dtype_file_extent_fn
with the data representation identifier datarep.
datarep can then be used as an argument
to MPI_FILE_SET_VIEW, causing
subsequent data access operations to call the conversion functions
to convert all data items accessed between file data representation
and native representation.
MPI_REGISTER_DATAREP is a local operation and only registers the
data representation
for the calling MPI-/ process.
If datarep is already defined,
an error in the error class MPI_ERR_DUP_DATAREP is raised
using the default file error handler (see Section 9.7,
page ).
The length of a data representation string is limited to the value of
MPI_MAX_DATAREP_STRING.
MPI_MAX_DATAREP_STRING must have a value of at least 64.
No routines are provided to delete data representations and
free the associated resources;
it is not expected that an application
will generate them in significant numbers.