Skip to content

Commit

Permalink
hwloc-calc: ignore nodeset output when outputting largest objects
Browse files Browse the repository at this point in the history
We could find the largest objects based on nodeset but it wouldn't
be very useful since the hierarchy of nodes isn't complex.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Jan 29, 2020
1 parent 7212773 commit 3c7865a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion utils/hwloc/hwloc-calc.1in
Expand Up @@ -88,7 +88,7 @@ Only normal CPU-side object types may be used. NUMA nodes cannot.
.TP
\fB\-\-largest\fR
Report (in a human readable format) the list of largest objects which exactly
include all input objects.
include all input objects (by looking at their CPU sets).
None of these output objects intersect each other, and the sum of them is
exactly equivalent to the input. No largest object is included in the input
This is different from \-\-intersect where reported objects may not be
Expand Down
6 changes: 6 additions & 0 deletions utils/hwloc/hwloc-calc.c
Expand Up @@ -141,6 +141,7 @@ hwloc_calc_output(hwloc_topology_t topology, const char *sep, hwloc_bitmap_t set
if (showobjs) {
hwloc_bitmap_t remaining = hwloc_bitmap_dup(set);
int first = 1;
assert(!nodeseto); /* disabled for now, not very useful since the hierarchy of nodes isn't complex */
if (!sep)
sep = " ";
while (!hwloc_bitmap_iszero(remaining)) {
Expand Down Expand Up @@ -467,6 +468,11 @@ int main(int argc, char *argv[])
next:
argc--;
argv++;

if (showobjs && nodeseto) {
fprintf(stderr, "ignoring --nodeset-output when --largest output is enabled\n");
nodeseto = 0;
}
}

ENSURE_LOADED();
Expand Down

0 comments on commit 3c7865a

Please sign in to comment.