diff --git a/ompi/mca/coll/ucg/Makefile.am b/ompi/mca/coll/ucg/Makefile.am index e4593d415f4dfebdc74df13b62a1d2319e08ede8..925f41c9f57e40043253a424873cf2eb7f16ae33 100644 --- a/ompi/mca/coll/ucg/Makefile.am +++ b/ompi/mca/coll/ucg/Makefile.am @@ -47,6 +47,6 @@ mca_coll_ucg_la_LIBADD = $(coll_ucg_LIBS) mca_coll_ucg_la_LDFLAGS = -module -avoid-version $(coll_ucg_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) -libmca_coll_ucg_la_SOURCES = $(coll_ucg_sources) +libmca_coll_ucg_la_SOURCES =$(coll_ucg_sources) libmca_coll_ucg_la_LIBADD = $(coll_ucg_LIBS) libmca_coll_ucg_la_LDFLAGS = -module -avoid-version $(coll_ucg_LDFLAGS) diff --git a/ompi/mca/coll/ucg/coll_ucg.h b/ompi/mca/coll/ucg/coll_ucg.h index 3bcb266721b5004593ffe2633db289b7ff3f429d..57c154048a5c2d2bcb53c113f717e95ed826cb74 100644 --- a/ompi/mca/coll/ucg/coll_ucg.h +++ b/ompi/mca/coll/ucg/coll_ucg.h @@ -41,15 +41,15 @@ typedef struct { bool initialized; /** MCA parameter */ - int priority; /* Priority of this component */ - int verbose; /* Verbose level of this component */ - int max_rcache_size; /* Max size of request cache */ - char *disable_coll; /* JUST FOR TEST, may remove later */ - char *topology; /* Topology file path */ + int priority; /* Priority of this component */ + int verbose; /* Verbose level of this component */ + int max_rcache_size; /* Max size of request cache */ + char *disable_coll; /* JUST FOR TEST, may remove later */ + char *topology; /* Topology file path */ ucg_context_h ucg_context; - char **blacklist; /** disabled collective operations */ + char **blacklist; /** disabled collective operations */ } mca_coll_ucg_component_t; OMPI_MODULE_DECLSPEC extern mca_coll_ucg_component_t mca_coll_ucg_component; @@ -167,7 +167,7 @@ int mca_coll_ucg_ibcast(void *buffer, int count, MPI_Datatype datatype, int root mca_coll_base_module_t *module); int mca_coll_ucg_ibcast_cache(void *buffer, int count, MPI_Datatype datatype, int root, - ompi_communicator_t *comm, ompi_request_t **request, + ompi_communicator_t *comm, ompi_request_t **request, mca_coll_base_module_t *module); int mca_coll_ucg_bcast_init(void *buffer, int count, MPI_Datatype datatype, int root, @@ -186,10 +186,10 @@ int mca_coll_ucg_alltoallv_cache(const void *sbuf, const int *scounts, const int ompi_communicator_t *comm, mca_coll_base_module_t *module); int mca_coll_ucg_ialltoallv(const void *sbuf, const int *scounts, const int *sdispls, - ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, - const int *rdispls, ompi_datatype_t *rdtype, - ompi_communicator_t *comm, ompi_request_t **request, - mca_coll_base_module_t *module); + ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, + const int *rdispls, ompi_datatype_t *rdtype, + ompi_communicator_t *comm, ompi_request_t **request, + mca_coll_base_module_t *module); int mca_coll_ucg_ialltoallv_cache(const void *sbuf, const int *scounts, const int *sdispls, ompi_datatype_t *sdtype, void *rbuf, const int *rcounts, @@ -203,7 +203,7 @@ int mca_coll_ucg_alltoallv_init(const void *sbuf, const int *scounts, const int ompi_communicator_t *comm, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module); -/*barrier */ +/* barrier */ int mca_coll_ucg_barrier(ompi_communicator_t *comm, mca_coll_base_module_t *module); int mca_coll_ucg_barrier_cache(ompi_communicator_t *comm, mca_coll_base_module_t *module); @@ -217,7 +217,7 @@ int mca_coll_ucg_ibarrier_cache(ompi_communicator_t *comm, ompi_request_t **requ int mca_coll_ucg_barrier_init(ompi_communicator_t *comm, ompi_info_t *info, ompi_request_t **request, mca_coll_base_module_t *module); -/*scatterv */ +/* scatterv */ int mca_coll_ucg_scatterv(const void *sbuf, const int *scounts, const int *disps, ompi_datatype_t *sdtype, void *rbuf, int rcount, ompi_datatype_t *rdtype, int root, diff --git a/ompi/mca/coll/ucg/coll_ucg_allgatherv.c b/ompi/mca/coll/ucg/coll_ucg_allgatherv.c index 0bb25cba9ae7feed1dfbfd4cea79856c2a4abc60..eed0d4b212fc438337dd2bd0ce8af049dc57e025 100644 --- a/ompi/mca/coll/ucg/coll_ucg_allgatherv.c +++ b/ompi/mca/coll/ucg/coll_ucg_allgatherv.c @@ -1,7 +1,7 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. - * All rights reserved. + * All rights reserved. * COPYRIGHT$ * * Additional copyrights may follow diff --git a/ompi/mca/coll/ucg/coll_ucg_gatherv.c b/ompi/mca/coll/ucg/coll_ucg_gatherv.c index c1c347d98997ebb639d373c3bf674ce8f40d44c6..6016e68b036b2dd57ff927d7b51e3e1a11e73d61 100644 --- a/ompi/mca/coll/ucg/coll_ucg_gatherv.c +++ b/ompi/mca/coll/ucg/coll_ucg_gatherv.c @@ -228,8 +228,8 @@ int mca_coll_ucg_igatherv_cache(const void *sbuf, int sendcount, fallback: UCG_DEBUG("fallback igatherv"); return ucg_module->previous_igatherv(sbuf, sendcount, sdtype, rbuf, - recvcounts, disps, rdtype, root, comm, request, - ucg_module->previous_gatherv_module); + recvcounts, disps, rdtype, root, comm, request, + ucg_module->previous_gatherv_module); } int mca_coll_ucg_gatherv_init(const void *sbuf, int sendcount, diff --git a/ompi/mca/coll/ucg/coll_ucg_module.c b/ompi/mca/coll/ucg/coll_ucg_module.c index 8b874edb54c70c3bf0689ed58e45c58fc88dd700..9fdda8b08f1efc1989d526ba4eb8b2513fb9c672 100644 --- a/ompi/mca/coll/ucg/coll_ucg_module.c +++ b/ompi/mca/coll/ucg/coll_ucg_module.c @@ -17,17 +17,17 @@ #include "ompi/mca/pml/pml.h" #include "ompi/mca/pml/ucx/pml_ucx.h" -/* Ensure coll ucg can be dlopened if global var "ompi_pml_ucx" is not existed */ +/* Ensure coll ucg can be dlopened if global var "ompi_pml_ucx" is not existed*/ mca_pml_ucx_module_t ompi_pml_ucx __attribute__((weak)); #define MCA_COLL_UCG_SET_HANDLER(_api) \ if (mca_coll_ucg_is_api_enable(#_api)) { \ - module->super.coll_ ## _api = mca_coll_ucg_ ## _api; \ + module->super.coll_ ## _api = mca_coll_ucg_ ## _api;\ } #define MCA_COLL_UCG_SET_CACHE_HANDLER(_api) \ if (mca_coll_ucg_is_api_enable(#_api)) { \ - module->super.coll_ ## _api = mca_coll_ucg_ ## _api ## _cache; \ + module->super.coll_ ## _api = mca_coll_ucg_ ## _api ## _cache; \ } #define MCA_COLL_UCG_SAVE_FALLBACK(_api) \ @@ -90,8 +90,8 @@ static ucg_status_t mca_coll_ucg_oob_blocking_allgather(const void *sendbuf, //bcast recvbuf to all rank for (i = 1; i < size; i++) { rc = MCA_PML_CALL(send((char *)recvbuf, size * count, MPI_CHAR, i, - MCA_COLL_BASE_TAG_ALLGATHER, - MCA_PML_BASE_SEND_STANDARD, comm)); + MCA_COLL_BASE_TAG_ALLGATHER, + MCA_PML_BASE_SEND_STANDARD, comm)); if (rc != OMPI_SUCCESS) { goto out; } @@ -99,15 +99,15 @@ static ucg_status_t mca_coll_ucg_oob_blocking_allgather(const void *sendbuf, } else { //send data to rank 0 rc = MCA_PML_CALL(send((char *)sendbuf, count, MPI_CHAR, 0, MCA_COLL_BASE_TAG_ALLGATHER, - MCA_PML_BASE_SEND_STANDARD, comm)); + MCA_PML_BASE_SEND_STANDARD, comm)); if (rc != OMPI_SUCCESS) { goto out; } //recv gather data from rank 0 rc = MCA_PML_CALL(recv((char *)recvbuf, size * count, MPI_CHAR, 0, - MCA_COLL_BASE_TAG_ALLGATHER, comm, - MPI_STATUS_IGNORE)); + MCA_COLL_BASE_TAG_ALLGATHER, comm, + MPI_STATUS_IGNORE)); if (rc != OMPI_SUCCESS) { goto out; } @@ -575,7 +575,7 @@ static void mca_coll_ucg_module_construct(mca_coll_ucg_module_t *module) MCA_COLL_UCG_SET_CACHE_HANDLER(allreduce); MCA_COLL_UCG_SET_CACHE_HANDLER(barrier); MCA_COLL_UCG_SET_CACHE_HANDLER(bcast); - // MCA_COLL_UCG_SET_CACHE_HANDLER(alltoallv); + MCA_COLL_UCG_SET_CACHE_HANDLER(alltoallv); // MCA_COLL_UCG_SET_CACHE_HANDLER(scatterv); MCA_COLL_UCG_SET_CACHE_HANDLER(gatherv); MCA_COLL_UCG_SET_CACHE_HANDLER(allgatherv); @@ -583,7 +583,7 @@ static void mca_coll_ucg_module_construct(mca_coll_ucg_module_t *module) MCA_COLL_UCG_SET_CACHE_HANDLER(iallreduce); MCA_COLL_UCG_SET_CACHE_HANDLER(ibarrier); MCA_COLL_UCG_SET_CACHE_HANDLER(ibcast); - // MCA_COLL_UCG_SET_CACHE_HANDLER(ialltoallv); + MCA_COLL_UCG_SET_CACHE_HANDLER(ialltoallv); MCA_COLL_UCG_SET_CACHE_HANDLER(iscatterv); MCA_COLL_UCG_SET_CACHE_HANDLER(igatherv); MCA_COLL_UCG_SET_CACHE_HANDLER(iallgatherv); @@ -591,7 +591,7 @@ static void mca_coll_ucg_module_construct(mca_coll_ucg_module_t *module) MCA_COLL_UCG_SET_HANDLER(allreduce); MCA_COLL_UCG_SET_HANDLER(barrier); MCA_COLL_UCG_SET_HANDLER(bcast); - // MCA_COLL_UCG_SET_HANDLER(alltoallv); + MCA_COLL_UCG_SET_HANDLER(alltoallv); // MCA_COLL_UCG_SET_HANDLER(scatterv); MCA_COLL_UCG_SET_HANDLER(gatherv); MCA_COLL_UCG_SET_HANDLER(allgatherv); @@ -599,7 +599,7 @@ static void mca_coll_ucg_module_construct(mca_coll_ucg_module_t *module) MCA_COLL_UCG_SET_HANDLER(iallreduce); MCA_COLL_UCG_SET_HANDLER(ibarrier); MCA_COLL_UCG_SET_HANDLER(ibcast); - // MCA_COLL_UCG_SET_HANDLER(ialltoallv); + MCA_COLL_UCG_SET_HANDLER(ialltoallv); MCA_COLL_UCG_SET_HANDLER(iscatterv); MCA_COLL_UCG_SET_HANDLER(igatherv); MCA_COLL_UCG_SET_HANDLER(iallgatherv); @@ -608,7 +608,7 @@ static void mca_coll_ucg_module_construct(mca_coll_ucg_module_t *module) MCA_COLL_UCG_SET_HANDLER(allreduce_init); MCA_COLL_UCG_SET_HANDLER(barrier_init); MCA_COLL_UCG_SET_HANDLER(bcast_init); - // MCA_COLL_UCG_SET_HANDLER(alltoallv_init); + MCA_COLL_UCG_SET_HANDLER(alltoallv_init); MCA_COLL_UCG_SET_HANDLER(scatterv_init); MCA_COLL_UCG_SET_HANDLER(gatherv_init); MCA_COLL_UCG_SET_HANDLER(allgatherv_init); diff --git a/ompi/mca/coll/ucg/coll_ucg_request.c b/ompi/mca/coll/ucg/coll_ucg_request.c index 3cc082367a10477d859fe2cffc3aedc1ec7c3754..a39922adbc4663cf225a60e5ec2b62b7ad4c5745 100644 --- a/ompi/mca/coll/ucg/coll_ucg_request.c +++ b/ompi/mca/coll/ucg/coll_ucg_request.c @@ -210,7 +210,7 @@ void mca_coll_ucg_rpool_cleanup(void) int mca_coll_ucg_subargs_pool_init(uint32_t size) { OBJ_CONSTRUCT(&mca_coll_ucg_subargs_pool.flist, opal_free_list_t); - int rc = opal_free_list_init(&mca_coll_ucg_subargs_pool.flist, + int rc = opal_free_list_init(&mca_coll_ucg_subargs_pool.flist, sizeof(mca_coll_ucg_subargs_t) + 4 * size * sizeof(int), opal_cache_line_size, OBJ_CLASS(mca_coll_ucg_subargs_t), 0, 0, @@ -367,7 +367,7 @@ void mca_coll_ucg_rcache_mark_cacheable(mca_coll_ucg_req_t *coll_req, mca_coll_ucg_args_t *key) { OBJ_CONSTRUCT(&coll_req->list, opal_list_item_t); - mca_coll_ucg_rcache_coll_req_args_init(&coll_req->args, key); // deep copy + mca_coll_ucg_rcache_coll_req_args_init(&coll_req->args, key); // deep copy ucg_coll_ucg_rcache_ref(coll_req); coll_req->cacheable = true; return; @@ -577,7 +577,7 @@ int mca_coll_ucg_request_common_init(mca_coll_ucg_req_t *coll_req, ucg_request_info_t *info = &coll_req->info; info->field_mask = 0; if (nb || persistent) { - //For those case, the request is not done in the current call stack. + // For those case, the request is not done in the current call stack. info->field_mask |= UCG_REQUEST_INFO_FIELD_CB; info->complete_cb.cb = mca_coll_ucg_request_complete; info->complete_cb.arg = coll_req; @@ -622,7 +622,7 @@ int mca_coll_ucg_request_execute(mca_coll_ucg_req_t *coll_req) int count = 0; while (UCG_INPROGRESS == (status = ucg_request_test(ucg_req))) { - //TODO: test wether opal_progress() can be removed + // TODO: test wether opal_progress() can be removed if (++count % 1000 == 0) { opal_progress(); } diff --git a/ompi/mca/coll/ucg/coll_ucg_request.h b/ompi/mca/coll/ucg/coll_ucg_request.h index f9b1aa9458c5cee515d023bd425644c2044594d7..157329d1c0293590e16118b3066d877b1cd981ce 100644 --- a/ompi/mca/coll/ucg/coll_ucg_request.h +++ b/ompi/mca/coll/ucg/coll_ucg_request.h @@ -58,12 +58,12 @@ } while(0) /* - * Non-blocking execution pattern: + * Non-blockingexecution pattern: * 1. Initialize coll request * 2. Non-blocking execute * 3. Mark coll request cacheable * 4. Assign ompi request - * If any failure, go to fallback. + * If any failure, goto fallback. */ #define MCA_COLL_UCG_REQUEST_PATTERN_NB(_ompi_req, _cache_key, _coll_request_init, ...) \ do {\ @@ -126,12 +126,12 @@ typedef struct { typedef struct { opal_free_list_item_t super; int buf[]; -}mca_coll_ucg_subargs_t; +} mca_coll_ucg_subargs_t; OBJ_CLASS_DECLARATION(mca_coll_ucg_subargs_t); typedef struct { opal_free_list_t flist; -}mca_coll_ucg_subargs_pool_t; +} mca_coll_ucg_subargs_pool_t; typedef struct mca_coll_bcast_args { void *buffer; diff --git a/ompi/mca/coll/ucg/configure.m4 b/ompi/mca/coll/ucg/configure.m4 index fef730bc9063e70e858866b6cc1ca7df38219b2d..31b33095a371637871e4e3441e9c7ad7b8fe4648 100644 --- a/ompi/mca/coll/ucg/configure.m4 +++ b/ompi/mca/coll/ucg/configure.m4 @@ -2,9 +2,9 @@ # Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. # All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # diff --git a/ompi/mca/coll/ucg/owner.txt b/ompi/mca/coll/ucg/owner.txt index b315445dcd4b2b919d6c00e975f31944d4184cb0..9c08c938c34a5a9e7ebf057549c0d4ad4b2493ad 100644 --- a/ompi/mca/coll/ucg/owner.txt +++ b/ompi/mca/coll/ucg/owner.txt @@ -1,5 +1,5 @@ -# -# owner/status file +# +# owner/status file # owner: institution that is responsible for this package # status: e.g. active, maintenance, unmaintained #