Skip to content

Commit 27ba4b6

Browse files
author
Tomislav Janjusic
committed
ompi/osc/ucx: Remove workerpool's global thread storage tables.
Co-authored-by: Artem Y. Polyakov <artemp@mellanox.com> Signed-off-by: Tomislav Janjusic <tomislavj@mellanox.com>
1 parent 41df122 commit 27ba4b6

File tree

6 files changed

+236
-608
lines changed

6 files changed

+236
-608
lines changed

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,6 @@ int ompi_osc_ucx_win_attach(struct ompi_win_t *win, void *base, size_t len) {
639639
int ompi_osc_ucx_win_detach(struct ompi_win_t *win, const void *base) {
640640
ompi_osc_ucx_module_t *module = (ompi_osc_ucx_module_t*) win->w_osc_module;
641641
int insert, contain;
642-
int ret = OMPI_SUCCESS;
643642

644643
assert(module->state.dynamic_win_count > 0);
645644

@@ -655,7 +654,7 @@ int ompi_osc_ucx_win_detach(struct ompi_win_t *win, const void *base) {
655654

656655
module->local_dynamic_win_info[contain].refcnt--;
657656
if (module->local_dynamic_win_info[contain].refcnt == 0) {
658-
ret = opal_common_ucx_wpmem_free(module->local_dynamic_win_info[contain].mem);
657+
opal_common_ucx_wpmem_free(module->local_dynamic_win_info[contain].mem);
659658
memmove((void *)&(module->local_dynamic_win_info[contain]),
660659
(void *)&(module->local_dynamic_win_info[contain+1]),
661660
(OMPI_OSC_UCX_ATTACH_MAX - (contain + 1)) * sizeof(ompi_osc_local_dynamic_win_info_t));
@@ -666,7 +665,7 @@ int ompi_osc_ucx_win_detach(struct ompi_win_t *win, const void *base) {
666665
module->state.dynamic_win_count--;
667666
}
668667

669-
return ret;
668+
return OMPI_SUCCESS;
670669
}
671670

672671
int ompi_osc_ucx_free(struct ompi_win_t *win) {
@@ -691,19 +690,13 @@ int ompi_osc_ucx_free(struct ompi_win_t *win) {
691690
free(module->addrs);
692691
free(module->state_addrs);
693692

694-
ret = opal_common_ucx_wpmem_free(module->state_mem);
695-
if (ret != OMPI_SUCCESS) {
696-
return ret;
697-
}
698-
699-
ret = opal_common_ucx_wpmem_free(module->mem);
700-
if (ret != OMPI_SUCCESS) {
701-
return ret;
702-
}
693+
opal_common_ucx_wpmem_free(module->state_mem);
694+
opal_common_ucx_wpmem_free(module->mem);
703695

704696
opal_common_ucx_wpctx_release(module->ctx);
705697

706-
if (module->disp_units) free(module->disp_units);
698+
if (module->disp_units)
699+
free(module->disp_units);
707700
ompi_comm_free(&module->comm);
708701

709702
free(module);

opal/mca/common/ucx/common_ucx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ OPAL_DECLSPEC int opal_common_ucx_del_procs_nofence(opal_common_ucx_del_proc_t *
117117
size_t my_rank, size_t max_disconnect, ucp_worker_h worker);
118118
OPAL_DECLSPEC void opal_common_ucx_mca_var_register(const mca_base_component_t *component);
119119

120-
121120
/**
122121
* Load an integer value of \c size bytes from \c ptr and cast it to uint64_t.
123122
*/

0 commit comments

Comments
 (0)