diff options
Diffstat (limited to 'openmp/docs/design/Runtimes.rst')
-rw-r--r-- | openmp/docs/design/Runtimes.rst | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/openmp/docs/design/Runtimes.rst b/openmp/docs/design/Runtimes.rst index 9002fa6..f8a8cb8 100644 --- a/openmp/docs/design/Runtimes.rst +++ b/openmp/docs/design/Runtimes.rst @@ -496,7 +496,9 @@ An extended syntax is available when ``KMP_TOPOLOGY_METHOD=hwloc``. Depending on resources are detected, you may be able to specify additional resources, such as NUMA domains and groups of hardware resources that share certain cache levels. -**Basic syntax:** ``[num_units|*]ID[@offset][:attribute] [,[num_units|*]ID[@offset][:attribute]...]`` +**Basic syntax:** ``[:][num_units|*]ID[@offset][:attribute] [,[num_units|*]ID[@offset][:attribute]...]`` + +An optional colon (:) can be specified at the beginning of the syntax to specify an explicit hardware subset. The default is an implicit hardware subset. Supported unit IDs are not case-insensitive. @@ -547,6 +549,18 @@ When any numa or tile units are specified in ``KMP_HW_SUBSET`` and the hwloc topology method is available, the ``KMP_TOPOLOGY_METHOD`` will be automatically set to hwloc, so there is no need to set it explicitly. +For an **explicit hardware subset**, if one or more topology layers detected by the +runtime are omitted from the subset, then those topology layers are ignored. +Only explicitly specified topology layers are used in the subset. + +For an **implicit hardware subset**, it is implied that the socket, core, and thread +topology types should be included in the subset. Other topology layers are not +implicitly included and are ignored if they are not specified in the subset. +Because the socket, core and thread topology types are always included in +implicit hardware subsets, when they are omitted, it is assumed that all +available resources of that type should be used. Implicit hardware subsets are +the default. + If you don't specify one or more types of resource, such as socket or thread, all available resources of that type are used. @@ -565,7 +579,7 @@ This variable does not work if ``KMP_AFFINITY=disabled``. **Default:** If omitted, the default value is to use all the available hardware resources. -**Examples:** +**Implicit Hardware Subset Examples:** * ``2s,4c,2t``: Use the first 2 sockets (s0 and s1), the first 4 cores on each socket (c0 - c3), and 2 threads per core. @@ -590,6 +604,12 @@ available hardware resources. * ``*c:eff1@3``: Use all available sockets, skip the first three cores of efficiency 1, and then use the rest of the available cores of efficiency 1. +Explicit Hardware Subset Examples: + +* ``:2s,6t`` Use exactly the first two sockets and 6 threads per socket. +* ``:1t@7`` Skip the first 7 threads (t0-t6) and use exactly one thread (t7). +* ``:5c,1t`` Use exactly the first 5 cores (c0-c4) and the first thread on each core. + To see the result of the setting, you can specify ``verbose`` modifier in ``KMP_AFFINITY`` environment variable. The OpenMP run-time library will output to ``stderr`` the information about the discovered hardware topology before and |