Skip to content

Commit

Permalink
NA BMI/MPI: return actual msg size through cb info
Browse files Browse the repository at this point in the history
  • Loading branch information
soumagne committed Aug 13, 2024
1 parent fb704b7 commit 47e2e78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/na/na_bmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,13 @@ na_bmi_complete(struct na_bmi_op_id *na_bmi_op_id)
break;
case NA_CB_SEND_UNEXPECTED:
case NA_CB_SEND_EXPECTED:
break;
case NA_CB_RECV_EXPECTED:
if (callback_info->ret != NA_SUCCESS)
callback_info->info.recv_expected.actual_buf_size = 0;
else
callback_info->info.recv_expected.actual_buf_size =
(size_t) na_bmi_op_id->info.msg.actual_buf_size;
break;
case NA_CB_PUT:
case NA_CB_GET:
Expand Down
2 changes: 2 additions & 0 deletions src/na/na_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,8 @@ na_mpi_complete(struct na_mpi_op_id *na_mpi_op_id)
ret = NA_SIZE_ERROR;
goto done;
}
callback_info->info.recv_expected.actual_buf_size =
na_mpi_op_id->info.recv_expected.actual_size;
break;
case NA_CB_PUT:
/* Transfer is now done so free RMA info */
Expand Down

0 comments on commit 47e2e78

Please sign in to comment.