Skip to content

Commit

Permalink
fabtests: Reorganize the FI_RX_CQ_DATA set.
Browse files Browse the repository at this point in the history
FI_RX_CQ_DATA mode shouldn't be set per operation.
It should be set based on whether the code supports
it in the implementation. This patch move the FI_RX_CQ_DATA
set to the hints setup phase among the code that supports
FI_RX_CQ_DATA in implementation, like FI_CONTEXT and
FI_CONTEXT2.

Signed-off-by: Shi Jin <sjina@amazon.com>
  • Loading branch information
shijin-aws committed Feb 6, 2025
1 parent c3420a7 commit feb1281
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fabtests/benchmarks/rma_bw.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int main(int argc, char **argv)

hints->caps = FI_MSG | FI_RMA;
hints->domain_attr->resource_mgmt = FI_RM_ENABLED;
hints->mode = FI_CONTEXT | FI_CONTEXT2;
hints->mode = FI_CONTEXT | FI_CONTEXT2 | FI_RX_CQ_DATA;
hints->domain_attr->threading = FI_THREAD_DOMAIN;
hints->addr_format = opts.address_format;

Expand Down
2 changes: 1 addition & 1 deletion fabtests/benchmarks/rma_pingpong.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int main(int argc, char **argv)

hints->caps = FI_MSG | FI_RMA | FI_WRITE | FI_REMOTE_WRITE;
hints->domain_attr->resource_mgmt = FI_RM_ENABLED;
hints->mode = FI_CONTEXT | FI_CONTEXT2;
hints->mode = FI_CONTEXT | FI_CONTEXT2 | FI_RX_CQ_DATA;
hints->addr_format = opts.address_format;

while ((op = getopt_long(argc, argv, "Uh" CS_OPTS INFO_OPTS API_OPTS
Expand Down
2 changes: 0 additions & 2 deletions fabtests/common/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -3711,13 +3711,11 @@ int ft_parse_api_opts(int op, char *optarg, struct fi_info *hints,
opts->rma_op = FT_RMA_READ;
} else if (!strcasecmp(optarg, "writedata")) {
hints->caps |= FI_WRITE | FI_REMOTE_WRITE;
hints->mode |= FI_RX_CQ_DATA;
hints->domain_attr->cq_data_size = 4;
opts->rma_op = FT_RMA_WRITEDATA;
opts->cqdata_op = FT_CQDATA_WRITEDATA;
cq_attr.format = FI_CQ_FORMAT_DATA;
} else if (!strcasecmp(optarg, "senddata")) {
hints->mode |= FI_RX_CQ_DATA;
hints->domain_attr->cq_data_size = 4;
opts->cqdata_op = FT_CQDATA_SENDDATA;
cq_attr.format = FI_CQ_FORMAT_DATA;
Expand Down

0 comments on commit feb1281

Please sign in to comment.