OXIESEC PANEL
- Current Dir:
/
/
usr
/
local
/
doc
/
cmake
/
html
/
prop_test
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
04/04/2023 07:10:48 PM
rwxr-xr-x
π
ATTACHED_FILES.html
5.23 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
ATTACHED_FILES_ON_FAIL.html
5.42 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
COST.html
5.83 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
DEPENDS.html
7.05 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
DISABLED.html
6.61 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
ENVIRONMENT.html
5.52 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
ENVIRONMENT_MODIFICATION.html
10.31 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
FAIL_REGULAR_EXPRESSION.html
6.69 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
FIXTURES_CLEANUP.html
9.08 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
FIXTURES_REQUIRED.html
18.53 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
FIXTURES_SETUP.html
9.26 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
LABELS.html
5.79 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
MEASUREMENT.html
5.6 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
PASS_REGULAR_EXPRESSION.html
6.67 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
PROCESSORS.html
6.56 KB
04/04/2023 07:05:22 PM
rw-r--r--
π
PROCESSOR_AFFINITY.html
6.08 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
REQUIRED_FILES.html
8.7 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
RESOURCE_GROUPS.html
11.47 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
RESOURCE_LOCK.html
7.01 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
RUN_SERIAL.html
5.32 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
SKIP_REGULAR_EXPRESSION.html
7.13 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
SKIP_RETURN_CODE.html
5.83 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
TIMEOUT.html
5.59 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
TIMEOUT_AFTER_MATCH.html
8.96 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
WILL_FAIL.html
5.19 KB
04/04/2023 07:05:23 PM
rw-r--r--
π
WORKING_DIRECTORY.html
5.82 KB
04/04/2023 07:05:23 PM
rw-r--r--
Editing: RESOURCE_GROUPS.html
Close
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" /> <title>RESOURCE_GROUPS — CMake 3.26.3 Documentation</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/cmake.css" /> <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../_static/doctools.js"></script> <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="RESOURCE_LOCK" href="RESOURCE_LOCK.html" /> <link rel="prev" title="REQUIRED_FILES" href="REQUIRED_FILES.html" /> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="RESOURCE_LOCK.html" title="RESOURCE_LOCK" accesskey="N">next</a> |</li> <li class="right" > <a href="REQUIRED_FILES.html" title="REQUIRED_FILES" accesskey="P">previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> » </li> <li> <a href="../index.html">3.26.3 Documentation</a> » </li> <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" accesskey="U">cmake-properties(7)</a> »</li> <li class="nav-item nav-item-this"><a href="">RESOURCE_GROUPS</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <section id="resource-groups"> <span id="prop_test:RESOURCE_GROUPS"></span><h1>RESOURCE_GROUPS<a class="headerlink" href="#resource-groups" title="Permalink to this heading">ΒΆ</a></h1> <div class="versionadded"> <p><span class="versionmodified added">New in version 3.16.</span></p> </div> <p>Specify resources required by a test, grouped in a way that is meaningful to the test. See <a class="reference internal" href="../manual/ctest.1.html#ctest-resource-allocation"><span class="std std-ref">resource allocation</span></a> for more information on how this property integrates into the CTest resource allocation feature.</p> <p>The <code class="docutils literal notranslate"><span class="pre">RESOURCE_GROUPS</span></code> property is a <a class="reference internal" href="../manual/cmake-language.7.html#cmake-language-lists"><span class="std std-ref">semicolon-separated list</span></a> of group descriptions. Each entry consists of an optional number of groups using the description followed by a series of resource requirements for those groups. These requirements (and the number of groups) are separated by commas. The resource requirements consist of the name of a resource type, followed by a colon, followed by an unsigned integer specifying the number of slots required on one resource of the given type.</p> <p>The <code class="docutils literal notranslate"><span class="pre">RESOURCE_GROUPS</span></code> property tells CTest what resources a test expects to use grouped in a way meaningful to the test. The test itself must read the <a class="reference internal" href="../manual/ctest.1.html#ctest-resource-environment-variables"><span class="std std-ref">environment variables</span></a> to determine which resources have been allocated to each group. For example, each group may correspond to a process the test will spawn when executed.</p> <p>Consider the following example:</p> <div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_test(</span><span class="no">NAME</span><span class="w"> </span><span class="nb">MyTest</span><span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">MyExe</span><span class="nf">)</span><span class="w"></span> <span class="nf">set_property(</span><span class="no">TEST</span><span class="w"> </span><span class="nb">MyTest</span><span class="w"> </span><span class="no">PROPERTY</span><span class="w"> </span><span class="no">RESOURCE_GROUPS</span><span class="w"></span> <span class="w"> </span><span class="s">"2,gpus:2"</span><span class="w"></span> <span class="w"> </span><span class="s">"gpus:4,crypto_chips:2"</span><span class="nf">)</span><span class="w"></span> </pre></div> </div> <p>In this example, there are two group descriptions (implicitly separated by a semicolon.) The content of the first description is <code class="docutils literal notranslate"><span class="pre">2,gpus:2</span></code>. This description specifies 2 groups, each of which requires 2 slots from a single GPU. The content of the second description is <code class="docutils literal notranslate"><span class="pre">gpus:4,crypto_chips:2</span></code>. This description does not specify a group count, so a default of 1 is assumed. This single group requires 4 slots from a single GPU and 2 slots from a single cryptography chip. In total, 3 resource groups are specified for this test, each with its own unique requirements.</p> <p>Note that the number of slots following the resource type specifies slots from a <em>single</em> instance of the resource. If the resource group can tolerate receiving slots from different instances of the same resource, it can indicate this by splitting the specification into multiple requirements of one slot. For example:</p> <div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_test(</span><span class="no">NAME</span><span class="w"> </span><span class="nb">MyTest</span><span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">MyExe</span><span class="nf">)</span><span class="w"></span> <span class="nf">set_property(</span><span class="no">TEST</span><span class="w"> </span><span class="nb">MyTest</span><span class="w"> </span><span class="no">PROPERTY</span><span class="w"> </span><span class="no">RESOURCE_GROUPS</span><span class="w"></span> <span class="w"> </span><span class="s">"gpus:1,gpus:1,gpus:1,gpus:1"</span><span class="nf">)</span><span class="w"></span> </pre></div> </div> <p>In this case, the single resource group indicates that it needs four GPU slots, all of which may come from separate GPUs (though they don't have to; CTest may still assign slots from the same GPU.)</p> <p>When CTest sets the <a class="reference internal" href="../manual/ctest.1.html#ctest-resource-environment-variables"><span class="std std-ref">environment variables</span></a> for a test, it assigns a group number based on the group description, starting at 0 on the left and the number of groups minus 1 on the right. For example, in the example above, the two groups in the first description would have IDs of 0 and 1, and the single group in the second description would have an ID of 2.</p> <p>Both the <code class="docutils literal notranslate"><span class="pre">RESOURCE_GROUPS</span></code> and <span class="target" id="index-0-prop_test:RESOURCE_LOCK"></span><a class="reference internal" href="RESOURCE_LOCK.html#prop_test:RESOURCE_LOCK" title="RESOURCE_LOCK"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">RESOURCE_LOCK</span></code></a> properties serve similar purposes, but they are distinct and orthogonal. Resources specified by <code class="docutils literal notranslate"><span class="pre">RESOURCE_GROUPS</span></code> do not affect <span class="target" id="index-1-prop_test:RESOURCE_LOCK"></span><a class="reference internal" href="RESOURCE_LOCK.html#prop_test:RESOURCE_LOCK" title="RESOURCE_LOCK"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">RESOURCE_LOCK</span></code></a>, and vice versa. Whereas <span class="target" id="index-2-prop_test:RESOURCE_LOCK"></span><a class="reference internal" href="RESOURCE_LOCK.html#prop_test:RESOURCE_LOCK" title="RESOURCE_LOCK"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">RESOURCE_LOCK</span></code></a> is a simpler property that is used for locking one global resource, <code class="docutils literal notranslate"><span class="pre">RESOURCE_GROUPS</span></code> is a more advanced property that allows multiple tests to simultaneously use multiple resources of the same type, specifying their requirements in a fine-grained manner.</p> </section> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <div> <h4>Previous topic</h4> <p class="topless"><a href="REQUIRED_FILES.html" title="previous chapter">REQUIRED_FILES</a></p> </div> <div> <h4>Next topic</h4> <p class="topless"><a href="RESOURCE_LOCK.html" title="next chapter">RESOURCE_LOCK</a></p> </div> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/prop_test/RESOURCE_GROUPS.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> <input type="submit" value="Go" /> </form> </div> </div> <script>document.getElementById('searchbox').style.display = "block"</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="RESOURCE_LOCK.html" title="RESOURCE_LOCK" >next</a> |</li> <li class="right" > <a href="REQUIRED_FILES.html" title="REQUIRED_FILES" >previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> » </li> <li> <a href="../index.html">3.26.3 Documentation</a> » </li> <li class="nav-item nav-item-1"><a href="../manual/cmake-properties.7.html" >cmake-properties(7)</a> »</li> <li class="nav-item nav-item-this"><a href="">RESOURCE_GROUPS</a></li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2000-2023 Kitware, Inc. and Contributors. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.0.2. </div> </body> </html>