Commit 96a939cf authored by William Gropp's avatar William Gropp
Browse files

[svn-r7576] Added missing error handling comments needed for accurate coverage reporting

parent c53d8817
......@@ -758,10 +758,12 @@ int MPIR_Allgatherv_inter (
fn_exit:
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
if (newtype != MPI_DATATYPE_NULL)
MPIR_Type_free_impl(&newtype);
goto fn_exit;
/* --END ERROR HANDLING-- */
}
......
......@@ -70,10 +70,12 @@ int MPIC_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_SEND);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
if (request_ptr) {
MPID_Request_release(request_ptr);
}
goto fn_exit;
/* --END ERROR HANDLING-- */
}
#undef FUNCNAME
......@@ -113,10 +115,12 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
MPIDI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPIC_RECV);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
if (request_ptr) {
MPID_Request_release(request_ptr);
}
goto fn_exit;
/* --END ERROR HANDLING-- */
}
#undef FUNCNAME
......@@ -149,10 +153,12 @@ int MPIC_Ssend(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_SSEND);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
if (request_ptr) {
MPID_Request_release(request_ptr);
}
goto fn_exit;
/* --END ERROR HANDLING-- */
}
#undef FUNCNAME
......@@ -194,8 +200,10 @@ int MPIC_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_Request_release(send_req_ptr);
MPID_Request_release(recv_req_ptr);
fn_fail:
/* --BEGIN ERROR HANDLING-- */
MPIDI_PT2PT_FUNC_EXIT_BOTH(MPID_STATE_MPIC_SENDRECV);
return mpi_errno;
/* --END ERROR HANDLING-- */
}
/* NOTE: for regular collectives (as opposed to irregular collectives) calling
......@@ -469,8 +477,10 @@ int MPIC_Isend(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
*request = request_ptr->handle;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_ISEND);
return mpi_errno;
/* --END ERROR HANDLING-- */
}
......@@ -499,8 +509,10 @@ int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
*request = request_ptr->handle;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
MPIDI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPIC_IRECV);
return mpi_errno;
/* --END ERROR HANDLING-- */
}
/* FIXME: For the brief-global and finer-grain control, we must ensure that
......@@ -531,6 +543,8 @@ int MPIC_Wait(MPID_Request * request_ptr)
}
fn_fail:
/* --BEGIN ERROR HANDLING-- */
MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_WAIT);
return mpi_errno;
/* --END ERROR HANDLING-- */
}
......@@ -586,7 +586,7 @@ int MPIR_Reduce_scatter_intra (
/* commutative and long message, or noncommutative and long message.
use (p-1) pairwise exchanges */
if (sendbuf != MPI_IN_PLACE) {
/* copy local data into recvbuf */
mpi_errno = MPIR_Localcopy(((char *)sendbuf+disps[rank]*extent),
......
......@@ -441,6 +441,7 @@ fn_exit:
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
/* signal to error handling routines that core services are unavailable */
MPIR_Process.initialized = MPICH_PRE_INIT;
......@@ -449,6 +450,7 @@ fn_fail:
}
MPIU_THREAD_CS_FINALIZE;
return mpi_errno;
/* --END ERROR HANDLING-- */
}
#endif
......
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