Commit 071fd93c authored by Junchao Zhang's avatar Junchao Zhang Committed by Antonio J. Pena
Browse files

Add a generic error code MPI_T_ERR_INVALID of MPI-3.1

The error code will be introduced in MPI-3.1. The code is used in
MPI_T_pvar_read, which has motivated for adding the error code.

See also https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/400

Signed-off-by: default avatarAntonio J. Pena <apenya@mcs.anl.gov>
parent 78b06634
......@@ -866,12 +866,13 @@ typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
#define MPI_T_ERR_PVAR_NO_WRITE 71 /* Pvar can't be written or reset */
#define MPI_T_ERR_PVAR_NO_ATOMIC 72 /* Pvar can't be R/W atomically */
#define MPI_T_ERR_INVALID_NAME 73 /* Name doesn't match */
#define MPI_T_ERR_INVALID 74 /* Generic error code for MPI_T added in MPI-3.1 */
#define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a
predefined error class */
/* WARNING: this is also defined in mpishared.h. Update both locations */
#define MPICH_ERR_LAST_CLASS 73 /* It is also helpful to know the
#define MPICH_ERR_LAST_CLASS 74 /* It is also helpful to know the
last valid class */
#define MPICH_ERR_FIRST_MPIX 100 /* Define a gap here because sock is
......
......@@ -62,7 +62,7 @@
#include "mpierrs.h"
/* FIXME: This is extracted from mpi.h.in, where it may not be appropriate */
#define MPICH_ERR_LAST_CLASS 73 /* It is also helpful to know the
#define MPICH_ERR_LAST_CLASS 74 /* It is also helpful to know the
last valid class */
#include "mpifunc.h"
......
......@@ -35,11 +35,11 @@ int MPIR_T_pvar_read_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle,
int i, mpi_errno = MPI_SUCCESS;
/* Reading a never started pvar, or a stopped and then reset wartermark,
* will run into this nasty situation. Wait for an error code to be defined
* by the Standard. Currently, use MPI_ERR_OTHER.
* will run into this nasty situation. Return a generic MPI_T error code,
* which is defined in MPI-3.1.
*/
if (!MPIR_T_pvar_is_oncestarted(handle)) {
mpi_errno = MPI_ERR_OTHER;
mpi_errno = MPI_T_ERR_INVALID;
goto fn_fail;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment