extern int MPI_ERR_AMODE;           /* error class */
extern int MPIO_ERR_AMODE_COMB;     /* error code */

MPI_Add_error_class(&MPI_ERR_AMODE);
MPI_Add_error_code(MPI_ERR_AMODE, &MPIO_ERR_AMODE_COMB);
MPI_Add_error_string(MPI_ERR_AMODE,
 "Error related to the amode passed to MPI_File_open");
MPI_Add_error_string(MPIO_ERR_AMODE_COMB,
 "MPI_MODE_RDWR and MPI_MODE_RDONLY cannot be specified together");
