Skip to content

Commit c44821a

Browse files
EmmanuelBRELLEjsquyres
authored andcommitted
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 <[email protected]> (cherry picked from commit e630046)
1 parent 3cafd02 commit c44821a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ompi/mca/pml/ob1/pml_ob1_recvreq.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
402402
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
403403
ompi_proc_t* proc = (ompi_proc_t*)recvreq->req_recv.req_base.req_proc;
404404
#endif
405+
mca_btl_base_registration_handle_t *local_handle = NULL;
405406
mca_bml_base_btl_t *bml_btl = frag->rdma_bml;
406407
mca_btl_base_descriptor_t *ctl;
407408
mca_pml_ob1_rdma_hdr_t *hdr;
@@ -410,6 +411,12 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
410411

411412
reg_size = bml_btl->btl->btl_registration_handle_size;
412413

414+
if (frag->local_handle) {
415+
local_handle = frag->local_handle;
416+
} else if (recvreq->local_handle) {
417+
local_handle = recvreq->local_handle;
418+
}
419+
413420
/* prepare a descriptor for rdma control message */
414421
mca_bml_base_alloc (bml_btl, &ctl, MCA_BTL_NO_ORDER, sizeof (mca_pml_ob1_rdma_hdr_t) + reg_size,
415422
MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP |
@@ -423,7 +430,7 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
423430
hdr = (mca_pml_ob1_rdma_hdr_t *) ctl->des_segments->seg_addr.pval;
424431
mca_pml_ob1_rdma_hdr_prepare (hdr, (!recvreq->req_ack_sent) ? MCA_PML_OB1_HDR_TYPE_ACK : 0,
425432
recvreq->remote_req_send.lval, frag, recvreq, frag->rdma_offset,
426-
frag->local_address, frag->rdma_length, frag->local_handle,
433+
frag->local_address, frag->rdma_length, local_handle,
427434
reg_size);
428435
ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_PUT, proc);
429436

0 commit comments

Comments
 (0)