1
1

Fix the cpus-per-rank when binding to hwthreads. Add cpus-per-rank to diag printout

Thanks to Elena for reporting the problem

This commit was SVN r28508.
This commit is contained in:
Ralph Castain 2013-05-14 20:17:50 +00:00
parent 32a8ff5255
commit 5296099ecb
2 changed files with 11 additions and 6 deletions

View File

@ -316,7 +316,10 @@ static int bind_downwards(orte_job_t *jdata,
"%s GOT %d CPUS",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ncpus);
/* track the number bound */
data = (opal_hwloc_obj_data_t*)trg_obj->userdata;
if (NULL == (data = (opal_hwloc_obj_data_t*)trg_obj->userdata)) {
data = OBJ_NEW(opal_hwloc_obj_data_t);
trg_obj->userdata = data;
}
data->num_bound++;
/* error out if adding a proc would cause overload and that wasn't allowed */
if (ncpus < data->num_bound &&

View File

@ -660,21 +660,23 @@ int orte_dt_print_map(char **output, char *prefix, orte_job_map_t *src, opal_dat
if (orte_devel_level_output) {
#if OPAL_HAVE_HWLOC
asprintf(&tmp, "\n%sMapper requested: %s Last mapper: %s Mapping policy: %s Ranking policy: %s Binding policy: %s Cpu set: %s PPR: %s",
asprintf(&tmp, "\n%sMapper requested: %s Last mapper: %s Mapping policy: %s Ranking policy: %s\n%sBinding policy: %s Cpu set: %s PPR: %s Cpus-per-rank: %d",
pfx2, (NULL == src->req_mapper) ? "NULL" : src->req_mapper,
(NULL == src->last_mapper) ? "NULL" : src->last_mapper,
orte_rmaps_base_print_mapping(src->mapping),
orte_rmaps_base_print_ranking(src->ranking),
opal_hwloc_base_print_binding(src->binding),
pfx2, opal_hwloc_base_print_binding(src->binding),
(NULL == opal_hwloc_base_cpu_set) ? "NULL" : opal_hwloc_base_cpu_set,
(NULL == src->ppr) ? "NULL" : src->ppr);
(NULL == src->ppr) ? "NULL" : src->ppr,
(int)src->cpus_per_rank);
#else
asprintf(&tmp, "\n%sMapper requested: %s Last mapper: %s Mapping policy: %s Ranking policy: %s PPR: %s",
asprintf(&tmp, "\n%sMapper requested: %s Last mapper: %s Mapping policy: %s Ranking policy: %s PPR: %s Cpus-per-rank: %d",
pfx2, (NULL == src->req_mapper) ? "NULL" : src->req_mapper,
(NULL == src->last_mapper) ? "NULL" : src->last_mapper,
orte_rmaps_base_print_mapping(src->mapping),
orte_rmaps_base_print_ranking(src->ranking),
(NULL == src->ppr) ? "NULL" : src->ppr);
(NULL == src->ppr) ? "NULL" : src->ppr,
(int)src->cpus_per_rank));
#endif
if (ORTE_VPID_INVALID == src->daemon_vpid_start) {