diff --git a/fabtests/common/shared.c b/fabtests/common/shared.c index a7d548da097..f485afb484d 100644 --- a/fabtests/common/shared.c +++ b/fabtests/common/shared.c @@ -1463,7 +1463,8 @@ int ft_enable_ep(struct fid_ep *bind_ep, struct fid_eq *bind_eq, struct fid_av * } if (opts.max_msg_size) { - ret = fi_setopt(&bind_ep->fid, FI_OPT_ENDPOINT, FI_OPT_MAX_MSG_SIZE, &opts.max_msg_size, sizeof opts.max_msg_size); + ret = fi_setopt(&bind_ep->fid, FI_OPT_ENDPOINT, FI_OPT_MAX_MSG_SIZE, + &opts.max_msg_size, sizeof opts.max_msg_size); if (ret && ret != -FI_EOPNOTSUPP) { FT_PRINTERR("fi_setopt(FI_OPT_MAX_MSG_SIZE)", ret); return ret; @@ -1485,6 +1486,15 @@ int ft_enable_ep(struct fid_ep *bind_ep, struct fid_eq *bind_eq, struct fid_av * } } + if (opts.min_multi_recv_size) { + ret = fi_setopt(&bind_ep->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, + &opts.min_multi_recv_size, sizeof opts.min_multi_recv_size); + if (ret && ret != -FI_EOPNOTSUPP) { + FT_PRINTERR("fi_setopt(FI_OPT_MIN_MULTI_RECV_SIZE)", ret); + return ret; + } + } + ret = fi_enable(bind_ep); if (ret) { FT_PRINTERR("fi_enable", ret); diff --git a/fabtests/functional/multi_recv.c b/fabtests/functional/multi_recv.c index 8b698e90f5d..58eac21b951 100644 --- a/fabtests/functional/multi_recv.c +++ b/fabtests/functional/multi_recv.c @@ -263,11 +263,6 @@ static int run(void) if (ret) return ret; - ret = fi_setopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, - &tx_size, sizeof(tx_size)); - if (ret) - return ret; - ret = post_multi_recv_buffer(); if (ret) return ret; @@ -327,6 +322,7 @@ int main(int argc, char **argv) return EIO; } + opts.min_multi_recv_size = opts.transfer_size; hints->caps = FI_MSG | FI_MULTI_RECV; hints->mode = FI_CONTEXT; hints->domain_attr->mr_mode = opts.mr_mode; diff --git a/fabtests/include/shared.h b/fabtests/include/shared.h index 2a798ecbaa7..679241b9a2d 100644 --- a/fabtests/include/shared.h +++ b/fabtests/include/shared.h @@ -191,6 +191,7 @@ struct ft_opts { size_t transfer_size; size_t max_msg_size; size_t inject_size; + size_t min_multi_recv_size; int window_size; int av_size; int verbose;