Verify that the topology is compatible with the current hwloc library.
This is useful when using the same topology structure (in memory) in different libraries that may use different hwloc installations (for instance if one library embeds a specific version of hwloc, while another library uses a default system-wide hwloc installation).
If all libraries/programs use the same hwloc installation, this function always returns success.
- Returns
0
on success.
-
-1
with errno
set to EINVAL
if incompatible.
- Note
- If sharing between processes with hwloc_shmem_topology_write(), the relevant check is already performed inside hwloc_shmem_topology_adopt().