dont try and pack zero byte message
This commit was SVN r6532.
Этот коммит содержится в:
родитель
7fa40e84ae
Коммит
025dcfa80b
@ -121,12 +121,20 @@ static void mca_pml_ob1_recv_request_ack(
|
|||||||
mca_pml_ob1_rendezvous_hdr_t* hdr)
|
mca_pml_ob1_rendezvous_hdr_t* hdr)
|
||||||
{
|
{
|
||||||
mca_pml_ob1_proc_t* proc = recvreq->req_proc;
|
mca_pml_ob1_proc_t* proc = recvreq->req_proc;
|
||||||
mca_pml_ob1_endpoint_t* ep = mca_pml_ob1_ep_array_get_next(&proc->btl_eager);
|
mca_pml_ob1_endpoint_t* ep;
|
||||||
mca_btl_base_descriptor_t* des;
|
mca_btl_base_descriptor_t* des;
|
||||||
mca_pml_ob1_recv_frag_t* frag;
|
mca_pml_ob1_recv_frag_t* frag;
|
||||||
mca_pml_ob1_ack_hdr_t* ack;
|
mca_pml_ob1_ack_hdr_t* ack;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* if this hasn't been initialized yet - this is a synchronous send */
|
||||||
|
if(NULL == proc) {
|
||||||
|
ompi_proc_t *ompi_proc = ompi_comm_peer_lookup(
|
||||||
|
recvreq->req_recv.req_base.req_comm, hdr->hdr_match.hdr_src);
|
||||||
|
proc = recvreq->req_proc = ompi_proc->proc_pml;
|
||||||
|
}
|
||||||
|
ep = mca_pml_ob1_ep_array_get_next(&proc->btl_eager);
|
||||||
|
|
||||||
/* allocate descriptor */
|
/* allocate descriptor */
|
||||||
MCA_PML_OB1_ENDPOINT_DES_ALLOC(ep, des, sizeof(mca_pml_ob1_ack_hdr_t));
|
MCA_PML_OB1_ENDPOINT_DES_ALLOC(ep, des, sizeof(mca_pml_ob1_ack_hdr_t));
|
||||||
if(NULL == des) {
|
if(NULL == des) {
|
||||||
@ -145,6 +153,7 @@ static void mca_pml_ob1_recv_request_ack(
|
|||||||
* registered. if registered on both sides - do one rdma for
|
* registered. if registered on both sides - do one rdma for
|
||||||
* the entire message.
|
* the entire message.
|
||||||
*/
|
*/
|
||||||
|
if(hdr->hdr_match.hdr_msg_length > 0) {
|
||||||
|
|
||||||
recvreq->req_chunk = mca_mpool_base_find(recvreq->req_recv.req_base.req_addr);
|
recvreq->req_chunk = mca_mpool_base_find(recvreq->req_recv.req_base.req_addr);
|
||||||
if( NULL != recvreq->req_chunk &&
|
if( NULL != recvreq->req_chunk &&
|
||||||
@ -179,8 +188,14 @@ static void mca_pml_ob1_recv_request_ack(
|
|||||||
recvreq->req_rdma_offset = recvreq->req_recv.req_bytes_packed;
|
recvreq->req_rdma_offset = recvreq->req_recv.req_bytes_packed;
|
||||||
ack->hdr_rdma_offset = recvreq->req_recv.req_bytes_packed;
|
ack->hdr_rdma_offset = recvreq->req_recv.req_bytes_packed;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
recvreq->req_rdma_offset = hdr->hdr_frag_length;
|
||||||
|
ack->hdr_rdma_offset = hdr->hdr_frag_length;
|
||||||
}
|
}
|
||||||
else{
|
}
|
||||||
|
|
||||||
|
/* zero byte message */
|
||||||
|
else {
|
||||||
recvreq->req_rdma_offset = hdr->hdr_frag_length;
|
recvreq->req_rdma_offset = hdr->hdr_frag_length;
|
||||||
ack->hdr_rdma_offset = hdr->hdr_frag_length;
|
ack->hdr_rdma_offset = hdr->hdr_frag_length;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ int mca_pml_ob1_send_request_start(
|
|||||||
|
|
||||||
/* if the buffer is not pinned and leave pinned is false we eagerly send
|
/* if the buffer is not pinned and leave pinned is false we eagerly send
|
||||||
data to cover the cost of pinning the recv buffers on the peer */
|
data to cover the cost of pinning the recv buffers on the peer */
|
||||||
if(NULL == sendreq->req_chunk && !mca_pml_ob1.leave_pinned){
|
if(size && NULL == sendreq->req_chunk && !mca_pml_ob1.leave_pinned){
|
||||||
/* pack the data into the supplied buffer */
|
/* pack the data into the supplied buffer */
|
||||||
iov.iov_base = (void*)((unsigned char*)segment->seg_addr.pval +
|
iov.iov_base = (void*)((unsigned char*)segment->seg_addr.pval +
|
||||||
sizeof(mca_pml_ob1_rendezvous_hdr_t));
|
sizeof(mca_pml_ob1_rendezvous_hdr_t));
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user