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 <alexia.ingerson@intel.com>
  • Loading branch information
aingerson committed Aug 23, 2024
1 parent fca0179 commit 53b1e3c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fabtests/functional/multi_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ static int reg_mrs(void)
int i, ret;

for (i = 0; i < num_eps; i++) {
printf("Reg send buf[%d], addr %lu\n", i, (uint64_t) send_bufs[i]);
ret = ft_reg_mr(fi, send_bufs[i], opts.transfer_size,
ft_info_to_mr_access(fi),
(FT_MR_KEY + 1) * (i + 1), opts.iface,
opts.device, &send_mrs[i], &send_descs[i]);
if (ret)
return ret;

printf("Reg recv buf[%d], addr %lu\n", i, (uint64_t) recv_bufs[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,
Expand Down Expand Up @@ -197,13 +199,21 @@ static int ep_post_tx(int idx, size_t len)
return ret;
}

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

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

if (shared_cq)
cq_read_idx = 0;

printf("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 @@ -282,6 +292,9 @@ static int do_sends(void)
if (ret)
return ret;

printf("Send RMA info[%d]\n", i);
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 @@ -311,6 +324,9 @@ static int do_sends(void)
ret = ft_get_rma_info(rma_iov, &peer_iovs[i], key_size);
if (ret)
return ret;

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

ret = sync_all();
Expand Down

0 comments on commit 53b1e3c

Please sign in to comment.