Skip to content

don't try to bind tasks when direct launched by an external launcher that did no binding #1386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions opal/mca/hwloc/base/hwloc_base_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ hwloc_cpuset_t opal_hwloc_base_given_cpus=NULL;
opal_hwloc_base_map_t opal_hwloc_base_map = OPAL_HWLOC_BASE_MAP_NONE;
opal_hwloc_base_mbfa_t opal_hwloc_base_mbfa = OPAL_HWLOC_BASE_MBFA_WARN;
opal_binding_policy_t opal_hwloc_binding_policy=0;
bool opal_hwloc_base_bind_direct_launched = false;
char *opal_hwloc_base_slot_list=NULL;
char *opal_hwloc_base_cpu_set=NULL;
bool opal_hwloc_report_bindings=false;
Expand Down Expand Up @@ -165,6 +166,12 @@ static int opal_hwloc_base_register(mca_base_register_flag_t flags)
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0, OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_topo_file);

opal_hwloc_base_bind_direct_launched = true;
(void) mca_base_var_register("opal", "hwloc", "base", "bind_direct_launched",
"bind processes when direct launched ",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0, OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY, &opal_hwloc_base_bind_direct_launched);

/* register parameters */
return OPAL_SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions opal/mca/hwloc/hwloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ OPAL_DECLSPEC extern hwloc_cpuset_t opal_hwloc_my_cpuset;
OPAL_DECLSPEC extern bool opal_hwloc_report_bindings;
OPAL_DECLSPEC extern hwloc_obj_type_t opal_hwloc_levels[];
OPAL_DECLSPEC extern bool opal_hwloc_use_hwthreads_as_cpus;
OPAL_DECLSPEC extern bool opal_hwloc_base_bind_direct_launched;

END_C_DECLS

Expand Down
8 changes: 8 additions & 0 deletions orte/mca/ess/base/ess_base_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ int orte_ess_base_proc_binding(void)
}
}

/* direct launched: use whatever the extarnal launcher has set */
if ((NULL == orte_process_info.my_daemon_uri) && !opal_hwloc_base_bind_direct_launched) {
OPAL_OUTPUT_VERBOSE((5, orte_ess_base_framework.framework_output,
"%s Process externally launched -- use their binding",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
goto MOVEON;
}

/* see if we were bound when launched */
if (!orte_proc_is_bound) {
OPAL_OUTPUT_VERBOSE((5, orte_ess_base_framework.framework_output,
Expand Down