Commit 65a3af43 authored by Antonio J. Pena's avatar Antonio J. Pena
Browse files

Fixed --enabled-debuginfo segfaults



Added support for Ibsend and persistent sends, and fixed all other cases by
clearing out the dgb-next field of send requests. Closes #1932.
Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <raffenet@mcs.anl.gov>
parent 5014a82c
...@@ -299,8 +299,6 @@ void MPIR_DebuggerSetAborting( const char *msg ) ...@@ -299,8 +299,6 @@ void MPIR_DebuggerSetAborting( const char *msg )
* (more specifically, requests created with MPI_Isend, MPI_Issend, or * (more specifically, requests created with MPI_Isend, MPI_Issend, or
* MPI_Irsend). * MPI_Irsend).
* *
* FIXME: We need to add MPI_Ibsend and the persistent send requests to
* the known send requests.
* FIXME: We should exploit this to allow Finalize to report on * FIXME: We should exploit this to allow Finalize to report on
* send requests that were never completed. * send requests that were never completed.
*/ */
......
...@@ -119,6 +119,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, ...@@ -119,6 +119,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype,
mpi_errno = MPID_Bsend_init(buf, count, datatype, dest, tag, comm_ptr, mpi_errno = MPID_Bsend_init(buf, count, datatype, dest, tag, comm_ptr,
MPID_CONTEXT_INTRA_PT2PT, &request_ptr); MPID_CONTEXT_INTRA_PT2PT, &request_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail; if (mpi_errno != MPI_SUCCESS) goto fn_fail;
MPIR_SENDQ_REMEMBER(request_ptr, dest, tag, comm_ptr->context_id);
/* return the handle of the request to the user */ /* return the handle of the request to the user */
MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle); MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
......
...@@ -105,6 +105,7 @@ int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest ...@@ -105,6 +105,7 @@ int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest
mpi_errno = MPIR_Bsend_isend( buf, count, datatype, dest, tag, comm_ptr, mpi_errno = MPIR_Bsend_isend( buf, count, datatype, dest, tag, comm_ptr,
IBSEND, &request_ptr ); IBSEND, &request_ptr );
if (mpi_errno != MPI_SUCCESS) goto fn_fail; if (mpi_errno != MPI_SUCCESS) goto fn_fail;
MPIR_SENDQ_REMEMBER(request_ptr, dest, tag, comm_ptr->context_id);
/* FIXME: use the memory management macros */ /* FIXME: use the memory management macros */
ibinfo = (ibsend_req_info *)MPIU_Malloc( sizeof(ibsend_req_info) ); ibinfo = (ibsend_req_info *)MPIU_Malloc( sizeof(ibsend_req_info) );
......
...@@ -73,7 +73,6 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr, ...@@ -73,7 +73,6 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status)); MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status));
} }
mpi_errno = request_ptr->status.MPI_ERROR; mpi_errno = request_ptr->status.MPI_ERROR;
/* FIXME: are Ibsend requests added to the send queue? */
MPIR_SENDQ_FORGET(request_ptr); MPIR_SENDQ_FORGET(request_ptr);
MPID_Request_release(request_ptr); MPID_Request_release(request_ptr);
*request = MPI_REQUEST_NULL; *request = MPI_REQUEST_NULL;
...@@ -132,10 +131,6 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr, ...@@ -132,10 +131,6 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
} }
} }
/* FIXME: MPIR_SENDQ_FORGET(request_ptr); -- it appears that
persistent sends are not currently being added to the send
queue. should they be, or should this release be
conditional? */
MPID_Request_release(prequest_ptr); MPID_Request_release(prequest_ptr);
} }
else else
......
...@@ -125,6 +125,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, ...@@ -125,6 +125,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest,
mpi_errno = MPID_Send_init(buf, count, datatype, dest, tag, comm_ptr, mpi_errno = MPID_Send_init(buf, count, datatype, dest, tag, comm_ptr,
MPID_CONTEXT_INTRA_PT2PT, &request_ptr); MPID_CONTEXT_INTRA_PT2PT, &request_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail; if (mpi_errno != MPI_SUCCESS) goto fn_fail;
MPIR_SENDQ_REMEMBER(request_ptr, dest, tag, comm_ptr->context_id);
/* return the handle of the request to the user */ /* return the handle of the request to the user */
MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle); MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
......
...@@ -295,6 +295,12 @@ extern MPIDI_Process_t MPIDI_Process; ...@@ -295,6 +295,12 @@ extern MPIDI_Process_t MPIDI_Process;
#define MPIDI_CH3_REQUEST_INIT(a_) #define MPIDI_CH3_REQUEST_INIT(a_)
#endif #endif
#ifdef HAVE_DEBUGGER_SUPPORT
#define MPIDI_Request_clear_dbg(sreq_) ((sreq_)->dbg_next = NULL)
#else
#define MPIDI_Request_clear_dbg(sreq_)
#endif
/* FIXME: Why does a send request need the match information? /* FIXME: Why does a send request need the match information?
Is that for debugging information? In case the initial envelope Is that for debugging information? In case the initial envelope
cannot be sent? Ditto for the dev.user_buf, count, and datatype cannot be sent? Ditto for the dev.user_buf, count, and datatype
...@@ -344,6 +350,7 @@ extern MPIDI_Process_t MPIDI_Process; ...@@ -344,6 +350,7 @@ extern MPIDI_Process_t MPIDI_Process;
(sreq_)->dev.OnFinal = NULL; \ (sreq_)->dev.OnFinal = NULL; \
(sreq_)->dev.iov_count = 0; \ (sreq_)->dev.iov_count = 0; \
(sreq_)->dev.iov_offset = 0; \ (sreq_)->dev.iov_offset = 0; \
MPIDI_Request_clear_dbg(sreq_); \
} }
/* This is the receive request version of MPIDI_Request_create_sreq */ /* This is the receive request version of MPIDI_Request_create_sreq */
......
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