From 5e9ed86eab1a3d14488c1d31995f229c6a6a359d Mon Sep 17 00:00:00 2001 From: Geoffroy Vallee Date: Thu, 17 Nov 2022 10:42:49 -0800 Subject: [PATCH] Differentiate blocking unblocking collectives in UCC Signed-off-by: Geoffroy Vallee Signed-off-by: George Bosilca --- ompi/mca/coll/ucc/coll_ucc_allgather.c | 1 + ompi/mca/coll/ucc/coll_ucc_allgatherv.c | 1 + ompi/mca/coll/ucc/coll_ucc_allreduce.c | 1 + ompi/mca/coll/ucc/coll_ucc_alltoall.c | 1 + ompi/mca/coll/ucc/coll_ucc_alltoallv.c | 1 + ompi/mca/coll/ucc/coll_ucc_barrier.c | 1 + ompi/mca/coll/ucc/coll_ucc_bcast.c | 1 + ompi/mca/coll/ucc/coll_ucc_common.h | 3 +++ ompi/mca/coll/ucc/coll_ucc_gather.c | 1 + ompi/mca/coll/ucc/coll_ucc_gatherv.c | 2 +- ompi/mca/coll/ucc/coll_ucc_module.c | 2 +- ompi/mca/coll/ucc/coll_ucc_reduce.c | 3 ++- ompi/mca/coll/ucc/coll_ucc_reduce_scatter.c | 1 + ompi/mca/coll/ucc/coll_ucc_reduce_scatter_block.c | 1 + ompi/mca/coll/ucc/coll_ucc_scatter.c | 1 + ompi/mca/coll/ucc/coll_ucc_scatterv.c | 1 + 16 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ompi/mca/coll/ucc/coll_ucc_allgather.c b/ompi/mca/coll/ucc/coll_ucc_allgather.c index 410323c9b10..3312d818bf3 100644 --- a/ompi/mca/coll/ucc/coll_ucc_allgather.c +++ b/ompi/mca/coll/ucc/coll_ucc_allgather.c @@ -34,6 +34,7 @@ static inline ucc_status_t mca_coll_ucc_allgather_init(const void *sbuf, size_t ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_ALLGATHER, .src.info = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_allgatherv.c b/ompi/mca/coll/ucc/coll_ucc_allgatherv.c index 6cf33a5dd80..a6bb37d235b 100644 --- a/ompi/mca/coll/ucc/coll_ucc_allgatherv.c +++ b/ompi/mca/coll/ucc/coll_ucc_allgatherv.c @@ -31,6 +31,7 @@ static inline ucc_status_t mca_coll_ucc_allgatherv_init(const void *sbuf, int sc ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_ALLGATHERV, .src.info = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_allreduce.c b/ompi/mca/coll/ucc/coll_ucc_allreduce.c index 5320641cb8b..d44b93df07e 100644 --- a/ompi/mca/coll/ucc/coll_ucc_allreduce.c +++ b/ompi/mca/coll/ucc/coll_ucc_allreduce.c @@ -32,6 +32,7 @@ static inline ucc_status_t mca_coll_ucc_allreduce_init(const void *sbuf, void *r } ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_ALLREDUCE, .src.info = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_alltoall.c b/ompi/mca/coll/ucc/coll_ucc_alltoall.c index b71f183fac8..275f8d67640 100644 --- a/ompi/mca/coll/ucc/coll_ucc_alltoall.c +++ b/ompi/mca/coll/ucc/coll_ucc_alltoall.c @@ -34,6 +34,7 @@ static inline ucc_status_t mca_coll_ucc_alltoall_init(const void *sbuf, size_t s ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_ALLTOALL, .src.info = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_alltoallv.c b/ompi/mca/coll/ucc/coll_ucc_alltoallv.c index 75b0dd6b6b7..2dc1a121bf0 100644 --- a/ompi/mca/coll/ucc/coll_ucc_alltoallv.c +++ b/ompi/mca/coll/ucc/coll_ucc_alltoallv.c @@ -31,6 +31,7 @@ static inline ucc_status_t mca_coll_ucc_alltoallv_init(const void *sbuf, const i ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_ALLTOALLV, .src.info_v = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_barrier.c b/ompi/mca/coll/ucc/coll_ucc_barrier.c index fdbc11b49aa..010ca177fdf 100644 --- a/ompi/mca/coll/ucc/coll_ucc_barrier.c +++ b/ompi/mca/coll/ucc/coll_ucc_barrier.c @@ -14,6 +14,7 @@ static inline ucc_status_t mca_coll_ucc_barrier_init(mca_coll_ucc_module_t *ucc_ { ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_BARRIER }; COLL_UCC_REQ_INIT(coll_req, req, coll, ucc_module); diff --git a/ompi/mca/coll/ucc/coll_ucc_bcast.c b/ompi/mca/coll/ucc/coll_ucc_bcast.c index 425e6869c8e..34296d74b97 100644 --- a/ompi/mca/coll/ucc/coll_ucc_bcast.c +++ b/ompi/mca/coll/ucc/coll_ucc_bcast.c @@ -21,6 +21,7 @@ static inline ucc_status_t mca_coll_ucc_bcast_init(void *buf, size_t count, stru ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_BCAST, .root = root, .src.info = { diff --git a/ompi/mca/coll/ucc/coll_ucc_common.h b/ompi/mca/coll/ucc/coll_ucc_common.h index 5ae034d7ff5..9d9163aa46d 100644 --- a/ompi/mca/coll/ucc/coll_ucc_common.h +++ b/ompi/mca/coll/ucc/coll_ucc_common.h @@ -47,6 +47,9 @@ _coll.mask |= UCC_COLL_ARGS_FIELD_CB; \ _coll.cb.cb = mca_coll_ucc_completion; \ _coll.cb.data = (void*)_coll_req; \ + } else { \ + _coll.mask |= UCC_COLL_ARGS_FIELD_FLAGS; \ + _coll.flags |= UCC_COLL_ARGS_HINT_OPTIMIZE_LATENCY; \ } \ COLL_UCC_CHECK(ucc_collective_init(&_coll, _req, \ _module->ucc_team)); \ diff --git a/ompi/mca/coll/ucc/coll_ucc_gather.c b/ompi/mca/coll/ucc/coll_ucc_gather.c index 13ab7c3fb20..2b4b2e05474 100644 --- a/ompi/mca/coll/ucc/coll_ucc_gather.c +++ b/ompi/mca/coll/ucc/coll_ucc_gather.c @@ -47,6 +47,7 @@ ucc_status_t mca_coll_ucc_gather_init(const void *sbuf, size_t scount, struct om ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_GATHER, .root = root, .src.info = { diff --git a/ompi/mca/coll/ucc/coll_ucc_gatherv.c b/ompi/mca/coll/ucc/coll_ucc_gatherv.c index 81474d0c38a..74db288ee17 100644 --- a/ompi/mca/coll/ucc/coll_ucc_gatherv.c +++ b/ompi/mca/coll/ucc/coll_ucc_gatherv.c @@ -19,7 +19,6 @@ static inline ucc_status_t mca_coll_ucc_gatherv_init(const void *sbuf, int scoun { ucc_datatype_t ucc_sdt, ucc_rdt; int comm_rank = ompi_comm_rank(ucc_module->comm); - int comm_size = ompi_comm_size(ucc_module->comm); ucc_sdt = ompi_dtype_to_ucc_dtype(sdtype); if (comm_rank == root) { @@ -41,6 +40,7 @@ static inline ucc_status_t mca_coll_ucc_gatherv_init(const void *sbuf, int scoun ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_GATHERV, .root = root, .src.info = { diff --git a/ompi/mca/coll/ucc/coll_ucc_module.c b/ompi/mca/coll/ucc/coll_ucc_module.c index 8860bb0ba2c..3916650b949 100644 --- a/ompi/mca/coll/ucc/coll_ucc_module.c +++ b/ompi/mca/coll/ucc/coll_ucc_module.c @@ -93,7 +93,7 @@ static void mca_coll_ucc_module_construct(mca_coll_ucc_module_t *ucc_module) mca_coll_ucc_module_clear(ucc_module); } -int mca_coll_ucc_progress(void) +static int mca_coll_ucc_progress(void) { ucc_context_progress(mca_coll_ucc_component.ucc_context); return OPAL_SUCCESS; diff --git a/ompi/mca/coll/ucc/coll_ucc_reduce.c b/ompi/mca/coll/ucc/coll_ucc_reduce.c index c37be5413ff..97b5d424ccf 100644 --- a/ompi/mca/coll/ucc/coll_ucc_reduce.c +++ b/ompi/mca/coll/ucc/coll_ucc_reduce.c @@ -31,7 +31,8 @@ static inline ucc_status_t mca_coll_ucc_reduce_init(const void *sbuf, void *rbuf goto fallback; } ucc_coll_args_t coll = { - .mask = 0, + .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_REDUCE, .root = root, .src.info = { diff --git a/ompi/mca/coll/ucc/coll_ucc_reduce_scatter.c b/ompi/mca/coll/ucc/coll_ucc_reduce_scatter.c index 5cc6fa6fc61..15771e48f1b 100644 --- a/ompi/mca/coll/ucc/coll_ucc_reduce_scatter.c +++ b/ompi/mca/coll/ucc/coll_ucc_reduce_scatter.c @@ -48,6 +48,7 @@ ucc_status_t mca_coll_ucc_reduce_scatter_init(const void *sbuf, void *rbuf, cons ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_REDUCE_SCATTERV, .src.info = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_reduce_scatter_block.c b/ompi/mca/coll/ucc/coll_ucc_reduce_scatter_block.c index 2bcec6c6528..781776e42ca 100644 --- a/ompi/mca/coll/ucc/coll_ucc_reduce_scatter_block.c +++ b/ompi/mca/coll/ucc/coll_ucc_reduce_scatter_block.c @@ -42,6 +42,7 @@ ucc_status_t mca_coll_ucc_reduce_scatter_block_init(const void *sbuf, void *rbuf } ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_REDUCE_SCATTER, .src.info = { .buffer = (void*)sbuf, diff --git a/ompi/mca/coll/ucc/coll_ucc_scatter.c b/ompi/mca/coll/ucc/coll_ucc_scatter.c index 1cda93a1145..55351b8151b 100644 --- a/ompi/mca/coll/ucc/coll_ucc_scatter.c +++ b/ompi/mca/coll/ucc/coll_ucc_scatter.c @@ -42,6 +42,7 @@ ucc_status_t mca_coll_ucc_scatter_init(const void *sbuf, size_t scount, ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_SCATTER, .root = root, .src.info = { diff --git a/ompi/mca/coll/ucc/coll_ucc_scatterv.c b/ompi/mca/coll/ucc/coll_ucc_scatterv.c index b731850fabe..b478df7fb11 100644 --- a/ompi/mca/coll/ucc/coll_ucc_scatterv.c +++ b/ompi/mca/coll/ucc/coll_ucc_scatterv.c @@ -43,6 +43,7 @@ ucc_status_t mca_coll_ucc_scatterv_init(const void *sbuf, const int *scounts, ucc_coll_args_t coll = { .mask = 0, + .flags = 0, .coll_type = UCC_COLL_TYPE_SCATTERV, .root = root, .src.info_v = {