Skip to content

Commit

Permalink
fabtests: Test max inject size
Browse files Browse the repository at this point in the history
Right now, we do not inject if the inject size is equal to the message
size.  We should inject in this case, as it is the most likely to cause
memory issues. Fix fabtests to test the largest allowable inject message
size.

Signed-off-by: Seth Zegelstein <szegel@amazon.com>
  • Loading branch information
a-szegel authored and j-xiong committed Nov 6, 2023
1 parent 4bd689b commit e3a2799
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fabtests/benchmarks/benchmark_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int pingpong(void)
if (i == opts.warmup_iterations)
ft_start();

if (opts.transfer_size < inject_size)
if (opts.transfer_size <= inject_size)
ret = ft_inject(ep, remote_fi_addr, opts.transfer_size);
else
ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx);
Expand All @@ -124,7 +124,7 @@ int pingpong(void)
if (ret)
return ret;

if (opts.transfer_size < inject_size)
if (opts.transfer_size <= inject_size)
ret = ft_inject(ep, remote_fi_addr, opts.transfer_size);
else
ret = ft_tx(ep, remote_fi_addr, opts.transfer_size, &tx_ctx);
Expand Down Expand Up @@ -347,7 +347,7 @@ int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
}
switch (rma_op) {
case FT_RMA_WRITE:
if (opts.transfer_size < inject_size) {
if (opts.transfer_size <= inject_size) {
ret = ft_post_rma_inject(FT_RMA_WRITE, tx_buf + offset,
opts.transfer_size, remote);
} else {
Expand All @@ -368,7 +368,7 @@ int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
rx_seq++;

} else {
if (opts.transfer_size < inject_size) {
if (opts.transfer_size <= inject_size) {
ret = ft_post_rma_inject(FT_RMA_WRITEDATA,
tx_buf + offset,
opts.transfer_size,
Expand Down

0 comments on commit e3a2799

Please sign in to comment.