Skip to content

Commit 1fdf05f

Browse files
committed
pml/ob1: fix SPC potential over-counting when sending ack and requesting put
mca_pml_ob1_recv_request_put_frag is used to request a put from the peer if get fails mca_pml_ob1_recv_request_ack_send_btl is used to send an acknowledgement, not data Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent a9ed53a commit 1fdf05f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/mca/pml/ob1/pml_ob1_recvreq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ int mca_pml_ob1_recv_request_ack_send_btl(
252252
des->des_cbfunc = mca_pml_ob1_recv_ctl_completion;
253253

254254
rc = mca_bml_base_send(bml_btl, des, MCA_PML_OB1_HDR_TYPE_ACK);
255-
SPC_RECORD(OMPI_SPC_BYTES_RECEIVED_MPI, (ompi_spc_value_t)size);
255+
SPC_RECORD(OMPI_SPC_BYTES_SENT_MPI, (ompi_spc_value_t)sizeof(mca_pml_ob1_ack_hdr_t));
256256
if( OPAL_LIKELY( rc >= 0 ) ) {
257257
return OMPI_SUCCESS;
258258
}
@@ -456,8 +456,8 @@ static int mca_pml_ob1_recv_request_put_frag (mca_pml_ob1_rdma_frag_t *frag)
456456

457457
/* send rdma request to peer */
458458
rc = mca_bml_base_send (bml_btl, ctl, MCA_PML_OB1_HDR_TYPE_PUT);
459-
/* Increment counter for bytes_put even though they probably haven't all been received yet */
460-
SPC_RECORD(OMPI_SPC_BYTES_PUT, (ompi_spc_value_t)frag->rdma_length);
459+
/* Increment counter for bytes sent by MPI */
460+
SPC_RECORD(OMPI_SPC_BYTES_SENT_MPI, (ompi_spc_value_t)(sizeof (mca_pml_ob1_rdma_hdr_t) + reg_size));
461461
if (OPAL_UNLIKELY(rc < 0)) {
462462
mca_bml_base_free (bml_btl, ctl);
463463
return rc;

0 commit comments

Comments
 (0)