| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 |
<meta http-equiv="X-UA-Compatible" content="IE=11"/> |
| 6 |
<meta name="generator" content="Doxygen 1.15.0"/> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 |
<title>Hardware Locality (hwloc): Components and Plugins: Core functions to be used by components</title> |
| 9 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 |
<script type="text/javascript" src="jquery.js"></script> |
| 11 |
<script type="text/javascript" src="dynsections.js"></script> |
| 12 |
<script type="text/javascript" src="clipboard.js"></script> |
| 13 |
<link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 14 |
</head> |
| 15 |
<body> |
| 16 |
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 17 |
<div id="titlearea"> |
| 18 |
<table cellspacing="0" cellpadding="0"> |
| 19 |
<tbody> |
| 20 |
<tr id="projectrow"> |
| 21 |
<td id="projectalign"> |
| 22 |
<div id="projectname">Hardware Locality (hwloc)<span id="projectnumber"> 2.14.0</span> |
| 23 |
</div> |
| 24 |
</td> |
| 25 |
</tr> |
| 26 |
</tbody> |
| 27 |
</table> |
| 28 |
</div> |
| 29 |
<!-- end header part --> |
| 30 |
<!-- Generated by Doxygen 1.15.0 --> |
| 31 |
<script type="text/javascript"> |
| 32 |
$(function() { codefold.init(); }); |
| 33 |
</script> |
| 34 |
<script type="text/javascript" src="menudata.js"></script> |
| 35 |
<script type="text/javascript" src="menu.js"></script> |
| 36 |
<script type="text/javascript"> |
| 37 |
$(function() { |
| 38 |
initMenu('',false,false,'search.php','Search',false); |
| 39 |
}); |
| 40 |
</script> |
| 41 |
<div id="main-nav"></div> |
| 42 |
</div><!-- top --> |
| 43 |
<div id="doc-content"> |
| 44 |
<div class="header"> |
| 45 |
<div class="summary"> |
| 46 |
<a href="#define-members">Macros</a> | |
| 47 |
<a href="#func-members">Functions</a> </div> |
| 48 |
<div class="headertitle"><div class="title">Components and Plugins: Core functions to be used by components </div></div> |
| 49 |
</div><!--header--> |
| 50 |
<div class="contents"> |
| 51 |
<table class="memberdecls"> |
| 52 |
<tr class="heading"><td colspan="2"><h2 id="header-define-members" class="groupheader"><a id="define-members" name="define-members"></a> |
| 53 |
Macros</h2></td></tr> |
| 54 |
<tr class="memitem:gafce07a2a959190a6c7126b321bef202f" id="r_gafce07a2a959190a6c7126b321bef202f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#gafce07a2a959190a6c7126b321bef202f">HWLOC_SHOW_CRITICAL_ERRORS</a>()</td></tr> |
| 55 |
<tr class="memitem:ga3e48b6ac00ed6a40aea975e23eddcdbb" id="r_ga3e48b6ac00ed6a40aea975e23eddcdbb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3e48b6ac00ed6a40aea975e23eddcdbb">HWLOC_SHOW_ALL_ERRORS</a>()</td></tr> |
| 56 |
</table><table class="memberdecls"> |
| 57 |
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a> |
| 58 |
Functions</h2></td></tr> |
| 59 |
<tr class="memitem:gab527c1e0f243f057d31a724794ad9f88" id="r_gab527c1e0f243f057d31a724794ad9f88"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#gab527c1e0f243f057d31a724794ad9f88">hwloc_hide_errors</a> (void)</td></tr> |
| 60 |
<tr class="memitem:ga1e105cfe3c8e77f34cc6df3841deebbc" id="r_ga1e105cfe3c8e77f34cc6df3841deebbc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga1e105cfe3c8e77f34cc6df3841deebbc">hwloc__insert_object_by_cpuset</a> (struct hwloc_topology *topology, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> root, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj, const char *reason)</td></tr> |
| 61 |
<tr class="memitem:ga0ef97debde503b56367689b07bb3e901" id="r_ga0ef97debde503b56367689b07bb3e901"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0ef97debde503b56367689b07bb3e901">hwloc_insert_object_by_parent</a> (struct hwloc_topology *topology, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> parent, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj)</td></tr> |
| 62 |
<tr class="memitem:ga0b5c75b2dc37cea2e8a29c4812baf4b3" id="r_ga0b5c75b2dc37cea2e8a29c4812baf4b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0b5c75b2dc37cea2e8a29c4812baf4b3">hwloc_alloc_setup_object</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00167.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, unsigned os_index)</td></tr> |
| 63 |
<tr class="memitem:ga754b61041ceee9685534a2c5d3cd0156" id="r_ga754b61041ceee9685534a2c5d3cd0156"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga754b61041ceee9685534a2c5d3cd0156">hwloc_obj_add_children_sets</a> (<a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj)</td></tr> |
| 64 |
<tr class="memitem:ga120d8bd74922e1030b621409a6b0be61" id="r_ga120d8bd74922e1030b621409a6b0be61"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga120d8bd74922e1030b621409a6b0be61">hwloc_topology_reconnect</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned long flags)</td></tr> |
| 65 |
</table> |
| 66 |
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2> |
| 67 |
<dl class="section note"><dt>Note</dt><dd>These structures and functions may change when <a class="el" href="a00165.html#gaac5bc1f46f55e10ef0141a68ce70e21f" title="Current component and plugin ABI version (see hwloc/plugins.h).">HWLOC_COMPONENT_ABI</a> is modified. </dd></dl> |
| 68 |
<a name="doc-define-members" id="doc-define-members"></a><h2 id="header-doc-define-members" class="groupheader">Macro Definition Documentation</h2> |
| 69 |
<a id="ga3e48b6ac00ed6a40aea975e23eddcdbb" name="ga3e48b6ac00ed6a40aea975e23eddcdbb"></a> |
| 70 |
<h2 class="memtitle"><span class="permalink"><a href="#ga3e48b6ac00ed6a40aea975e23eddcdbb">◆ </a></span>HWLOC_SHOW_ALL_ERRORS</h2> |
| 71 |
|
| 72 |
<div class="memitem"> |
| 73 |
<div class="memproto"> |
| 74 |
<table class="memname"> |
| 75 |
<tr> |
| 76 |
<td class="memname">#define HWLOC_SHOW_ALL_ERRORS</td> |
| 77 |
<td>(</td> |
| 78 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 79 |
<td></td> |
| 80 |
</tr> |
| 81 |
</table> |
| 82 |
</div><div class="memdoc"> |
| 83 |
<b>Value:</b><div class="fragment"><div class="line">(<a class="code hl_function" href="#gab527c1e0f243f057d31a724794ad9f88">hwloc_hide_errors</a>() == 0)</div> |
| 84 |
<div class="ttc" id="aa00216_html_gab527c1e0f243f057d31a724794ad9f88"><div class="ttname"><a href="#gab527c1e0f243f057d31a724794ad9f88">hwloc_hide_errors</a></div><div class="ttdeci">int hwloc_hide_errors(void)</div><div class="ttdoc">Check whether error messages are hidden.</div></div> |
| 85 |
</div><!-- fragment --> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
<a id="gafce07a2a959190a6c7126b321bef202f" name="gafce07a2a959190a6c7126b321bef202f"></a> |
| 89 |
<h2 class="memtitle"><span class="permalink"><a href="#gafce07a2a959190a6c7126b321bef202f">◆ </a></span>HWLOC_SHOW_CRITICAL_ERRORS</h2> |
| 90 |
|
| 91 |
<div class="memitem"> |
| 92 |
<div class="memproto"> |
| 93 |
<table class="memname"> |
| 94 |
<tr> |
| 95 |
<td class="memname">#define HWLOC_SHOW_CRITICAL_ERRORS</td> |
| 96 |
<td>(</td> |
| 97 |
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 98 |
<td></td> |
| 99 |
</tr> |
| 100 |
</table> |
| 101 |
</div><div class="memdoc"> |
| 102 |
<b>Value:</b><div class="fragment"><div class="line">(<a class="code hl_function" href="#gab527c1e0f243f057d31a724794ad9f88">hwloc_hide_errors</a>() < 2)</div> |
| 103 |
</div><!-- fragment --> |
| 104 |
</div> |
| 105 |
</div> |
| 106 |
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2> |
| 107 |
<a id="ga1e105cfe3c8e77f34cc6df3841deebbc" name="ga1e105cfe3c8e77f34cc6df3841deebbc"></a> |
| 108 |
<h2 class="memtitle"><span class="permalink"><a href="#ga1e105cfe3c8e77f34cc6df3841deebbc">◆ </a></span>hwloc__insert_object_by_cpuset()</h2> |
| 109 |
|
| 110 |
<div class="memitem"> |
| 111 |
<div class="memproto"> |
| 112 |
<table class="memname"> |
| 113 |
<tr> |
| 114 |
<td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc__insert_object_by_cpuset </td> |
| 115 |
<td>(</td> |
| 116 |
<td class="paramtype">struct hwloc_topology *</td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 117 |
</tr> |
| 118 |
<tr> |
| 119 |
<td class="paramkey"></td> |
| 120 |
<td></td> |
| 121 |
<td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>root</em></span>, </td> |
| 122 |
</tr> |
| 123 |
<tr> |
| 124 |
<td class="paramkey"></td> |
| 125 |
<td></td> |
| 126 |
<td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj</em></span>, </td> |
| 127 |
</tr> |
| 128 |
<tr> |
| 129 |
<td class="paramkey"></td> |
| 130 |
<td></td> |
| 131 |
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>reason</em></span> )</td> |
| 132 |
</tr> |
| 133 |
</table> |
| 134 |
</div><div class="memdoc"> |
| 135 |
|
| 136 |
<p>Add an object to the topology. </p> |
| 137 |
<p>Insert new object <code class="param">obj</code> in the topology starting under existing object <code class="param">root</code> (if <code>NULL</code>, the topology root object is used).</p> |
| 138 |
<p>It is sorted along the tree of other objects according to the inclusion of cpusets, to eventually be added as a child of the smallest object including this object.</p> |
| 139 |
<p>If the cpuset is empty, the type of the object (and maybe some attributes) must be enough to find where to insert the object. This is especially true for NUMA nodes with memory and no CPUs.</p> |
| 140 |
<p>The given object should not have children.</p> |
| 141 |
<p>This shall only be called before levels are built.</p> |
| 142 |
<p>The caller should check whether the object type is filtered-out before calling this function.</p> |
| 143 |
<p>The topology cpuset/nodesets will be enlarged to include the object sets.</p> |
| 144 |
<p><code class="param">reason</code> is a unique string identifying where and why this insertion call was performed (it will be displayed in case of internal insertion error).</p> |
| 145 |
<p>Returns the object on success. Returns NULL and frees obj on error. Returns another object and frees obj if it was merged with an identical pre-existing object. </p> |
| 146 |
|
| 147 |
</div> |
| 148 |
</div> |
| 149 |
<a id="ga0b5c75b2dc37cea2e8a29c4812baf4b3" name="ga0b5c75b2dc37cea2e8a29c4812baf4b3"></a> |
| 150 |
<h2 class="memtitle"><span class="permalink"><a href="#ga0b5c75b2dc37cea2e8a29c4812baf4b3">◆ </a></span>hwloc_alloc_setup_object()</h2> |
| 151 |
|
| 152 |
<div class="memitem"> |
| 153 |
<div class="memproto"> |
| 154 |
<table class="memname"> |
| 155 |
<tr> |
| 156 |
<td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_alloc_setup_object </td> |
| 157 |
<td>(</td> |
| 158 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 159 |
</tr> |
| 160 |
<tr> |
| 161 |
<td class="paramkey"></td> |
| 162 |
<td></td> |
| 163 |
<td class="paramtype"><a class="el" href="a00167.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a></td> <td class="paramname"><span class="paramname"><em>type</em></span>, </td> |
| 164 |
</tr> |
| 165 |
<tr> |
| 166 |
<td class="paramkey"></td> |
| 167 |
<td></td> |
| 168 |
<td class="paramtype">unsigned</td> <td class="paramname"><span class="paramname"><em>os_index</em></span> )</td> |
| 169 |
</tr> |
| 170 |
</table> |
| 171 |
</div><div class="memdoc"> |
| 172 |
|
| 173 |
<p>Allocate and initialize an object of the given type and physical index. </p> |
| 174 |
<p>If <code class="param">os_index</code> is unknown or irrelevant, use <code>HWLOC_UNKNOWN_INDEX</code>. </p> |
| 175 |
|
| 176 |
</div> |
| 177 |
</div> |
| 178 |
<a id="gab527c1e0f243f057d31a724794ad9f88" name="gab527c1e0f243f057d31a724794ad9f88"></a> |
| 179 |
<h2 class="memtitle"><span class="permalink"><a href="#gab527c1e0f243f057d31a724794ad9f88">◆ </a></span>hwloc_hide_errors()</h2> |
| 180 |
|
| 181 |
<div class="memitem"> |
| 182 |
<div class="memproto"> |
| 183 |
<table class="memname"> |
| 184 |
<tr> |
| 185 |
<td class="memname">int hwloc_hide_errors </td> |
| 186 |
<td>(</td> |
| 187 |
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| 188 |
<td></td> |
| 189 |
</tr> |
| 190 |
</table> |
| 191 |
</div><div class="memdoc"> |
| 192 |
|
| 193 |
<p>Check whether error messages are hidden. </p> |
| 194 |
<p>Callers should print critical error messages (e.g. invalid hw topo info, invalid config) only if this function returns strictly less than 2.</p> |
| 195 |
<p>Callers should print non-critical error messages (e.g. failure to initialize CUDA) if this function returns 0.</p> |
| 196 |
<p>This function return 1 by default (show critical only), 0 in lstopo (show all), or anything set in HWLOC_HIDE_ERRORS in the environment.</p> |
| 197 |
<p>Use macros <a class="el" href="#gafce07a2a959190a6c7126b321bef202f">HWLOC_SHOW_CRITICAL_ERRORS()</a> and <a class="el" href="#ga3e48b6ac00ed6a40aea975e23eddcdbb">HWLOC_SHOW_ALL_ERRORS()</a> for clarity. </p> |
| 198 |
|
| 199 |
</div> |
| 200 |
</div> |
| 201 |
<a id="ga0ef97debde503b56367689b07bb3e901" name="ga0ef97debde503b56367689b07bb3e901"></a> |
| 202 |
<h2 class="memtitle"><span class="permalink"><a href="#ga0ef97debde503b56367689b07bb3e901">◆ </a></span>hwloc_insert_object_by_parent()</h2> |
| 203 |
|
| 204 |
<div class="memitem"> |
| 205 |
<div class="memproto"> |
| 206 |
<table class="memname"> |
| 207 |
<tr> |
| 208 |
<td class="memname">void hwloc_insert_object_by_parent </td> |
| 209 |
<td>(</td> |
| 210 |
<td class="paramtype">struct hwloc_topology *</td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 211 |
</tr> |
| 212 |
<tr> |
| 213 |
<td class="paramkey"></td> |
| 214 |
<td></td> |
| 215 |
<td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>parent</em></span>, </td> |
| 216 |
</tr> |
| 217 |
<tr> |
| 218 |
<td class="paramkey"></td> |
| 219 |
<td></td> |
| 220 |
<td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj</em></span> )</td> |
| 221 |
</tr> |
| 222 |
</table> |
| 223 |
</div><div class="memdoc"> |
| 224 |
|
| 225 |
<p>Insert an object somewhere in the topology. </p> |
| 226 |
<p>It is added as the last child of the given parent. The cpuset is completely ignored, so strange objects such as I/O devices should preferably be inserted with this.</p> |
| 227 |
<p>When used for "normal" children with cpusets (when importing from XML when duplicating a topology), the caller should make sure that:</p><ul> |
| 228 |
<li>children are inserted in order,</li> |
| 229 |
<li>children cpusets do not intersect.</li> |
| 230 |
</ul> |
| 231 |
<p>The given object may have normal, I/O or Misc children, as long as they are in order as well. These children must have valid parent and next_sibling pointers.</p> |
| 232 |
<p>The caller should check whether the object type is filtered-out before calling this function. </p> |
| 233 |
|
| 234 |
</div> |
| 235 |
</div> |
| 236 |
<a id="ga754b61041ceee9685534a2c5d3cd0156" name="ga754b61041ceee9685534a2c5d3cd0156"></a> |
| 237 |
<h2 class="memtitle"><span class="permalink"><a href="#ga754b61041ceee9685534a2c5d3cd0156">◆ </a></span>hwloc_obj_add_children_sets()</h2> |
| 238 |
|
| 239 |
<div class="memitem"> |
| 240 |
<div class="memproto"> |
| 241 |
<table class="memname"> |
| 242 |
<tr> |
| 243 |
<td class="memname">int hwloc_obj_add_children_sets </td> |
| 244 |
<td>(</td> |
| 245 |
<td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj</em></span></td><td>)</td> |
| 246 |
<td></td> |
| 247 |
</tr> |
| 248 |
</table> |
| 249 |
</div><div class="memdoc"> |
| 250 |
|
| 251 |
<p>Setup object cpusets/nodesets by OR'ing its children. </p> |
| 252 |
<p>Used when adding an object late in the topology. Will update the new object by OR'ing all its new children sets.</p> |
| 253 |
<p>Used when PCI backend adds a hostbridge parent, when distances add a new Group, etc. </p> |
| 254 |
|
| 255 |
</div> |
| 256 |
</div> |
| 257 |
<a id="ga120d8bd74922e1030b621409a6b0be61" name="ga120d8bd74922e1030b621409a6b0be61"></a> |
| 258 |
<h2 class="memtitle"><span class="permalink"><a href="#ga120d8bd74922e1030b621409a6b0be61">◆ </a></span>hwloc_topology_reconnect()</h2> |
| 259 |
|
| 260 |
<div class="memitem"> |
| 261 |
<div class="memproto"> |
| 262 |
<table class="memname"> |
| 263 |
<tr> |
| 264 |
<td class="memname">int hwloc_topology_reconnect </td> |
| 265 |
<td>(</td> |
| 266 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 267 |
</tr> |
| 268 |
<tr> |
| 269 |
<td class="paramkey"></td> |
| 270 |
<td></td> |
| 271 |
<td class="paramtype">unsigned long</td> <td class="paramname"><span class="paramname"><em>flags</em></span> )</td> |
| 272 |
</tr> |
| 273 |
</table> |
| 274 |
</div><div class="memdoc"> |
| 275 |
|
| 276 |
<p>Request a reconnection of children and levels in the topology. </p> |
| 277 |
<p>May be used by backends during discovery if they need arrays or lists of object within levels or children to be fully connected.</p> |
| 278 |
<p><code class="param">flags</code> is currently unused, must 0. </p> |
| 279 |
|
| 280 |
</div> |
| 281 |
</div> |
| 282 |
</div><!-- contents --> |
| 283 |
<!-- start footer part --> |
| 284 |
<hr class="footer"/><address class="footer"><small> |
| 285 |
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 |
| 286 |
</small></address> |
| 287 |
</div><!-- doc-content --> |
| 288 |
</body> |
| 289 |
</html> |