Skip to content

Commit e630046

Browse files
pml/ob1: fixed local handle sent during PUT control message
In case of using a btl_put in ob1, the handle of the locally registered memory is sent with a PUT control message. In the current master code the sent handle is necessary the handle in the frag but if the handle has been successfully registered in the request, the frag structure does not have any valid handle and all fragments use the request one. I suggest to check if the handle in the fragment is valid and if not to send the handle from the request. Signed-off-by: Brelle Emmanuel <emmanuel.brelle@atos.net>
1 parent 76516bc commit e630046

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ompi/mca/pml/ob1/pml_ob1_recvreq.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
406406
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
407407
ompi_proc_t* proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc;
408408
#endif
409+
mca_btl_base_registration_handle_t *local_handle = NULL;
409410
mca_bml_base_btl_t *bml_btl = frag->rdma_bml;
410411
mca_btl_base_descriptor_t *ctl;
411412
mca_pml_ob1_rdma_hdr_t *hdr;
@@ -414,6 +415,12 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
414415

415416
reg_size = bml_btl->btl->btl_registration_handle_size;
416417

418+
if (frag->local_handle) {
419+
local_handle = frag->local_handle;
420+
} else if (recvreq->local_handle) {
421+
local_handle = recvreq->local_handle;
422+
}
423+
417424
/* prepare a descriptor for rdma control message */
418425
mca_bml_base_alloc (bml_btl, &ctl, MCA_BTL_NO_ORDER, sizeof (mca_pml_ob1_rdma_hdr_t) + reg_size,
419426
MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP |
@@ -427,7 +434,7 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
427434
hdr = (mca_pml_ob1_rdma_hdr_t *) ctl->des_segments->seg_addr.pval;
428435
mca_pml_ob1_rdma_hdr_prepare (hdr, (!recvreq->req_ack_sent) ? MCA_PML_OB1_HDR_TYPE_ACK : 0,
429436
recvreq->remote_req_send.lval, frag, recvreq, frag->rdma_offset,
430-
frag->local_address, frag->rdma_length, frag->local_handle,
437+
frag->local_address, frag->rdma_length, local_handle,
431438
reg_size);
432439
ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_PUT, proc);
433440

0 commit comments

Comments
 (0)