Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
Merged
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
29 changes: 14 additions & 15 deletions orte/runtime/data_type_support/orte_dt_print_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -491,25 +491,24 @@ int orte_dt_print_proc(char **output, char *prefix, orte_proc_t *src, opal_data_

#if OPAL_HAVE_HWLOC
{
char *locale=NULL;
char *bind = NULL;
char locale[1024], bind[1024];

if (NULL != src->locale) {
hwloc_bitmap_list_asprintf(&locale, src->locale->cpuset);
if (OPAL_ERR_NOT_BOUND == opal_hwloc_base_cset2mapstr(locale, sizeof(locale), src->node->topology, src->locale->cpuset)) {
strcpy(locale, "UNKNOWN");
}
} else {
strcpy(locale, "UNKNOWN");
}
if (NULL != src->bind_location) {
hwloc_bitmap_list_asprintf(&bind, src->bind_location->cpuset);
}
asprintf(&tmp2, "%s\n%s\tState: %s\tRestarts: %d\tApp_context: %ld\tLocale: %s\tBind location: %s\tBinding: %s", tmp, pfx2,
orte_proc_state_to_str(src->state), src->restarts, (long)src->app_idx,
(NULL == locale) ? "UNKNOWN" : locale, bind,
(NULL == src->cpu_bitmap) ? "NULL" : src->cpu_bitmap);
if (NULL != locale) {
free(locale);
}
if (NULL != bind) {
free(bind);
if (OPAL_ERR_NOT_BOUND == opal_hwloc_base_cset2mapstr(bind, sizeof(bind), src->node->topology, src->bind_location->cpuset)) {
strcpy(bind, "UNBOUND");
}
} else {
strcpy(bind, "UNBOUND");
}
asprintf(&tmp2, "%s\n%s\tState: %s\tApp_context: %ld\n%s\tLocale: %s\n%s\tBinding: %s", tmp, pfx2,
orte_proc_state_to_str(src->state), (long)src->app_idx, pfx2, locale, pfx2, bind);
}
#else
asprintf(&tmp2, "%s\n%s\tState: %s\tRestarts: %d\tApp_context: %ld", tmp, pfx2,
Expand Down