Skip to content

Commit 6b6e65a

Browse files
committed
rtc/hwloc: fix MCA parameter handling
always re-initialize vmhole *before* mca_base_component_var_register() otherwise the vmhole gets NULL'ified if orte is initialized a second time. that typically occurs when Open MPI is configure'd with --disable-dlopen and the app does MPI_T_init_thread(); MPI_T_finalize(); MPI_T_init_thread(); Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 2216b80 commit 6b6e65a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

orte/mca/rtc/hwloc/rtc_hwloc_component.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
44
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
55
* reserved.
6+
* Copyright (c) 2017 Research Organization for Information Science
7+
* and Technology (RIST). All rights reserved.
68
* $COPYRIGHT$
79
*
810
* Additional copyrights may follow
@@ -45,7 +47,8 @@ orte_rtc_hwloc_component_t mca_rtc_hwloc_component = {
4547
.kind = VM_HOLE_BIGGEST
4648
};
4749

48-
static char *vmhole = "biggest";
50+
static char *biggest = "biggest";
51+
static char *vmhole;
4952

5053
static int rtc_hwloc_register(void)
5154
{
@@ -60,6 +63,7 @@ static int rtc_hwloc_register(void)
6063
&my_priority);
6164

6265
mca_rtc_hwloc_component.kind = VM_HOLE_BIGGEST;
66+
vmhole = biggest;
6367
(void) mca_base_component_var_register(c, "vmhole",
6468
"Kind of VM hole to identify - none, begin, biggest, libs, heap, stack (default=biggest)",
6569
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,

0 commit comments

Comments
 (0)