* checkpoint - long messages are causing segfaults in the PML, but need to
stop for a bit This commit was SVN r5675.
Этот коммит содержится в:
родитель
2ec27c0927
Коммит
caf8551001
@ -366,6 +366,7 @@ extern int mca_ptl_portals_send(
|
||||
);
|
||||
|
||||
|
||||
|
||||
extern int mca_ptl_portals_module_enable(struct mca_ptl_portals_module_t *ptl,
|
||||
int value);
|
||||
|
||||
|
@ -168,10 +168,44 @@ mca_ptl_portals_process_recv_event(struct mca_ptl_portals_module_t *ptl,
|
||||
|
||||
break;
|
||||
|
||||
case MCA_PTL_HDR_TYPE_FRAG:
|
||||
/* get a fragment header */
|
||||
OMPI_FREE_LIST_GET(&mca_ptl_portals_component.portals_recv_frags, item, ret);
|
||||
recvfrag = (mca_ptl_portals_recv_frag_t*) item;
|
||||
if (OMPI_SUCCESS != ret) {
|
||||
ompi_output(mca_ptl_portals_component.portals_output,
|
||||
"unable to allocate resources");
|
||||
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* save the sender */
|
||||
recvfrag->frag_source = ev->initiator;
|
||||
|
||||
recvfrag->frag_data = ((mca_ptl_base_frag_header_t*) hdr) + 1;
|
||||
recvfrag->frag_size = ev->mlength - sizeof(mca_ptl_base_frag_header_t);
|
||||
memcpy(&(recvfrag->frag_recv.frag_base.frag_header),
|
||||
hdr, sizeof(mca_ptl_base_frag_header_t));
|
||||
recvfrag->frag_recv.frag_base.frag_owner =
|
||||
(struct mca_ptl_base_module_t*) ptl;
|
||||
recvfrag->frag_recv.frag_base.frag_peer = NULL; /* BWB - fix me */
|
||||
recvfrag->frag_recv.frag_base.frag_size = 0;
|
||||
recvfrag->frag_recv.frag_base.frag_addr = recvfrag->frag_data;
|
||||
recvfrag->frag_recv.frag_is_buffered = true;
|
||||
recvfrag->frag_recv.frag_request = NULL;
|
||||
|
||||
ptl->super.ptl_match(&ptl->super, &recvfrag->frag_recv,
|
||||
&hdr->hdr_match);
|
||||
|
||||
break;
|
||||
|
||||
case MCA_PTL_HDR_TYPE_ACK:
|
||||
{
|
||||
mca_ptl_portals_send_frag_t *sendfrag;
|
||||
mca_ptl_base_send_request_t *sendreq;
|
||||
sendfrag = hdr->hdr_ack.hdr_src_ptr.pval;
|
||||
sendreq = sendfrag->frag_send.frag_request;
|
||||
|
||||
sendreq->req_peer_match = hdr->hdr_ack.hdr_dst_match;
|
||||
|
||||
sendfrag->frag_send.frag_base.frag_owner->
|
||||
ptl_send_progress(sendfrag->frag_send.frag_base.frag_owner,
|
||||
|
@ -68,7 +68,7 @@ mca_ptl_portals_send(struct mca_ptl_base_module_t *ptl_base,
|
||||
"mca_ptl_portals_send to %lu, %lu",
|
||||
peer_id->nid, peer_id->pid);
|
||||
|
||||
if (sendreq->req_cached) {
|
||||
if (sendreq->req_cached && offset == 0) {
|
||||
sendfrag = (mca_ptl_portals_send_frag_t*)(sendreq+1);
|
||||
} else {
|
||||
ompi_list_item_t *item;
|
||||
@ -151,19 +151,22 @@ mca_ptl_portals_send(struct mca_ptl_base_module_t *ptl_base,
|
||||
|
||||
} else {
|
||||
hdr->hdr_common.hdr_type = MCA_PTL_HDR_TYPE_FRAG;
|
||||
sendfrag->frag_vector[0].iov_len = sizeof(mca_ptl_base_frag_header_t);
|
||||
hdr->hdr_common.hdr_flags = flags;
|
||||
hdr->hdr_frag.hdr_frag_offset = offset;
|
||||
hdr->hdr_frag.hdr_frag_length = sendfrag->frag_send.frag_base.frag_size;
|
||||
hdr->hdr_frag.hdr_src_ptr.lval = 0; /* for VALGRIND/PURIFY - REPLACE WITH MACRO */
|
||||
hdr->hdr_frag.hdr_src_ptr.pval = sendfrag;
|
||||
hdr->hdr_frag.hdr_dst_ptr = sendreq->req_peer_match;
|
||||
|
||||
sendfrag->frag_send.frag_base.frag_size = size;
|
||||
}
|
||||
|
||||
/* fragment state */
|
||||
sendfrag->frag_send.frag_base.frag_owner = ptl_base;
|
||||
sendfrag->frag_send.frag_request = sendreq;
|
||||
sendfrag->frag_send.frag_base.frag_peer = ptl_peer;
|
||||
|
||||
|
||||
|
||||
/* must update the offset after actual fragment size is determined
|
||||
* before attempting to send the fragment
|
||||
@ -218,7 +221,8 @@ mca_ptl_portals_process_send_event(ptl_event_t *ev)
|
||||
frag->frag_send.frag_base.frag_size);
|
||||
|
||||
/* return frag to freelist if not part of request */
|
||||
if (frag->frag_send.frag_request->req_cached == false) {
|
||||
if (frag->frag_send.frag_request->req_cached == false ||
|
||||
frag->frag_send.frag_base.frag_header.hdr_common.hdr_type == MCA_PTL_HDR_TYPE_FRAG) {
|
||||
if (frag->frag_send.frag_base.frag_addr != NULL) {
|
||||
free(frag->frag_send.frag_base.frag_addr);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user