Skip to content

Commit

Permalink
Abort for MR > 4GB
Browse files Browse the repository at this point in the history
Find the test that registers memory > 4GB in PR CI.

Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan committed Nov 4, 2024
1 parent b5ebb82 commit da807f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions prov/efa/src/efa_mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,12 @@ static int efa_mr_reg_impl(struct efa_mr *efa_mr, uint64_t flags, const void *at
}
efa_mr->domain->ibv_mr_reg_ct++;
efa_mr->domain->ibv_mr_reg_sz += efa_mr->ibv_mr->length;
if (efa_mr->ibv_mr->length >= (size_t) BIT(32)) {
fprintf(stderr,
"mr >4GB.\n"
"Your application will now abort.\n");
abort();
}
EFA_INFO(FI_LOG_MR, "Registered memory of size %zu for ibv pd %p, total mr reg size %zu, mr reg count %zu\n",
efa_mr->ibv_mr->length, efa_mr->domain->ibv_pd, efa_mr->domain->ibv_mr_reg_sz, efa_mr->domain->ibv_mr_reg_ct);
efa_mr->mr_fid.key = efa_mr->ibv_mr->rkey;
Expand Down

0 comments on commit da807f1

Please sign in to comment.