Skip to content

Commit

Permalink
partitions: make it work with sessions
Browse files Browse the repository at this point in the history
even when configuring with --enable-mca-dso.

The partition framework open/close was not being properly managed
prior to this patch, leading to segfaults upon reinitialization if
the app starts another session after closing a previous one and the
Open MPI was configured with --enable-mca-dso.

Related to #12887

Signed-off-by: Howard Pritchard <[email protected]>
  • Loading branch information
hppritcha committed Oct 28, 2024
1 parent c393881 commit cdbf8c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ompi/instance/instance.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static mca_base_framework_t *ompi_framework_dependencies[] = {
&ompi_hook_base_framework, &ompi_op_base_framework,
&opal_allocator_base_framework, &opal_rcache_base_framework, &opal_mpool_base_framework, &opal_smsc_base_framework,
&ompi_bml_base_framework, &ompi_pml_base_framework, &ompi_coll_base_framework,
&ompi_osc_base_framework, NULL,
&ompi_osc_base_framework, &ompi_part_base_framework, NULL,
};

static mca_base_framework_t *ompi_lazy_frameworks[] = {
Expand Down Expand Up @@ -657,11 +657,7 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
return ompi_instance_print_error ("ompi_win_init() failed", ret);
}

/* initialize partcomm */
if (OMPI_SUCCESS != (ret = mca_base_framework_open(&ompi_part_base_framework, 0))) {
return ompi_instance_print_error ("mca_part_base_select() failed", ret);
}

/* select part component to use */
if (OMPI_SUCCESS != (ret = mca_part_base_select (true, true))) {
return ompi_instance_print_error ("mca_part_base_select() failed", ret);
}
Expand Down

0 comments on commit cdbf8c6

Please sign in to comment.