hwloc-patch [options] [<topology.xml> | refname] [<diff.xml> | -] <output.xml>
The XML difference may have been computed earlier with hwloc-diff or hwloc-compress-dir.
If <output.xml> is given, the new, modified topology is stored in that new file. Otherwise, <topology.xml> is modified in place.
If refname is given instead of <topology.xml>, the input topology filename is automatically guessed by reading the refname field of the XML diff file. By default hwloc-diff generates XML diffs with the right reference topology filename (without any path prefix).
If - is given instead of <diff.xml>, the topology difference is read from the standard input.
NOTE: If some application-specific userdata were been exported to the input XMLs, they will be ignored and discarded from the output because hwloc has no way to understand and patch them.
hwloc-patch's operation is best described through several examples.
Apply a XML topology difference file to an existing topology:
$ hwloc-patch fourmi023.xml diff.xml fourmi023-new.xml
Apply a XML topology difference file whole refname field contains the right input topology:
$ hwloc-patch refname diff.xml fourmi023-new.xml
Apply a XML topology from the standard intput:
$ cat diff.xml | hwloc-patch fourmi023.xml - fourmi023-new.xml
Directly compute the difference between two topologies and apply it to another one, in place:
$ hwloc-diff fourmi023.xml fourmi024.xml | hwloc-patch fourmi025.xml -