1HWLOC-ANNOTATE(1)                    hwloc                   HWLOC-ANNOTATE(1)
2
3
4

NAME

6       hwloc-annotate - Modify attributes in a XML topology
7

SYNOPSIS

9       hwloc-annotate  [options]  <input.xml>  <output.xml>  <location> <mode>
10       <annotation>
11
12       Note that hwloc(7) provides a detailed explanation of the hwloc  system
13       and  of valid <location> formats; it should be read before reading this
14       man page.
15

OPTIONS

17       --ri      Remove all info attributes that  exist  with  the  same  name
18                 before  adding  the new one.  This option is only accepted in
19                 "info" mode.  If the info value is  omitted,  existing  infos
20                 are replaced with nothing.
21
22       --ci      Clear  the  existing  info  attributes  in the target objects
23                 before annotating.  If no new  annotation  has  to  be  added
24                 after clearing, mode should be set to none.
25
26       --cu      Clear  the  existing  userdata  from  the target objects.  If
27                 nothing else has to be performed after clearing, mode  should
28                 be set to none.
29
30       --cd      Clear  the  existing distances from the topology.  If nothing
31                 else has to be performed after clearing, mode should  be  set
32                 to none.
33

DESCRIPTION

35       hwloc-annotate loads a topology from a XML file, adds some annotations,
36       and export the resulting topology to another XML file.  The  input  and
37       output files may be the same.
38
39       The annotation may be string info attributes.  This is specified by the
40       mode:
41
42       info <name> <value>
43              Specifies a new string info attribute whose  name  is  name  and
44              value is value.
45
46       misc <name>
47              Specifies a new Misc object name.
48
49       distances <filename> [<flags>]
50              Specifies new distances to be added to the topology using speci‐
51              fications in <filename>.  The optional flags  (0  unless  speci‐
52              fied)  corresponds to the flags given to the function hwloc_dis‐
53              tances_set().  location is ignored in this mode.
54
55              The first line of the pointed file must be a integer  represent‐
56              ing  a distances kind as defined in hwloc/distances.h.  The sec‐
57              ond line is the number of objects  involved  in  the  distances.
58              The  next lines contain one object each.  The next lines contain
59              one distance value each, or a single line may be  given  with  a
60              integer combination of format x*y or x*y*z.
61
62       none   No  new annotation is added. This is useful when clearing exist‐
63              ing attributes.
64
65       Annotations may be added to one specific object in the topology, all of
66       them,  or  all of a given type.  This is specified by the location (see
67       also EXAMPLES below).  Objects may be specified as location tuples,  as
68       explained  in  hwloc(7).  However hexadecimal bitmasks are not accepted
69       since they may correspond to multiple objects.
70
71       NOTE: The existing annotations may be listed with hwloc-info.
72
73       NOTE: It is highly recommended that you read the hwloc(7) overview page
74       before  reading  this  man  page.   Most  of  the concepts described in
75       hwloc(7) directly apply to the hwloc-annotate utility.
76

EXAMPLES

78       hwloc-annotate's operation is best described through several examples.
79
80       Add an info attribute to all Core objects:
81
82           $ hwloc-annotate input.xml output.xml Core:all info infoname  info‐
83       value
84
85       Add  a Misc object named "foobar" under the root object of the topology
86       and modify the input XML directly:
87
88           $ hwloc-annotate file.xml file.xml root misc foobar
89
90       Add an info attribute to OS device #2 and #3:
91
92           $ hwloc-annotate input.xml output.xml os:2-3  info  infoname  info‐
93       value
94
95       Change  package  objects to green with red text in the lstopo graphical
96       output:
97
98           $ hwloc-annotate topo.xml  topo.xml  package:all  info  lstopoStyle
99       "Background=#00ff00;Text=#ff0000"
100           $ lstopo -i topo.xml
101

RETURN VALUE

103       Upon  successful  execution, hwloc-annotate generates the output topol‐
104       ogy.  The return value is 0.
105
106       hwloc-annotate will return nonzero if any kind of error occurs, such as
107       (but not limited to) failure to parse the command line.
108

SEE ALSO

110       hwloc(7), lstopo(1), hwloc-info(1)
111
112
113
114
1152.0.4                            Jun 03, 2019                HWLOC-ANNOTATE(1)
Impressum