- 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 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
-
- Jun 28, 2016
-
-
Jonathan Peyton authored
UNICODE and _UNICODE defintions were added in the LLVM CMake build system. While on Unices, the UNICODE/_UNICODE macros don't cause problems, on Windows only ittnotify_static.c should be compiled using -DUNICODE. We are still looking at a proper fix, but this change sets the build back to exactly what it was doing before. Also, a comment and TODO were added in the src/CMakeLists.txt file to help explain. llvm-svn: 274052
-
- Jun 27, 2016
-
-
Hans Wennborg authored
That patch made all LLVM projects build with -DUNICODE. However, this doesn't work for the OpenMP runtime. But just overriding the flag with -UUNICODE breaks compiling ittnotify_static.c, which for some reason needs to be compiled with -DUNICIODE. Note that compiling ittnotify.h with -DUNICODE does not work though. This seems like a mess. This commit fixes it for now, but it would be great if someone who works on the OpenMP runtime could fix it properly. llvm-svn: 273898
-
- May 23, 2016
-
-
Jonathan Peyton authored
These changes allow testing on Windows using clang.exe. There are two main changes: 1. Only link to -lm when it actually exists on the system 2. Create basic versions of pthread_create() and pthread_join() for windows. They are not POSIX compliant by any stretch but will allow any existing and future tests to use pthread_create() and pthread_join() for testing interactions of libomp with os threads. Differential Revision: http://reviews.llvm.org/D20391 llvm-svn: 270464
-
- Mar 16, 2016
-
-
Jonathan Peyton authored
Building libomp using CMake versions < 3.3 caused a link time error. These errors occurred because when assembling z_Windows_NT-586_asm.asm, the definitions: OMPT_SUPPORT, _M_AMD64|_M_IA32 weren't defined on the command line. To fix the problem, the COMPILE_FLAGS property for the assembly file is appended to instead of the COMPILE_DEFINITIONS property being set. For whatever reason, the COMPILE_DEFINITIONS property doesn't pick up the definitions for assembly files for the older CMake versions. llvm-svn: 263651
-
- 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
-
- Jan 26, 2016
-
-
Jonathan Peyton authored
This change fixes the bug: https://llvm.org/bugs/show_bug.cgi?id=25975 by bypassing the perl module files which try to deduce system information. These perl modules files don't offer useful information and are from the original build system. They can be removed after this change. llvm-svn: 258843
-
- 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
-
- Sep 24, 2015
-
-
Jonathan Peyton authored
llvm-svn: 248500
-
- 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 31, 2015
-
-
Jonathan Peyton authored
The CMAKE_CURRENT_BINARY_DIR is only necessary on the DEPENDS part of the add_custom_command to build the Fortran Modules. llvm-svn: 246448
-
Andrey Churbanov authored
llvm-svn: 246426
-
- 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 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
-
- Jun 11, 2015
-
-
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
-
- May 18, 2015
-
-
Jonathan Peyton authored
Remove runtime/CMakeLists.txt.old and runtime/src/CMakeLists.txt as they no longer worked and were not being kept up to date. Differential Revision: http://reviews.llvm.org/D9756 llvm-svn: 237615
-
- Jan 13, 2015
-
-
Andrey Churbanov authored
llvm-svn: 225792
-
- Aug 07, 2014
-
-
Jim Cownie authored
llvm-svn: 215093
-
- Jun 02, 2014
-
-
Alp Toker authored
Patch by Jack Howarth! llvm-svn: 210025
-
- Jun 01, 2014
-
-
Alp Toker authored
This is not yet supported for production builds but can already produce working binaries on OS X and Linux with clang and gcc. The intention is to improve support to the point where it can integrate with the LLVM runtime platform, cover all platforms, runtime/release build configurations and run the tests. Patch by Jack Howarth! llvm-svn: 209994
-