OpenMPI  0.1.1
Get Some Topology Information

Be sure to see the figure in termsanddefs that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one socket has fewer caches than its peers. More...

Enumerations

enum  hwloc_get_type_depth_e {
  HWLOC_TYPE_DEPTH_UNKNOWN, HWLOC_TYPE_DEPTH_MULTIPLE, HWLOC_TYPE_DEPTH_BRIDGE, HWLOC_TYPE_DEPTH_PCI_DEVICE,
  HWLOC_TYPE_DEPTH_OS_DEVICE
}
 

Functions

HWLOC_DECLSPEC unsigned hwloc_topology_get_depth (hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure
 Get the depth of the hierarchical tree of objects. More...
 
HWLOC_DECLSPEC int hwloc_get_type_depth (hwloc_topology_t topology, hwloc_obj_type_t type)
 Returns the depth of objects of type type. More...
 
HWLOC_DECLSPEC hwloc_obj_type_t hwloc_get_depth_type (hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure
 Returns the type of objects at depth depth. More...
 
HWLOC_DECLSPEC unsigned hwloc_get_nbobjs_by_depth (hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure
 Returns the width of level at depth depth.
 
static __hwloc_inline int
__hwloc_attribute_pure 
hwloc_get_nbobjs_by_type (hwloc_topology_t topology, hwloc_obj_type_t type)
 Returns the width of level type type. More...
 
HWLOC_DECLSPEC int hwloc_topology_is_thissystem (hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure
 Does the topology context come from this system? More...
 

Detailed Description

Be sure to see the figure in termsanddefs that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one socket has fewer caches than its peers.

Enumeration Type Documentation

Enumerator
HWLOC_TYPE_DEPTH_UNKNOWN 

No object of given type exists in the topology.

HWLOC_TYPE_DEPTH_MULTIPLE 

Objects of given type exist at different depth in the topology.

HWLOC_TYPE_DEPTH_BRIDGE 

Virtual depth for bridge object level.

HWLOC_TYPE_DEPTH_PCI_DEVICE 

Virtual depth for PCI device object level.

HWLOC_TYPE_DEPTH_OS_DEVICE 

Virtual depth for software device object level.

Function Documentation

HWLOC_DECLSPEC hwloc_obj_type_t hwloc_get_depth_type ( hwloc_topology_t  topology,
unsigned  depth 
)
static __hwloc_inline int __hwloc_attribute_pure hwloc_get_nbobjs_by_type ( hwloc_topology_t  topology,
hwloc_obj_type_t  type 
)
static

Returns the width of level type type.

If no object for that type exists, 0 is returned. If there are several levels with objects of that type, -1 is returned.

References hwloc_get_nbobjs_by_depth(), hwloc_get_type_depth(), HWLOC_TYPE_DEPTH_MULTIPLE, and HWLOC_TYPE_DEPTH_UNKNOWN.

HWLOC_DECLSPEC int hwloc_get_type_depth ( hwloc_topology_t  topology,
hwloc_obj_type_t  type 
)

Returns the depth of objects of type type.

If no object of this type is present on the underlying architecture, or if the OS doesn't provide this kind of information, the function returns HWLOC_TYPE_DEPTH_UNKNOWN.

If type is absent but a similar type is acceptable, see also hwloc_get_type_or_below_depth() and hwloc_get_type_or_above_depth().

If some objects of the given type exist in different levels, for instance L1 and L2 caches, the function returns HWLOC_TYPE_DEPTH_MULTIPLE.

If an I/O object type is given, the function returns a virtual value because I/O objects are stored in special levels that are not CPU-related. This virtual depth may be passed to other hwloc functions such as hwloc_get_obj_by_depth() but it should not be considered as an actual depth by the application. In particular, it should not be compared with any other object depth or with the entire topology depth.

Referenced by hwloc_cpuset_from_linux_libnuma_bitmask(), hwloc_cpuset_from_linux_libnuma_ulongs(), hwloc_cpuset_from_nodeset(), hwloc_cpuset_from_nodeset_strict(), hwloc_cpuset_to_linux_libnuma_bitmask(), hwloc_cpuset_to_linux_libnuma_ulongs(), hwloc_cpuset_to_nodeset(), hwloc_cpuset_to_nodeset_strict(), hwloc_get_nbobjs_by_type(), hwloc_get_nbobjs_inside_cpuset_by_type(), hwloc_get_next_obj_by_type(), hwloc_get_next_obj_covering_cpuset_by_type(), hwloc_get_next_obj_inside_cpuset_by_type(), hwloc_get_obj_by_type(), hwloc_get_obj_inside_cpuset_by_type(), hwloc_get_type_or_above_depth(), hwloc_get_type_or_below_depth(), hwloc_get_whole_distance_matrix_by_type(), hwloc_nodeset_from_linux_libnuma_bitmask(), hwloc_nodeset_from_linux_libnuma_ulongs(), hwloc_nodeset_to_linux_libnuma_bitmask(), and hwloc_nodeset_to_linux_libnuma_ulongs().

HWLOC_DECLSPEC unsigned hwloc_topology_get_depth ( hwloc_topology_t __hwloc_restrict  topology)

Get the depth of the hierarchical tree of objects.

This is the depth of HWLOC_OBJ_PU objects plus one.

HWLOC_DECLSPEC int hwloc_topology_is_thissystem ( hwloc_topology_t __hwloc_restrict  topology)

Does the topology context come from this system?

Returns
1 if this topology context was built using the system running this program.
0 instead (for instance if using another file-system root, a XML topology file, or a synthetic topology).