Skip to content
  1. May 12, 2016
    • Jonathan Peyton's avatar
      Fix team reuse with foreign threads · 2b749b33
      Jonathan Peyton authored
      After hot teams were enabled by default, the library started using levels kept
      in the team structure. The levels are broken in case foreign thread exits and
      puts its team into the pool which is then re-used by another foreign thread.
      The broken behavior observed is when printing the levels for each new team, one
      gets 1, 2, 1, 2, 1, 2, etc. This makes the library believe that every other
      team is nested which is incorrect. What is wanted is for the levels to be
      1, 1, 1, etc.
      
      Differential Revision: http://reviews.llvm.org/D19980
      
      llvm-svn: 269363
      2b749b33
  2. May 05, 2016
    • Jonathan Peyton's avatar
      [STATS] Use partitioned timer scheme · 11dc82fa
      Jonathan Peyton authored
      This change removes the current timers with ones that partition time properly.
      The current timers are nested, so that if a new timer, B, starts when the
      current timer, A, is already timing, A's time will include B's. To eliminate
      this problem, the partitioned timers are designed to stop the current timer (A),
      let the new timer run (B), and when the new timer is finished, restart the
      previously running timer (A). With this partitioning of time, a threads' timers
      all sum up to the OMP_worker_thread_life time and can now easily show the
      percentage of time a thread is spending in different parts of the runtime or
      user code.
      
      There is also a new state variable associated with each thread which tells where
      it is executing a task. This corresponds with the timers: OMP_task_*, e.g., if
      time is spent in OMP_task_taskwait, then that thread executed tasks inside a
      #pragma omp taskwait construct.
      
      The changes are mostly changing the MACROs to use the new PARITIONED_* macros,
      the new partitionedTimers class and its methods, and new state logic.
      
      Differential Revision: http://reviews.llvm.org/D19229
      
      llvm-svn: 268640
      11dc82fa
  3. Apr 19, 2016
  4. Apr 18, 2016
    • Jonathan Peyton's avatar
      Fix for pthread_setspecific (TLS and shutdown) problem · f252010f
      Jonathan Peyton authored
      Some codes that use TLS fail intermittently because one thread tries to write
      TLS values after the TLS key has been destroyed by another thread. This happens
      when one thread executes library shutdown (and destroys TLS keys), while another
      thread starts to execute the TLS key destructor routine. Before this change, the
      kmp_init_runtime flag was checked before calling pthread_* TLS functions, but
      this flag is set to FALSE later than the destruction of the TLS keys, which
      leads to failure. The fix is to check kmp_init_gtid instead, as this flag is
      unset *before* the destruction of TLS keys.
      
      Differential Revision: http://reviews.llvm.org/D19022
      
      llvm-svn: 266674
      f252010f
  5. Mar 29, 2016
  6. Mar 02, 2016
    • Jonathan Peyton's avatar
      Add new OpenMP 4.5 doacross loop nest feature · 71909c57
      Jonathan Peyton authored
      From the standard: A doacross loop nest is a loop nest that has cross-iteration
      dependence. An iteration is dependent on one or more lexicographically earlier
      iterations. The ordered clause parameter on a loop directive identifies the
      loop(s) associated with the doacross loop nest.
      
      The init/fini routines allocate/free doacross buffer(s) for each loop for each
      thread.  The wait routine waits for a flag designated by the dependence vector.
      The post routine sets the flag designated by current iteration vector.  We use
      a similar technique of shared buffer indices that covers up to 7 nowait loops
      executed simultaneously by different threads (number 7 has no real meaning,
      just heuristic value).  Also, the size of structures are kept intact via
      reducing dummy arrays.
      
      This needs to be put into the OpenMP runtime library in order for the compiler
      team to develop the compiler side of the implementation.
      
      Differential Revision: http://reviews.llvm.org/D17399
      
      llvm-svn: 262532
      71909c57
  7. Feb 25, 2016
    • Jonathan Peyton's avatar
      Add new OpenMP 4.5 affinity API · 2f7c077b
      Jonathan Peyton authored
      This change introduces the new OpenMP 4.5 affinity api surrounding
      OpenMP Places. There are six new entry points:
      
      Typically called in serial region:
       * omp_get_num_places - returns the number of places available to the execution
             environment in the place list.
       * omp_get_place_num_procs - returns the number of processors available to the
             execution environment in the specified place.
       * omp_get_place_proc_ids - returns the numerical identifiers of the processors
             available to the execution environment in the specified place.
      
      Typically called inside parallel region:
       * omp_get_place_num - returns the place number of the place to which the
             encountering thread is bound.
       * omp_get_partition_num_places - returns the number of places in the place
             partition of the innermost implicit task.
       * omp_get_partition_place_nums - returns the list of place numbers
             corresponding to the places in the place-var ICV of the innermost
             implicit task.
      
      Differential Revision: http://reviews.llvm.org/D17417
      
      llvm-svn: 261915
      2f7c077b
  8. Feb 09, 2016
  9. Jan 28, 2016
  10. Jan 27, 2016
  11. Jan 26, 2016
    • Jonathan Peyton's avatar
      [OMPT]: Fix the order of implicit_task_end_events · b4c73d8d
      Jonathan Peyton authored
      For implcit barriers in simple parallel for loops, the order of the OMPT events
      was wrong.  The barrier_{begin,end} events came after the implcit_task_end
      event for the implcit barrier at the end of the parallel region. This is wrong
      because the implicit task executes the barrier before ending. This patch fixes
      the order of the event: It will be triggerd now just before
      __kmp_pop_current_task_from_thread() is called.
      
      Patch by Tim Cramer
      
      Differential Revision: http://reviews.llvm.org/D16347
      
      llvm-svn: 258866
      b4c73d8d
  12. Jan 11, 2016
  13. Dec 17, 2015
  14. Nov 30, 2015
  15. Nov 16, 2015
  16. Nov 12, 2015
  17. Nov 04, 2015
  18. Oct 20, 2015
  19. Oct 19, 2015
  20. Oct 08, 2015
  21. Sep 21, 2015
    • Joerg Sonnenberger's avatar
      Add basic NetBSD support. · 1564f3c4
      Joerg Sonnenberger authored
      llvm-svn: 248204
      1564f3c4
    • Jonathan Peyton's avatar
      [OMPT] Simplify control variable logic for OMPT · b68a85d1
      Jonathan Peyton authored
      Prior to this change, OMPT had a status flag ompt_status, which could take
      several values. This was due to an earlier OMPT design that had several levels
      of enablement (ready, disabled, tracking state, tracking callbacks). The
      current OMPT design has OMPT support either on or off.
      This revision replaces ompt_status with a boolean flag ompt_enabled, which 
      simplifies the runtime logic for OMPT.
      
      Patch by John Mellor-Crummey
      
      Differential Revision: http://reviews.llvm.org/D12999
      
      llvm-svn: 248189
      b68a85d1
    • Jonathan Peyton's avatar
      [OMPT] Overhaul OMPT initialization interface · 82a13bf3
      Jonathan Peyton authored
      The OMPT specification has changed. This revision brings the LLVM OpenMP
      implementation up to date.
      
      Technical overview of changes:
      Previously, a public weak symbol ompt_initialize was called after the OpenMP
      runtime is initialized. The new interface calls a global weak symbol ompt_tool
      prior to initialization. If a tool is present, ompt_tool returns a pointer to
      a function that matches the signature for ompt_initialize. After OpenMP is 
      initialized the function pointer is called to initialize a tool.
      Knowing that OMPT will be enabled before initialization allows OMPT support to
      be initialized as part of initialization instead of back patching
      initialization of OMPT support after the fact.
      Post OpenMP initialization support has been generalized moves from
      ompt-specific.c into ompt-general.c, since the OMPT initialization logic is no
      longer implementation specific.
      
      Patch by John Mellor-Crummey
      
      Differential Revision: http://reviews.llvm.org/D12998
      
      llvm-svn: 248187
      82a13bf3
    • Jonathan Peyton's avatar
      Fix the OpenMP 3.0 build · 441f3376
      Jonathan Peyton authored
      This change adds guards to the code in places where they are missing to enable
      the OpenMP 3.0 build.
      
      Patch by Diego Caballero and Johnny Peyton
      
      Mailing List: http://lists.llvm.org/pipermail/openmp-dev/2015-September/000935.html
      
      llvm-svn: 248178
      441f3376
  22. Sep 10, 2015
  23. Sep 02, 2015
  24. Aug 31, 2015
  25. Aug 18, 2015
  26. Aug 17, 2015
  27. Aug 11, 2015
    • Jonathan Peyton's avatar
      Tidy statistics collection · 45be4500
      Jonathan Peyton authored
      This removes some statistics counters and timers which were not used,
      adds new counters and timers for some language features that were not
      monitored previously and separates the counters and timers into those
      which are of interest for investigating user code and those which are
      only of interest to the developer of the runtime itself.
      The runtime developer statistics are now ony collected if the
      additional #define KMP_DEVELOPER_STATS is set.
      
      Additional user statistics which are now collected include:
      * Count of nested parallelism (omp parallel inside a parallel region)
      * Count of omp distribute occurrences
      * Count of omp teams occurrences
      * Counts of task related statistics (taskyield, task execution, task
        cancellation, task steal)
      * Values passed to omp_set_numtheads
      * Time spent in omp single and omp master
      
      None of this affects code compiled without stats gathering enabled,
      which is the normal library build mode.
      
      This also fixes the CMake build by linking to the standard c++ library
      when building the stats library as it is a requirement.  The normal library
      does not have this requirement and its link phase is left alone.
      
      Differential Revision: http://reviews.llvm.org/D11759
      
      llvm-svn: 244677
      45be4500
  28. Jul 23, 2015
    • Jonathan Peyton's avatar
      Patch out a fatal assertion in OpenMP runtime until preconditions are met · c96dcb09
      Jonathan Peyton authored
      Compiling simple testcase with g++ and linking it to the LLVM OpenMP runtime
      compiled in debug mode trips an assertion that produces a fatal error. When
      the assertion is skipped, the program runs successfully to completion and 
      produces the same answer as the sequential code. Intel will restore the
      assertion with a patch that fixes the issues that cause it to trip.
      
      Patch by John Mellor-Crummey
      
      Differential Revision: http://reviews.llvm.org/D11269
      
      llvm-svn: 243032
      c96dcb09
Loading