Skip to content

Commit ed9ab73

Browse files
committed
patcher: make it work better with sessions model
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 #13021. This patch fixes this problem. Signed-off-by: Howard Pritchard <[email protected]> (cherry picked from commit 860bbd6)
1 parent 6d36009 commit ed9ab73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/mca/memory/patcher/memory_patcher_component.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2016-2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2016-2020 IBM Corporation. All rights reserved.
19+
* Copyright (c) 2025 Triad National Security, LLC. All rights reserved.
1920
*
2021
* $COPYRIGHT$
2122
*
@@ -73,6 +74,7 @@ static int patcher_register(void);
7374
static int patcher_query(int *);
7475

7576
static int mca_memory_patcher_priority;
77+
static int was_executed_already = 0;
7678

7779
opal_memory_patcher_component_t mca_memory_patcher_component = {
7880
.super =
@@ -585,7 +587,6 @@ static int patcher_query(int *priority)
585587

586588
static int patcher_open(void)
587589
{
588-
static int was_executed_already = 0;
589590
int rc;
590591

591592
if (was_executed_already) {
@@ -678,6 +679,8 @@ static int patcher_close(void)
678679
{
679680
mca_base_framework_close(&opal_patcher_base_framework);
680681

682+
was_executed_already = 0;
683+
681684
/* Note that we don't need to unpatch any symbols here; the
682685
patcher framework will take care of all of that for us. */
683686
return OPAL_SUCCESS;

0 commit comments

Comments
 (0)