- Aug 02, 2018
-
-
Jonas Hahnfeld authored
This is broken per PR36561 and PR36574, so disable it for now until somebody interested can take a look. OMPT can still be activated manually by passing -DLIBOMP_OMPT_SUPPORT=ON during configuration. Differential Revision: https://reviews.llvm.org/D50086 llvm-svn: 338721
-
- Jul 09, 2018
-
-
Jonathan Peyton authored
This patch introduces the logic implementing hierarchical scheduling. First and foremost, hierarchical scheduling is off by default To enable, use -DLIBOMP_USE_HIER_SCHED=On during CMake's configure stage. This work is based off if the IWOMP paper: "Workstealing and Nested Parallelism in SMP Systems" Hierarchical scheduling is the layering of OpenMP schedules for different layers of the memory hierarchy. One can have multiple layers between the threads and the global iterations space. The threads will go up the hierarchy to grab iterations, using possibly a different schedule & chunk for each layer. [ Global iteration space (0-999) ] (use static) [ L1 | L1 | L1 | L1 ] (use dynamic,1) [ T0 T1 | T2 T3 | T4 T5 | T6 T7 ] In the example shown above, there are 8 threads and 4 L1 caches begin targeted. If the topology indicates that there are two threads per core, then two consecutive threads will share the data of one L1 cache unit. This example would have the iteration space (0-999) split statically across the four L1 caches (so the first L1 would get (0-249), the second would get (250-499), etc). Then the threads will use a dynamic,1 schedule to grab iterations from the L1 cache units. There are currently four supported layers: L1, L2, L3, NUMA OMP_SCHEDULE can now read a hierarchical schedule with this syntax: OMP_SCHEDULE='EXPERIMENTAL LAYER,SCHED[,CHUNK][:LAYER,SCHED[,CHUNK]...]:SCHED,CHUNK And OMP_SCHEDULE can still read the normal SCHED,CHUNK syntax from before I've kept most of the hierarchical scheduling logic inside kmp_dispatch_hier.h to try to keep it separate from the rest of the code. Differential Revision: https://reviews.llvm.org/D47962 llvm-svn: 336571
-
- Jan 02, 2018
-
-
Joachim Protze authored
This patch enables OMPT by default if version 50 or later is built and the config says, that OMPT will be supported. Differential Revision: https://reviews.llvm.org/D41508 llvm-svn: 321675
-
- Nov 29, 2017
-
-
Jonas Hahnfeld authored
These are needed by both libraries, so we can do that in a common namespace and unify configuration parameters. Also make sure that the user isn't requesting libomptarget if the library cannot be built on the system. Issue an error in that case. Differential Revision: https://reviews.llvm.org/D40081 llvm-svn: 319342
-
Jonas Hahnfeld authored
As a first step, this allows us to generalize the detection of standalone builds and make it fully compatible when building in llvm/runtimes/ which automatically sets OPENMP_STANDLONE_BUILD. Differential Revision: https://reviews.llvm.org/D40080 llvm-svn: 319341
-
- Nov 03, 2017
-
-
Jonas Hahnfeld authored
This reverts commit r317339 which discarded some recent commits. llvm-svn: 317346
-
Joachim Protze authored
The TR6 document is expected to be publically released around November 15. This patch does not implement OMPT for libomptarget. Patch by Simon Convent and Joachim Protze Differential Revision: https://reviews.llvm.org/D39182 llvm-svn: 317339
-
- Nov 01, 2017
-
-
Joachim Protze authored
The code is tested to work with latest clang, GNU and Intel compiler. The implementation is optimized for low overhead when no tool is attached shifting the cost to execution with tool attached. This patch does not implement OMPT for libomptarget. Patch by Simon Convent and Joachim Protze Differential Revision: https://reviews.llvm.org/D38185 llvm-svn: 317085
-
- Oct 20, 2017
-
-
Jonathan Peyton authored
Patch by Simon Convent Differential Revision: https://reviews.llvm.org/D38876 llvm-svn: 316234
-
- Aug 02, 2017
-
-
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
-
- Jul 28, 2017
-
-
Jonathan Peyton authored
llvm-svn: 309418
-
- Mar 31, 2017
-
-
https://llvm.org/bugs/show_bug.cgi?id=32456Andrey Churbanov authored
ITT Notify disabled for static build of OpenMP RTL. Differential Revision: https://reviews.llvm.org/D31466 llvm-svn: 299230
-
- Mar 06, 2017
-
-
Jonathan Peyton authored
Add build option LIBOMP_OMP_VERSION=50, 5.0 headers, and add the year/month associated with OpenMP 5.0 in relevant source locations. Also, remove the deprecated LIBOMP_OMP_VERSION=41 option. Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D30450 llvm-svn: 297083
-
- Jan 04, 2017
-
-
Jonas Hahnfeld authored
runtimes/CMakeLists.txt in LLVM passes OPENMP_STANDALONE_BUILD. Differential Revision: https://reviews.llvm.org/D28280 llvm-svn: 290978
-
- Dec 14, 2016
-
-
Jonathan Peyton authored
Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D26688 llvm-svn: 289732
-
- Dec 08, 2016
-
-
Sylvestre Ledru authored
Summary: Implemented by Dejan Latinovic See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790735 for more more information Reviewers: AndreyChurbanov, jlpeyton Subscribers: openmp-commits, mgorny Differential Revision: https://reviews.llvm.org/D26576 llvm-svn: 289032
-
- Nov 07, 2016
-
-
Jonas Hahnfeld authored
This patch allows ThreadSanitizer (Tsan) to verify OpenMP programs. It means that no false positive will be reported by Tsan when verifying an OpenMP programs. This patch introduces annotations within the OpenMP runtime module to provide information about thread synchronization to the Tsan runtime. In order to enable the Tsan support when building the runtime, you must enable the TSAN_SUPPORT option with the following environment variable: -DLIBOMP_TSAN_SUPPORT=TRUE The annotations will be enabled in the main shared library (same mechanism of OMPT). Patch by Simone Atzeni and Joachim Protze! Differential Revision: https://reviews.llvm.org/D13072 llvm-svn: 286115
-
- Sep 30, 2016
-
-
Jonathan Peyton authored
Add check for "45" version to use "201511" string for OpenMP 4.5, otherwise "200505" is used in Fortran module. Also, fix kmp_openmp_version variable (used for the debugger, e.g.) and kmp_version_omp_api that is used in KMP_VERSION=1 output. Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D24761 llvm-svn: 282868
-
- Sep 14, 2016
-
-
Michal Gorny authored
Introduce a new LIBOMP_INSTALL_VARIABLES cache variable that can be used to disable creating libgomp and libiomp5 aliases on 'make install'. Those aliases are undesired e.g. on Gentoo systems where libomp is used purely by clang. Differential Revision: https://reviews.llvm.org/D24563 llvm-svn: 281512
-
- Sep 09, 2016
-
-
George Rokos authored
There is a bug in CMakeLists which causes powerpc64le systems to be recognized as big-endian. This patch fixes the issue. Differential Revision: https://reviews.llvm.org/D23626 llvm-svn: 281068
-
- Jun 14, 2016
-
-
Jonathan Peyton authored
OpenMP 4.1 is now OpenMP 4.5. Any mention of 41 or 4.1 is replaced with 45 or 4.5. Also, if the CMake option LIBOMP_OMP_VERSION is 41, CMake warns that 41 is deprecated and to use 45 instead. llvm-svn: 272687
-
- May 26, 2016
-
-
Jonathan Peyton authored
On Blue Gene/Q, having LIBOMP_USE_ITT_NOTIFY support compiled into a statically-linked binary causes a failure at runtime because dlopen fails. This patch changes LIBOMP_USE_ITT_NOTIFY to a cacheable configuration setting that can be disabled. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D20517 llvm-svn: 270884
-
- May 17, 2016
-
-
Jonathan Peyton authored
llvm-svn: 269836
-
- Feb 09, 2016
-
-
Jonathan Peyton authored
The -install_name linker flag will use "@rpath/" when supported in CMake which is the recommended usage for dynamic libraries on Mac OSX. llvm-svn: 260300
-
- Feb 04, 2016
-
-
Jonathan Peyton authored
When building executables for Cray supercomputers, statically-linked executables are preferred. This patch makes it possible to build the OpenMP runtime as an archive for building statically-linked executables. The patch adds the flag LIBOMP_ENABLE_SHARED, which defaults to true. When true, a build of the OpenMP runtime yields dynamic libraries. When false, a build of the OpenMP runtime yields static libraries. There is no setting that allows both kinds of libraries to be built. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D16525 llvm-svn: 259817
-
- Dec 18, 2015
-
-
Jonathan Peyton authored
This change allows clang to build the stats library for every architecture which supports __builtin_readcyclecounter(). CMake also checks for all necessary features for stats and will error out if the platform does not support it. Patch by Hal Finkel and Johnny Peyton llvm-svn: 256002
-
- Nov 30, 2015
-
-
Jonathan Peyton authored
These changes allow libhwloc to be used as the topology discovery/affinity mechanism for libomp. It is supported on Unices. The code additions: * Canonicalize KMP_CPU_* interface macros so bitmask operations are implementation independent and work with both hwloc bitmaps and libomp bitmaps. So there are new KMP_CPU_ALLOC_* and KMP_CPU_ITERATE() macros and the like. These are all in kmp.h and appropriately placed. * Hwloc topology discovery code in kmp_affinity.cpp. This uses the hwloc interface to create a libomp address2os object which the rest of libomp knows how to handle already. * To build, use -DLIBOMP_USE_HWLOC=on and -DLIBOMP_HWLOC_INSTALL_DIR=/path/to/install/dir [default /usr/local]. If CMake can't find the library or hwloc.h, then it will tell you and exit. Differential Revision: http://reviews.llvm.org/D13991 llvm-svn: 254320
-
- Nov 05, 2015
-
-
Jonathan Peyton authored
Use of #ifdef OMPT_DEBUG was causing messages to be generated under normal operation when the OpenMP library was compiled with KMP_DEBUG enabled. Elsewhere, KMP_DEBUG evaluates assertions, but never produces messages during normal operation. To avoid this inconsistency, set OMPT_DEBUG using a cmake variable LIBOMP_OMPT_DEBUG. While I was editing the associated ompt-specific.h and ompt-general.c files, make the spacing and comments consistent. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D14355 llvm-svn: 252173
-
- Oct 29, 2015
-
-
Jonathan Peyton authored
The problem is that the ompt_tool() function (which must be implemented by a performance tool) should be defined in the RTL as well to cover the case when the tool is not present in the address space of the process. This functionality is accomplished with weak symbols in Unices. Unfortunately, Windows does not support weak symbols. The solution in these changes is to grab the list of all modules loaded by the process and then search for symbol "ompt_tool()" within them. The function ompt_tool_windows() performs the search of the ompt_tool symbol. If ompt_tool is found, then its return value is used to initialize the tool. If ompt_tool is not found, then ompt_tool_windows() returns NULL and OMPT is thus, disabled. While doing these changes, the OMPT_SUPPORT detection in CMake was changed to test for the required featuers for OMPT_SUPPORT, namely: builtin_frame_address() existence, weak attribute existence and psapi.dll existence. For LIBOMP_HAVE_OMPT_SUPPORT to be true, it must be that the builtin_frame_address() intrinsic exists AND one of: either weak attributes exist or psapi.dll exists. Also, since Process Status API is used I had to add new dependency -- psapi.dll to the library dependency micro test. Differential Revision: http://reviews.llvm.org/D14027 llvm-svn: 251654
-
- Sep 21, 2015
-
-
Jonathan Peyton authored
This change introduces a check-libomp target which is based upon llvm's lit test infrastructure. Each test (generated from the University of Houston's OpenMP testsuite) is compiled and then run. For each test, an exit status of 0 indicates success and non-zero indicates failure. This way, FileCheck is not needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp) in the build tree so that gcc can be tested as well. When building out-of- tree builds, the user will have to provide llvm-lit either by specifying -DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH. Differential Revision: http://reviews.llvm.org/D11821 llvm-svn: 248211
-
- Aug 28, 2015
-
-
Jonathan Peyton authored
Currently, the libomp CMake build system uses a Perl script to configure files (tools/expand-vars.pl). This patch replaces the use of the Perl script by using CMake's configure_file() function. The major changes include: 1. *.var has every $KMP_* variable changed to @LIBOMP_*@ 2. kmp_config.h.cmake is a new file which contains all the feature macros and #cmakedefine lines 3. Most of the -D lines have been moved from LibompDefinitions.cmake but some OS specific MACROs (e.g., _GNU_SOURCE) remain. 4. All expand-vars.pl related logic is removed from the CMake files. One important note about this change is that it breaks the old Perl+Makefile build system because it can't create kmp_config.h properly. Differential Review: http://reviews.llvm.org/D12211 llvm-svn: 246314
-
- Aug 11, 2015
-
-
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
-
- Jul 18, 2015
-
-
Chandler Carruth authored
clean up the build. This disables all of the Clang warnings that fire for me when building libomp.so on Linux with a recent Clang binary. Lots of these should probably be fixed, but I want to at least get the build warning-clean and make it easy to keep that way. I also switched a bunch of the warnings that are used both for C and C++ compiles to check the flag with C compilation test. Differential Revision: http://reviews.llvm.org/D11253 llvm-svn: 242604
-
- Jul 15, 2015
-
-
Jonathan Peyton authored
I apologize for this nasty commit, but I somehow overlooked Chandler's comment to re-indent these files to two space indention. I know this is a horrible commit, but I figured if it was done quickly after the first one, not too many conflicts would arise. Again, I'm sorry and won't do this again. llvm-svn: 242301
-
Jonathan Peyton authored
This commit improves numerous functionalities of the OpenMP CMake build system to be more conducive with LLVM's build system and build philosophies. The CMake build system, as it was before this commit, was not up to LLVM's standards and did not implement the configuration stage like most CMake based build systems offer (check for compiler flags, libraries, etc.) In order to improve it dramatically in a short period of time, a large refactoring had to be done. The main changes done with this commit are as follows: * Compiler flag checks - The flags are no longer grabbed from compiler specific directories. They are checked for availability in config-ix.cmake and added accordingly inside LibompHandleFlags.cmake. * Feature checks were added in config-ix.cmake. For example, the standard CMake module FindThreads is probed for the threading model to use inside the OpenMP library. * OS detection - There is no longer a LIBOMP_OS variable, OS-specifc build logic is wrapped around the WIN32 and APPLE macros with !(WIN32 OR APPLE) meaning a Unix flavor of some sort. * Got rid of vestigial functions/macros/variables * Added new libomp_append() function which is used everywhere to conditionally or undconditionally append to a list * All targets have the libomp prefix so as not to interfere with any other project * LibompCheckLinkerFlag.cmake module was added which checks for linker flags specifically for building shared libraries. * LibompCheckFortranFlag.cmake module was added which checks for fortran flag availability. * Removed most of the cruft from the translation between the perl+Makefile based build system and this one. The remaining components that they share are perl scripts which I'm in the process of removing. There is still more left to do. The perl scripts still need to be removed, and a config.h.in file (or similarly named) needs to be added with #cmakedefine lines in it. But this is a much better first step than the previous system. Differential Revision: http://reviews.llvm.org/D10656 llvm-svn: 242298
-
- Jul 09, 2015
-
-
Jonathan Peyton authored
Just changed LIBOMP_USE_DEBUGGER to false. llvm-svn: 241852
-
Jonathan Peyton authored
These changes enable external debuggers to conveniently interface with the LLVM OpenMP Library. Structures are added which describe the important internal structures of the OpenMP Library e.g., teams, threads, etc. This feature is turned on by default (CMake variable LIBOMP_USE_DEBUGGER) and can be turned off with -DLIBOMP_USE_DEBUGGER=off. Differential Revision: http://reviews.llvm.org/D10038 llvm-svn: 241832
-
- Jun 17, 2015
-
-
Jonathan Peyton authored
Currently, OMPT support requires the weak attribute which isn't supported on Windows. This patch has CMake error out when LIBOMP_OMPT_SUPPORT=true and the users is building on Windows. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000692.html Patch by Jonas Hahnfeld llvm-svn: 239912
-
- Jun 11, 2015
-
-
Jonathan Peyton authored
Add new LIBOMP_ENABLE_ASSERTIONS macro which can be set in a standalone build or takes the value of LLVM_ENABLE_ASSERTIONS when inside llvm/projects. This change also defines the KMP_BUILD_ASSERT() macro to do nothing when ENABLE_ASSERTIONS is off. This means the __kmp_build_check_* types won't be defined and thus, no warnings. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000719.html Patch by Jack Howarth and Jonathan Peyton llvm-svn: 239546
-
Jonathan Peyton authored
Most CMake build systems put CMakeLists.txt files inside source directories where items need to get built. This change follows that convention by adding a new runtime/src/CMakeLists.txt file. An additional benefit is this helps logically seperate configuring with building as well. This change is mostly just copying and pasting the bottom half of runtime/CMakeLists.txt into runtime/src/CMakeLists.txt, but a few changes had to be made to get it to work. Most of those changes were to directory prefixes. Differential Revision: http://reviews.llvm.org/D10344 llvm-svn: 239542
-