hwloc-diff [options] <input1.xml> <input2.xml>
The output difference may later be applied to another topology with hwloc-patch.
hwloc-compress-dir may be used for computing the diffs between all XML files in a directory.
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 compare them.
hwloc-diff's operation is best described through several examples.
Compute the difference between two XML topologies and output it to stdout:
$ hwloc-diff fourmi023.xml fourmi024.xml
Found 11 differences, exporting to stdout
<?xml version="1.0" encoding="UTF-8"?>
Output the difference to file diff.xml instead:
$ hwloc-diff fourmi023.xml fourmi024.xml diff.xml
Found 11 differences, exporting to diff.xml
When the difference is too complex to be represented:
$ hwloc-diff fourmi023.xml avakas-frontend1.xml
Found 1 differences, including 1 too complex ones.
Cannot export differences to stdout
Directly compute the difference between two topologies and apply it to another one:
$ hwloc-diff fourmi023.xml fourmi024.xml | hwloc-patch fourmi025.xml -
If the difference is too complex to be represented, an error is returned and the output is not generated.