1
1

Add a bunch of debug, and correct an error that caused us to use the wrong mapping policy when determining the default binding policy

Этот коммит содержится в:
Ralph Castain 2015-07-07 10:09:31 -07:00
родитель eb582b8276
Коммит 7455802a36

Просмотреть файл

@ -113,20 +113,20 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
* to byslot if nothing else was specified by the user.
*/
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using byslot");
"mca:rmaps[%d] mapping not given - using byslot", __LINE__);
ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSLOT);
} else if (opal_hwloc_use_hwthreads_as_cpus) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using byhwthread");
"mca:rmaps[%d] mapping not given - using byhwthread", __LINE__);
ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYHWTHREAD);
} else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using bycore");
"mca:rmaps[%d] mapping not given - using bycore", __LINE__);
ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYCORE);
}
} else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using bysocket");
"mca:rmaps[%d] mapping not given - using bysocket", __LINE__);
ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSOCKET);
}
#else
@ -190,20 +190,20 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
* to byslot if nothing else was specified by the user.
*/
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using byslot");
"mca:rmaps[%d] mapping not given - using byslot", __LINE__);
ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYSLOT);
} else if (opal_hwloc_use_hwthreads_as_cpus) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using byhwthread");
"mca:rmaps[%d] mapping not given - using byhwthread", __LINE__);
ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYHWTHREAD);
} else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not given - using bycore");
"mca:rmaps[%d] mapping not given - using bycore", __LINE__);
ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYCORE);
}
} else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps mapping not set by user - using bysocket");
"mca:rmaps[%d] mapping not set by user - using bysocket", __LINE__);
ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYSOCKET);
}
#else
@ -248,24 +248,38 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
jdata->map->binding = opal_hwloc_binding_policy;
} else {
orte_mapping_policy_t mpol;
mpol = ORTE_GET_MAPPING_POLICY(orte_rmaps_base.mapping);
mpol = ORTE_GET_MAPPING_POLICY(jdata->map->mapping);
/* if the user explicitly mapped-by some object, then we default
* to binding to that object */
if (ORTE_MAPPING_POLICY_IS_SET(jdata->map->mapping) &&
ORTE_MAPPING_BYBOARD < mpol && mpol < ORTE_MAPPING_BYSLOT) {
if (ORTE_MAPPING_BYHWTHREAD == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using byhwthread", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_HWTHREAD);
} else if (ORTE_MAPPING_BYCORE == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bycore", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_CORE);
} else if (ORTE_MAPPING_BYL1CACHE == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using byl1cache", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_L1CACHE);
} else if (ORTE_MAPPING_BYL2CACHE == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using byl2cache", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_L2CACHE);
} else if (ORTE_MAPPING_BYL3CACHE == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using byl3cache", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_L3CACHE);
} else if (ORTE_MAPPING_BYSOCKET == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bysocket", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_SOCKET);
} else if (ORTE_MAPPING_BYNUMA == mpol) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bynuma", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
}
} else if (ORTE_MAPPING_BYNODE == mpol || ORTE_MAPPING_BYBOARD == mpol) {
@ -276,13 +290,19 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
if (1 < orte_rmaps_base.cpus_per_rank) {
/* assigning multiple cpus to a rank implies threading,
* so we only bind to the NUMA level */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bynuma", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
} else {
if (opal_hwloc_use_hwthreads_as_cpus) {
/* if we are using hwthread cpus, then bind to those */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using byhwthread", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_HWTHREAD);
} else {
/* for performance, bind to core */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bycore", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_CORE);
}
}
@ -290,9 +310,13 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
if (1 < orte_rmaps_base.cpus_per_rank) {
/* assigning multiple cpus to a rank implies threading,
* so we only bind to the NUMA level */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bynuma", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
} else {
/* for performance, bind to socket */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps[%d] binding not given - using bysocket", __LINE__);
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_SOCKET);
}
}