Skip to content

Commit 5f767e1

Browse files
authored
Merge pull request #5890 from yosefe/topic/osc-ucx-flush-worker-instead-of-world-barrier
osc_ucx: add worker flush before osc module free
2 parents 27d8c8e + b8e1af6 commit 5f767e1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,6 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads)
131131
return OMPI_SUCCESS;
132132
}
133133

134-
static void component_world_barrier(void)
135-
{
136-
ompi_communicator_t *comm = &ompi_mpi_comm_world.comm;
137-
opal_progress_register(progress_callback);
138-
comm->c_coll->coll_barrier(comm, comm->c_coll->coll_barrier_module);
139-
opal_progress_unregister(progress_callback);
140-
}
141-
142134
static int component_finalize(void) {
143135
int i;
144136
for (i = 0; i < ompi_proc_world_size(); i++) {
@@ -148,9 +140,7 @@ static int component_finalize(void) {
148140
}
149141
}
150142

151-
assert(mca_osc_ucx_component.num_modules == 0);
152143
if (mca_osc_ucx_component.ucp_worker != NULL) {
153-
component_world_barrier();
154144
ucp_worker_destroy(mca_osc_ucx_component.ucp_worker);
155145
}
156146

@@ -835,6 +825,8 @@ int ompi_osc_ucx_free(struct ompi_win_t *win) {
835825
ucp_worker_progress(mca_osc_ucx_component.ucp_worker);
836826
}
837827

828+
opal_common_ucx_worker_flush(mca_osc_ucx_component.ucp_worker);
829+
838830
ret = module->comm->c_coll->coll_barrier(module->comm,
839831
module->comm->c_coll->coll_barrier_module);
840832

0 commit comments

Comments
 (0)