Commit f92fcb3c authored by Wesley Bland's avatar Wesley Bland
Browse files

Fixes #1868.



Bill found some misuse of MPIR_ERR_RECOVERABLE and few other error
messages and wrote a test in autogen.sh to discover/report them. This
fixes the errors raised by that test and re-enables it at autogen time.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent ab1323d8
......@@ -24,7 +24,7 @@ $quiet = 0;
$build_test_pgm = 1;
# FIXME: checkErrClass should be set to 1; currently set to zero
# to permit autogen.sh to complete
$checkErrClass = 0;
$checkErrClass = 1;
# Strict is used to control checking of error message strings.
$gStrict = 0;
......
......@@ -426,7 +426,7 @@ if (pointer_) { \
void *realloc_tmp_ = MPIU_Realloc((ptr_), (size_)); \
if ((size_) && !realloc_tmp_) { \
MPIU_Free(ptr_); \
MPIU_ERR_SETANDJUMP2(rc_,MPIU_CHKMEM_ISFATAL,"**nomem2","**nomem2 %d %s",(size_),MPIU_QUOTE(ptr_)); \
MPIU_ERR_SETANDJUMP2(rc_,MPI_ERR_OTHER,"**nomem2","**nomem2 %d %s",(size_),MPIU_QUOTE(ptr_)); \
} \
(ptr_) = realloc_tmp_; \
} while (0)
......@@ -434,7 +434,7 @@ if (pointer_) { \
#define MPIU_REALLOC_ORJUMP(ptr_,size_,rc_) do { \
void *realloc_tmp_ = MPIU_Realloc((ptr_), (size_)); \
if (size_) \
MPIU_ERR_CHKANDJUMP2(!realloc_tmp_,rc_,MPIU_CHKMEM_ISFATAL,"**nomem2","**nomem2 %d %s",(size_),MPIU_QUOTE(ptr_)); \
MPIU_ERR_CHKANDJUMP2(!realloc_tmp_,rc_,MPI_ERR_OTHER,"**nomem2","**nomem2 %d %s",(size_),MPIU_QUOTE(ptr_)); \
(ptr_) = realloc_tmp_; \
} while (0)
......
......@@ -475,7 +475,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
comm_size = comm_ptr->remote_size;
if (comm_ptr->comm_kind == MPID_INTERCOMM && sendbuf == MPI_IN_PLACE) {
MPIU_ERR_SETANDJUMP(mpi_errno, MPIR_ERR_RECOVERABLE, "**sendbuf_inplace");
MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sendbuf_inplace");
}
for (i=0; i<comm_size; i++) {
......
......@@ -468,7 +468,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
check_send = (comm_ptr->comm_kind == MPID_INTRACOMM && sendbuf != MPI_IN_PLACE);
if (comm_ptr->comm_kind == MPID_INTERCOMM && sendbuf == MPI_IN_PLACE) {
MPIU_ERR_SETANDJUMP(mpi_errno, MPIR_ERR_RECOVERABLE, "**sendbuf_inplace");
MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sendbuf_inplace");
}
if (comm_ptr->comm_kind == MPID_INTRACOMM)
......
......@@ -364,7 +364,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
MPIR_ERRTEST_ARGNULL(rdispls,"rdispls", mpi_errno);
MPIR_ERRTEST_ARGNULL(recvtypes,"recvtypes", mpi_errno);
if (comm_ptr->comm_kind == MPID_INTERCOMM && sendbuf == MPI_IN_PLACE) {
MPIU_ERR_SETANDJUMP(mpi_errno, MPIR_ERR_RECOVERABLE, "**sendbuf_inplace");
MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sendbuf_inplace");
}
MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
/* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
......
......@@ -863,7 +863,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
int nfree = -1;
int ntotal = -1;
MPIR_ContextMaskStats(&nfree, &ntotal);
MPIU_ERR_SETANDJUMP3(mpi_errno, MPIR_ERR_RECOVERABLE,
MPIU_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycomm", "**toomanycomm %d %d %d",
nfree, ntotal, ignore_id);
}
......@@ -874,7 +874,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
int nfree = -1;
int ntotal = -1;
MPIR_ContextMaskStats(&nfree, &ntotal);
MPIU_ERR_SETANDJUMP3(mpi_errno, MPIR_ERR_RECOVERABLE,
MPIU_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycomm", "**toomanycomm %d %d %d",
nfree, ntotal, ignore_id);
}
......@@ -1141,7 +1141,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
}
MPIR_ContextMaskStats(&nfree, &ntotal);
MPIU_ERR_SETANDJUMP3(mpi_errno, MPIR_ERR_RECOVERABLE,
MPIU_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycommfrag", "**toomanycommfrag %d %d %d",
nfree, ntotal, ignore_id);
/* --END ERROR HANDLING-- */
......@@ -1192,7 +1192,7 @@ static int gcn_helper(MPID_Comm *comm, int tag, void *state)
int nfree = -1;
int ntotal = -1;
MPIR_ContextMaskStats(&nfree, &ntotal);
MPIU_ERR_SETANDJUMP3(mpi_errno, MPIR_ERR_RECOVERABLE,
MPIU_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycomm", "**toomanycomm %d %d %d",
nfree, ntotal, /*ignore_id=*/0);
}
......@@ -1557,7 +1557,7 @@ int MPIR_Comm_copy( MPID_Comm *comm_ptr, int size, MPID_Comm **outcomm_ptr )
int nfree = -1;
int ntotal = -1;
MPIR_ContextMaskStats(&nfree, &ntotal);
MPIU_ERR_SETANDJUMP3(mpi_errno, MPIR_ERR_RECOVERABLE,
MPIU_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycomm", "**toomanycomm %d %d %d",
nfree, ntotal, /*ignore_id=*/0);
}
......
......@@ -316,7 +316,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
/* FIXME: Why not - there is only one allocated at a time. Is it only
that there is no defined macro to pop and free an item? */
buf = MPIU_Malloc(count*sizeof(int));
MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPIR_ERR_RECOVERABLE, "**nomem");
MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem");
mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_A_TAG, comm_old, MPI_STATUS_IGNORE);
/* FIXME: buf is never freed on error! */
......@@ -350,7 +350,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
/* can't use CHKLMEM macros b/c we are in a loop */
/* Why not? */
buf = MPIU_Malloc(count*sizeof(int));
MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPIR_ERR_RECOVERABLE, "**nomem");
MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem");
mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_B_TAG, comm_old, MPI_STATUS_IGNORE);
/* FIXME: buf is never freed on error! */
......
......@@ -116,7 +116,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
if (indegree > 0) {
MPIR_ERRTEST_ARGNULL(sources, "sources", mpi_errno);
if (sourceweights == MPI_UNWEIGHTED && destweights != MPI_UNWEIGHTED) {
MPIU_ERR_SET(mpi_errno, MPIR_ERR_RECOVERABLE, "**unweightedboth");
MPIU_ERR_SET(mpi_errno, MPI_ERR_TOPOLOGY, "**unweightedboth");
goto fn_fail;
}
/* TODO check ranges for array elements too (**argarrayneg / **rankarray)*/
......@@ -124,7 +124,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
if (outdegree > 0) {
MPIR_ERRTEST_ARGNULL(destinations, "destinations", mpi_errno);
if (destweights == MPI_UNWEIGHTED && sourceweights != MPI_UNWEIGHTED) {
MPIU_ERR_SET(mpi_errno, MPIR_ERR_RECOVERABLE, "**unweightedboth");
MPIU_ERR_SET(mpi_errno, MPI_ERR_TOPOLOGY, "**unweightedboth");
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