Skip to content

Commit

Permalink
fabtests/multi_ep: debugging prints DO NOT merge
Browse files Browse the repository at this point in the history
Signed-off-by: Alexia Ingerson <[email protected]>
  • Loading branch information
aingerson committed Aug 26, 2024
1 parent dd6ccc6 commit 728889e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions fabtests/functional/multi_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,18 @@ static int reg_mrs(void)
if (ret)
return ret;

FT_WARN("Reg send buf[%d], addr %lu, key %lu\n",
i, (uint64_t) send_bufs[i], fi_mr_key(send_mrs[i]));

ret = ft_reg_mr(fi, recv_bufs[i], opts.transfer_size,
ft_info_to_mr_access(fi),
(FT_MR_KEY + 2) * (i + 2), opts.iface,
opts.device, &recv_mrs[i], &recv_descs[i]);
if (ret)
return ret;

FT_WARN("Reg recv buf[%d], addr %lu, key %lu\n",
i, (uint64_t) recv_bufs[i], fi_mr_key(recv_mrs[i]));
}

return FI_SUCCESS;
Expand Down Expand Up @@ -197,13 +203,21 @@ static int ep_post_tx(int idx, size_t len)
return ret;
}

static void print_rma_info(struct fi_rma_iov *rma_iov)
{
FT_WARN("RMA info: addr %lu, key %zu\n",
rma_iov->addr, rma_iov->key);
}

static int ep_post_write(int idx)
{
int ret, cq_read_idx = idx;

if (shared_cq)
cq_read_idx = 0;

FT_WARN("Posting write to idx %d\n", idx);
print_rma_info(&peer_iovs[idx]);
do {
ret = fi_write(eps[idx], send_bufs[idx], opts.transfer_size,
send_descs[idx], remote_fiaddr[idx],
Expand Down Expand Up @@ -284,6 +298,9 @@ static int do_sends(void)
if (ret)
return ret;

FT_WARN("Send RMA info[%d] (%lu bytes)\n", i, len);
print_rma_info(rma_iov);

if (len > opts.transfer_size) {
FT_PRINTERR("Buffer not large enough to send RMA info",
-FI_ETOOSMALL);
Expand Down Expand Up @@ -313,6 +330,9 @@ static int do_sends(void)
ret = ft_get_rma_info(rma_iov, &peer_iovs[i], key_size);
if (ret)
return ret;

FT_WARN("Get RMA info[%d]\n", i);
print_rma_info(&peer_iovs[i]);
}

ret = sync_all();
Expand Down
2 changes: 2 additions & 0 deletions prov/efa/src/efa_mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,8 @@ int efa_mr_update_domain_mr_map(struct efa_mr *efa_mr, struct fi_mr_attr *mr_att
ofi_genlock_lock(&efa_mr->domain->util_domain.lock);
err = ofi_mr_map_insert(&efa_mr->domain->util_domain.mr_map, mr_attr,
&efa_mr->mr_fid.key, &efa_mr->mr_fid, flags);
EFA_WARN(FI_LOG_DOMAIN, "Inserted addr %lu, key %ld\n",
efa_mr->ibv_mr->addr, efa_mr->mr_fid.key);
ofi_genlock_unlock(&efa_mr->domain->util_domain.lock);
if (!err)
return 0;
Expand Down

0 comments on commit 728889e

Please sign in to comment.