@@ -146,21 +146,24 @@ report_insert_error_format_obj(char *buf, size_t buflen, hwloc_obj_t obj)
146
146
char typestr [64 ];
147
147
char * cpusetstr ;
148
148
char * nodesetstr = NULL ;
149
+ char indexstr [64 ] = "" ;
150
+ char groupstr [64 ] = "" ;
149
151
150
152
hwloc_obj_type_snprintf (typestr , sizeof (typestr ), obj , 0 );
151
153
hwloc_bitmap_asprintf (& cpusetstr , obj -> cpuset );
154
+ if (obj -> os_index != HWLOC_UNKNOWN_INDEX )
155
+ snprintf (indexstr , sizeof (indexstr ), "P#%u " , obj -> os_index );
156
+ if (obj -> type == HWLOC_OBJ_GROUP )
157
+ snprintf (groupstr , sizeof (groupstr ), "groupkind %u-%u " , obj -> attr -> group .kind , obj -> attr -> group .subkind );
152
158
if (obj -> nodeset ) /* may be missing during insert */
153
159
hwloc_bitmap_asprintf (& nodesetstr , obj -> nodeset );
154
- if (obj -> os_index != HWLOC_UNKNOWN_INDEX )
155
- snprintf (buf , buflen , "%s (P#%u cpuset %s%s%s)" ,
156
- typestr , obj -> os_index , cpusetstr ,
157
- nodesetstr ? " nodeset " : "" ,
158
- nodesetstr ? nodesetstr : "" );
159
- else
160
- snprintf (buf , buflen , "%s (cpuset %s%s%s)" ,
161
- typestr , cpusetstr ,
162
- nodesetstr ? " nodeset " : "" ,
163
- nodesetstr ? nodesetstr : "" );
160
+ snprintf (buf , buflen , "%s (%s%s%s%s%scpuset %s%s%s)" ,
161
+ typestr ,
162
+ indexstr ,
163
+ obj -> subtype ? "subtype " : "" , obj -> subtype ? obj -> subtype : "" , obj -> subtype ? " " : "" ,
164
+ groupstr ,
165
+ cpusetstr ,
166
+ nodesetstr ? " nodeset " : "" , nodesetstr ? nodesetstr : "" );
164
167
free (cpusetstr );
165
168
free (nodesetstr );
166
169
}
@@ -178,8 +181,9 @@ static void report_insert_error(hwloc_obj_t new, hwloc_obj_t old, const char *ms
178
181
fprintf (stderr , "****************************************************************************\n" );
179
182
fprintf (stderr , "* hwloc %s received invalid information from the operating system.\n" , HWLOC_VERSION );
180
183
fprintf (stderr , "*\n" );
181
- fprintf (stderr , "* Failed with: %s\n" , msg );
182
- fprintf (stderr , "* while inserting %s at %s\n" , newstr , oldstr );
184
+ fprintf (stderr , "* Failed with error: %s\n" , msg );
185
+ fprintf (stderr , "* while inserting %s\n" , newstr );
186
+ fprintf (stderr , "* at %s\n" , oldstr );
183
187
fprintf (stderr , "* coming from: %s\n" , reason );
184
188
fprintf (stderr , "*\n" );
185
189
fprintf (stderr , "* The following FAQ entry in the hwloc documentation may help:\n" );
0 commit comments