Skip to content

Commit

Permalink
patcher: make it work better with sessions model
Browse files Browse the repository at this point in the history
Turns out that when Open MPI is configured with --enable-mca-dso
and is using the OFI MTL/BTL/common, a problem is brought out
with the patcher framework the second time through closing the
bml and hence btl frameworks.

See issue open-mpi#13021.

This patch fixes this problem.

Signed-off-by: Howard Pritchard <[email protected]>
  • Loading branch information
hppritcha committed Jan 6, 2025
1 parent a03199c commit 860bbd6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion opal/mca/memory/patcher/memory_patcher_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Copyright (c) 2016-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2020 IBM Corporation. All rights reserved.
* Copyright (c) 2025 Triad National Security, LLC. All rights reserved.
*
* $COPYRIGHT$
*
Expand Down Expand Up @@ -73,6 +74,7 @@ static int patcher_register(void);
static int patcher_query(int *);

static int mca_memory_patcher_priority;
static int was_executed_already = 0;

opal_memory_patcher_component_t mca_memory_patcher_component = {
.super =
Expand Down Expand Up @@ -585,7 +587,6 @@ static int patcher_query(int *priority)

static int patcher_open(void)
{
static int was_executed_already = 0;
int rc;

if (was_executed_already) {
Expand Down Expand Up @@ -678,6 +679,8 @@ static int patcher_close(void)
{
mca_base_framework_close(&opal_patcher_base_framework);

was_executed_already = 0;

/* Note that we don't need to unpatch any symbols here; the
patcher framework will take care of all of that for us. */
return OPAL_SUCCESS;
Expand Down

0 comments on commit 860bbd6

Please sign in to comment.