1
1

Merge pull request #691 from rhc54/topic/mapper

Add a bunch of debug, and correct an error that caused us to use the …
Этот коммит содержится в:
rhc54 2015-07-07 11:08:01 -07:00
родитель 4b8967f532 7455802a36
Коммит a4aff5e3d9

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

@ -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. * to byslot if nothing else was specified by the user.
*/ */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSLOT);
} else if (opal_hwloc_use_hwthreads_as_cpus) { } else if (opal_hwloc_use_hwthreads_as_cpus) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYHWTHREAD);
} else { } else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYCORE);
} }
} else { } else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSOCKET);
} }
#else #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. * to byslot if nothing else was specified by the user.
*/ */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYSLOT);
} else if (opal_hwloc_use_hwthreads_as_cpus) { } else if (opal_hwloc_use_hwthreads_as_cpus) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYHWTHREAD);
} else { } else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYCORE);
} }
} else { } else {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output, 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); ORTE_SET_MAPPING_POLICY(jdata->map->mapping, ORTE_MAPPING_BYSOCKET);
} }
#else #else
@ -248,24 +248,38 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
jdata->map->binding = opal_hwloc_binding_policy; jdata->map->binding = opal_hwloc_binding_policy;
} else { } else {
orte_mapping_policy_t mpol; 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 /* if the user explicitly mapped-by some object, then we default
* to binding to that object */ * to binding to that object */
if (ORTE_MAPPING_POLICY_IS_SET(jdata->map->mapping) && if (ORTE_MAPPING_POLICY_IS_SET(jdata->map->mapping) &&
ORTE_MAPPING_BYBOARD < mpol && mpol < ORTE_MAPPING_BYSLOT) { ORTE_MAPPING_BYBOARD < mpol && mpol < ORTE_MAPPING_BYSLOT) {
if (ORTE_MAPPING_BYHWTHREAD == mpol) { 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_HWTHREAD);
} else if (ORTE_MAPPING_BYCORE == mpol) { } 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_CORE);
} else if (ORTE_MAPPING_BYL1CACHE == mpol) { } 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_L1CACHE);
} else if (ORTE_MAPPING_BYL2CACHE == mpol) { } 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_L2CACHE);
} else if (ORTE_MAPPING_BYL3CACHE == mpol) { } 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_L3CACHE);
} else if (ORTE_MAPPING_BYSOCKET == mpol) { } 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_SOCKET);
} else if (ORTE_MAPPING_BYNUMA == mpol) { } 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
} }
} else if (ORTE_MAPPING_BYNODE == mpol || ORTE_MAPPING_BYBOARD == mpol) { } 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) { if (1 < orte_rmaps_base.cpus_per_rank) {
/* assigning multiple cpus to a rank implies threading, /* assigning multiple cpus to a rank implies threading,
* so we only bind to the NUMA level */ * 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
} else { } else {
if (opal_hwloc_use_hwthreads_as_cpus) { if (opal_hwloc_use_hwthreads_as_cpus) {
/* if we are using hwthread cpus, then bind to those */ /* 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_HWTHREAD);
} else { } else {
/* for performance, bind to core */ /* 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); 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) { if (1 < orte_rmaps_base.cpus_per_rank) {
/* assigning multiple cpus to a rank implies threading, /* assigning multiple cpus to a rank implies threading,
* so we only bind to the NUMA level */ * 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
} else { } else {
/* for performance, bind to socket */ /* 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); OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_SOCKET);
} }
} }