[Openmp-commits] [PATCH] D36009: Add new envirable KMP_TEAMS_THREAD_LIMIT

Terry Wilmarth via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 28 11:28:35 PDT 2017


tlwilmar created this revision.

This change adds a new environment variable, KMP_TEAMS_THREAD_LIMIT, which is used to set a new global variable, __kmp_teams_max_nth, which is checked when determining the size and quantity of teams that will be created in the teams construct.  Specifically, it is a limit on the total number of threads in a given teams construct.  It differentiates the limits for the teams construct from the limits for regular parallel regions (KMP_DEVICE_THREAD_LIMIT/__kmp_max_nth and OMP_THREAD_LIMIT/__kmp_cg_max_nth).  When each individual team is formed, it is still subject to those limits.  After the clauses to the teams construct are parsed and calculated, we check to make sure we are within this limit, and if not, reduce num_threads per team and/or number of teams, accordingly.  The default value is set to the number of available processors on the system.


Repository:
  rL LLVM

https://reviews.llvm.org/D36009

Files:
  runtime/src/i18n/en_US.txt
  runtime/src/kmp.h
  runtime/src/kmp_global.cpp
  runtime/src/kmp_runtime.cpp
  runtime/src/kmp_settings.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36009.108681.patch
Type: text/x-patch
Size: 5919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170728/079ca426/attachment.bin>


More information about the Openmp-commits mailing list