[Openmp-commits] [PATCH] D123564: [OpenMP][doc] Add documents for barrier related environment variables

Misono Tomohiro via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Apr 11 19:56:52 PDT 2022


t-msn created this revision.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
t-msn added reviewers: AndreyChurbanov, jlpeyton.
t-msn added a project: OpenMP.
t-msn added a subscriber: openmp-commits.
t-msn published this revision for review.
t-msn added a comment.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

I couldn't find any documents on the web. Is there any existing materials?


Update for KMP_FORKJOIN_BARRIER{_PATTERN}, KMP_PLAIN_BARRIER{_PATTERN}
and KMP_REDUCTION_BARRIER{_PATTERN}.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123564

Files:
  openmp/docs/design/Runtimes.rst


Index: openmp/docs/design/Runtimes.rst
===================================================================
--- openmp/docs/design/Runtimes.rst
+++ openmp/docs/design/Runtimes.rst
@@ -433,6 +433,33 @@
 
 **Default:** ``load_balance`` (on all supported platforms)
 
+KMP_FORKJOIN_BARRIER
+""""""""""""""""""""
+Specifies log2 of branching-factor of forkjoin barrier.
+This only has a meaning if tree or hyper barrier pattern is used.
+
+| **Syntax:** ``KMP_FORKJOIN_BARRIER=<factor-for-gather>,<factor-for-release>``
+| **Default:** 2,2
+
+KMP_FORKJOIN_BARRIER_PATTERN
+""""""""""""""""""""""""""""
+Specifies barrier pattern of forkjoin barrier which is used in worker threads' fork and join.
+As libomp barrier adopts centralized barrier, barrier pattern can be specified for gather
+and release phase respectively.
+
+**Currently supported patterns:**
+
+* ``linear``: Linear centralized barrier
+* ``tree``: Static tree barrier. Branching-factor is set by ``KMP_FORKJOIN_BARRIER``
+* ``hyper``: Like tree but use hyper-cube. Branching-factor is set by ``KMP_FORKJOIN_BARRIER``
+* ``hier``: Like tree but use system's hierarchical information of caches
+* ``dist``: Two-level distributed barrier. To use this, all barrier patterns must be
+  specified as dist
+
+| **Syntax:** ``KMP_FORKJOIN_BARRIER_PATTERN=<gather-pattern>,<release-pattern>``
+| **Default:** hyper,hyper
+| **Related environment variable:** ``KMP_PLAIN_BARRIER_PATTERN``, ``KMP_REDUCTION_BARRIER_PATTERN``
+
 KMP_HOT_TEAMS_MAX_LEVEL
 """""""""""""""""""""""
 Sets the maximum nested level to which teams of threads will be hot.
@@ -593,6 +620,40 @@
 | **Default:** ``throughput``
 | **Related environment variable:** ``KMP_BLOCKTIME`` and ``OMP_WAIT_POLICY``
 
+KMP_PLAIN_BARRIER
+"""""""""""""""""
+Specifies log2 of branching-factor of plain barrier.
+This only has a meaning if tree or hyper barrier pattern is used.
+
+| **Syntax:** ``KMP_PLAIN_BARRIER=<factor-for-gather>,<factor-for-release>``
+| **Default:** 2,2
+
+KMP_PLAIN_BARRIER_PATTERN
+"""""""""""""""""""""""""
+Specifies barrier pattern of plain barrier which is used for ``#pragma omp barrier``.
+See ``KMP_FORKJOIN_BARRIER_PATTERN`` for currently supported patterns.
+
+| **Syntax:** ``KMP_PLAIN_BARRIER_PATTERN=<gather-pattern>,<release-patern>``
+| **Default:** hyper,hyper
+| **Related environment variable:** ``KMP_FORKJOIN_BARRIER_PATTERN``, ``KMP_REDUCTION_BARRIER_PATTERN``
+
+KMP_REDUCTION_BARRIER
+"""""""""""""""""""""
+Specifies log2 of branching-factor of reduction barrier.
+This only has a meaning if tree or hyper barrier pattern is used.
+
+| **Syntax:** ``KMP_REDUCTION_BARRIER=<factor-for-gather>,<factor-for-release>``
+| **Default:** 1,1
+
+KMP_REDUCTION_BARRIER_PATTERN
+"""""""""""""""""""""""""""""
+Specifies barrier pattern of reduction barrier which is used in reduction.
+See ``KMP_FORKJOIN_BARRIER_PATTERN`` for currently supported patterns.
+
+| **Syntax:** ``KMP_REDUCTION_BARRIER_PATTERN=<gather-pattern>,<release-pattern>``
+| **Default:** hyper,hyper
+| **Related environment variable:** ``KMP_FORKJOIN_BARRIER_PATTERN``, ``KMP_PLAIN_BARRIER_PATTERN``
+
 KMP_SETTINGS
 """"""""""""
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123564.422105.patch
Type: text/x-patch
Size: 3155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220412/0f9388bd/attachment-0001.bin>


More information about the Openmp-commits mailing list