Skip to content
  1. Oct 20, 2017
  2. Oct 06, 2017
    • Jonathan Peyton's avatar
      KMP_HW_SUBSET vs KMP_PLACE_THREADS rival envirables fix · 3f850bfc
      Jonathan Peyton authored
      If both KMP_HW_SUBSET and KMP_PLACE_THREADS are set and KMP_PLACE_THREADS gets
      parsed first, then the current environment variable parser rejects both and
      neither get used. This patch uses the rivals mechanism that is used for other
      environment variable groups (e.g., KMP_STACKSIZE, GOMP_STACKSIZE, OMP_STACKSIZE).
      If both are set, then it tells the user that it is ignoring KMP_PLACE_THREADS in
      favor of KMP_HW_SUBSET. The message about deprecating KMP_PLACE_THREADS when it
      is set is still printed regardless.
      
      Differential Revision: https://reviews.llvm.org/D38292
      
      llvm-svn: 315091
      3f850bfc
  3. Sep 29, 2017
  4. Sep 27, 2017
    • Jonathan Peyton's avatar
      Remove unnecessary semicolons · bd3a7633
      Jonathan Peyton authored
      Removes semicolons after if {} blocks, function definitions, etc.
      I was able to apply the large OMPT patch cleanly on top of this one
      with no conflicts.
      
      llvm-svn: 314340
      bd3a7633
  5. Sep 26, 2017
  6. Sep 05, 2017
  7. Aug 20, 2017
  8. Aug 17, 2017
  9. Aug 11, 2017
  10. Aug 02, 2017
    • Jonathan Peyton's avatar
      Exclude version symbols for static libomp · 038855ad
      Jonathan Peyton authored
      We use symbol versioning for GNU-compatibility but libgomp has versioned symbols
      only in the shared library but not in the static.
      Moreover, version symbols in the static library can cause an error at link time.
      
      Patch by Olga Malysheva
      
      Differential Revision: https://reviews.llvm.org/D36225
      
      llvm-svn: 309877
      038855ad
    • Jonathan Peyton's avatar
      Move lock acquire/release functions in task deque cleanup code · 1b536724
      Jonathan Peyton authored
      The original locations can be reached without initializing the lock variable
      (td_deque_lock), so it is potentially unsafe.  It is guaranteed that the lock
      is initialized if the deque (td_deque) is not NULL, and lock functions can be
      safely called.
      
      Patch by Hansang Bae
      
      Differential Revision: https://reviews.llvm.org/D36017
      
      llvm-svn: 309875
      1b536724
    • Jonathan Peyton's avatar
      Add new envirable KMP_TEAMS_THREAD_LIMIT · 4f90c82a
      Jonathan Peyton authored
      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.
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D36009
      
      llvm-svn: 309874
      4f90c82a
  11. Jul 28, 2017
  12. Jul 27, 2017
    • Jonathan Peyton's avatar
      Fix implementation of OMP_THREAD_LIMIT · f4392463
      Jonathan Peyton authored
      This change fixes the implementation of OMP_THREAD_LIMIT. The implementation of
      this previously was not restricted to a contention group (but it should be,
      according to the spec), and this is fixed here. A field is added to root thread
      to store a counter of the threads in the contention group. An extra check is
      added when reserving threads for a parallel region that checks this variable and
      compares to threadlimit-var, which is implemented as a new global variable,
      kmp_cg_max_nth. Associated settings changes were also made, and clean up of
      comments that referred to OMP_THREAD_LIMIT, but should refer to the new
      KMP_DEVICE_THREAD_LIMIT (added in an earlier patch).
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D35912
      
      llvm-svn: 309319
      f4392463
  13. Jul 26, 2017
    • Jonathan Peyton's avatar
      Introduce KMP_DEVICE_THREAD_LIMIT · 09244f39
      Jonathan Peyton authored
      This change drops in KMP_DEVICE_THREAD_LIMIT to replace KMP_MAX_THREADS. It's
      possible there will eventually be a OMP_DEVICE_THREAD_LIMIT, and we need
      something to distinguish from OMP_THREAD_LIMIT, which is currently implemented
      incorrectly (the fix for that will be added soon in a separate patch).
      KMP_ALL_THREADS is deprecated here, but we can keep the "all" option on
      KMP_DEVICE_THREAD_LIMIT to support that functionality. KMP_DEVICE_THREAD_LIMIT
      now has priority over its deprecated rival KMP_ALL_THREADS. I also cleaned up
      some comments that incorrectly referred to non-existent kmp_max_threads variable
      instead of kmp_max_nth.
      
      I've left the name of where this setting eventually ends up as
      __kmp_max_nth, for now.
      
      This change does not change much in the way of functionality. It does NOT change
      OMP_THREAD_LIMIT. It's just cleaning up and setting up for that.
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D35860
      
      llvm-svn: 309168
      09244f39
  14. Jul 25, 2017
  15. Jul 19, 2017
  16. Jul 18, 2017
    • Dimitry Andric's avatar
      For KMP_PAGE_SIZE, use getpagesize() on Unix, GetSystemInfo() on Windows · 0c7238b2
      Dimitry Andric authored
      Summary:
      The kmp_os.h header is defining the `PAGE_SIZE` macro unconditionally,
      even while it is only used directly after its definition, for the
      Windows implementation of the `KMP_GET_PAGE_SIZE()` macro.
      
      On at least FreeBSD, but likely all other BSDs too, this macro conflicts
      with the one defined in system headers, so remove it, since nothing else
      uses it.  Make all Unixes use `getpagesize()` instead, and use
      `GetSystemInfo()` for the Windows case.
      
      Reviewers: jlpeyton, jcownie, emaste, AndreyChurbanov
      
      Reviewed By: AndreyChurbanov
      
      Subscribers: AndreyChurbanov, hfinkel, zturner
      
      Differential Revision: https://reviews.llvm.org/D35072
      
      llvm-svn: 308355
      0c7238b2
    • Jonathan Peyton's avatar
      Fix failing taskloop tests by omitting gcc · 1c50ee64
      Jonathan Peyton authored
      We do not have GOMP interface support for taskloop yet.
      
      llvm-svn: 308351
      1c50ee64
    • Jonathan Peyton's avatar
      Add recursive task scheduling strategy to taskloop implementation · 93e17cfe
      Jonathan Peyton authored
      Summary:
      Taskloop implementation is extended by using recursive task scheduling.
      Envirable KMP_TASKLOOP_MIN_TASKS added as a manual threshold for the user
      to switch from recursive to linear tasks scheduling.
      
      Details:
      * The calculations for the loop parameters are moved from __kmp_taskloop_linear
        upper level
      * Initial calculation is done in the __kmpc_taskloop, further range splitting
        is done in the __kmp_taskloop_recur.
      * Added threshold to switch from recursive to linear tasks scheduling;
      * One half of split range is scheduled as an internal task which just moves
        sub-range parameters to the stealing thread that continues recursive
        scheduling (if number of tasks still enough), the other half is processed
        recursively;
      * Internal task duplication routine fixed to assign parent task, that was not
        needed when all tasks were scheduled by same thread, but is needed now.
      
      Patch by Andrey Churbanov
      
      Differential Revision: https://reviews.llvm.org/D35273
      
      llvm-svn: 308338
      93e17cfe
    • Andrey Churbanov's avatar
      Fix sporadic segfaults in tasking tests. · 71483f2d
      Andrey Churbanov authored
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D35535
      
      llvm-svn: 308298
      71483f2d
    • Andrey Churbanov's avatar
      OpenMP RTL cleanup: nullify pointer after memory freeing · ddc38722
      Andrey Churbanov authored
      Differential Revision: https://reviews.llvm.org/D35497
      
      llvm-svn: 308274
      ddc38722
  17. Jul 17, 2017
  18. Jul 13, 2017
    • Jonas Hahnfeld's avatar
      [GOMP] Fix (un)tied tasks with the GCC · 266ddafc
      Jonas Hahnfeld authored
      The first bit is actually the "untied" flag. That is why the condition was
      wrong and has to be inverted to set the flag correctly.
      
      Found and initial patch by Simon Convent!
      
      llvm-svn: 307899
      266ddafc
  19. Jul 11, 2017
    • Dimitry Andric's avatar
      Rename z_Linux_asm.s to z_Linux_asm.S · b9fb1229
      Dimitry Andric authored
      Summary:
      On Unix, a .S file is normally an assembly source which must be
      preprocessed with a C preprocessor, while a .s file is "plain" assembly.
      The former is handled by the compiler driver (cc), the latter is
      directly passed to the assembler binary (as).
      
      Because z_Linux_asm.s is supposed to be preprocessed, rename it to .S,
      so it can be automatically picked up correctly by build systems.
      
      Reviewers: AndreyChurbanov, emaste, jlpeyton
      
      Reviewed By: AndreyChurbanov
      
      Subscribers: mgorny, openmp-commits
      
      Differential Revision: https://reviews.llvm.org/D35171
      
      llvm-svn: 307680
      b9fb1229
  20. Jul 07, 2017
  21. Jul 06, 2017
  22. Jul 03, 2017
  23. Jun 27, 2017
    • Hal Finkel's avatar
      Make test/parallel/omp_nested.c not use so many threads · 2bc3449d
      Hal Finkel authored
      I've found it very difficult to get test/parallel/omp_nested.c to pass
      consistently across my build environments. The problem is that it creates N^2
      threads (it is testing nested parallel regions), and that often exceeds the
      thread limits on systems with many cores. We do raise the process limits in
      lit, and that often helps, but if running lit with a smaller number of threads
      or on a system where we're otherwise resource constrained, this particular test
      tends to fail (because the runtime cannot create a sufficient number of
      threads).
      
      This seems to work: if the maximum number of threads is more than some small
      number, then cap the number of threads used for the parallel region. The choice
      of 4 here is somewhat arbitrary.
      
      Differential Revision: https://reviews.llvm.org/D32033
      
      llvm-svn: 306357
      2bc3449d
  24. Jun 15, 2017
    • Jonathan Peyton's avatar
      Set affinity to none/false in child processes · 072ccb72
      Jonathan Peyton authored
      Reset affinity to none (false for proc-bind-var) so that threads in the child
      processes are not bound tightly, unless the user explicitly sets this in
      KMP_AFFINITY/OMP_PROC_BIND, in child processes. This can improve
      performance for scripting languages which fork for parallelism like Python's
      multiprocessing module.
      
      Differential Revision: https://reviews.llvm.org/D34154
      
      llvm-svn: 305513
      072ccb72
  25. Jun 13, 2017
    • Jonathan Peyton's avatar
      Replace platform macro with KMP_MIC_SUPPORTED · 492e0a33
      Jonathan Peyton authored
      Differential Revision: https://reviews.llvm.org/D34119
      
      llvm-svn: 305307
      492e0a33
    • Jonathan Peyton's avatar
      Reset initial affinity in children processes · d330e630
      Jonathan Peyton authored
      If OpenMP is initialized before fork()-ing occurs and affinity is set to
      something like compact, then the master thread will be pinned to a single HW
      thread/core after initialization. If the master (or any other thread) then
      forks N processes, all N processes will then be pinned to that same single HW
      thread/core. To reset the affinity for the new child process, the atfork
      handler for the child process can call kmp_set_thread_affinity_mask_initial()
      to reset its affinity to the initial affinity of the application before it
      re-initializes libomp. The parent process will not be affected and still
      keeps its affinity setting.
      
      Differential Revision: https://reviews.llvm.org/D34118
      
      llvm-svn: 305306
      d330e630
  26. Jun 06, 2017
  27. Jun 05, 2017
  28. Jun 01, 2017
Loading