aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-21Merging r285703:release_39Jonathan Peyton
------------------------------------------------------------------------ r285703 | achurbanov | 2016-11-01 11:19:04 -0500 (Tue, 01 Nov 2016) | 9 lines Fixed problem introduced by part of https://reviews.llvm.org/D21196. Check Task Scheduling Constraint (TSC) on stealing of untied task. This is needed because the untied task can produce tied children those can break TSC if untied is not a descendant of current task. This can cause live lock on complex tyasking tests (e.g. kastors/strassen-task-dep). Differential Revision: https://reviews.llvm.org/D26182 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@287561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21Merging r287551:Jonathan Peyton
------------------------------------------------------------------------ r287551 | jlpeyton | 2016-11-21 10:18:57 -0600 (Mon, 21 Nov 2016) | 8 lines Fix for D25504 - segfault because of double free()-ing in shutdown code. Paul Osmialowski pointed out a double free bug in shutdown code. This patch Moves the freeing of the implicit task to above the freeing of all fast memory to prevent the double-free issue. Differential Revision: https://reviews.llvm.org/D26860 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@287560 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21Merging r285283:Jonathan Peyton
------------------------------------------------------------------------ r285283 | achurbanov | 2016-10-27 06:43:07 -0500 (Thu, 27 Oct 2016) | 6 lines Fixed a memory leak related to task dependencies. Differential Revision: http://reviews.llvm.org/D25504 Patch by Alex Duran. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@287559 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21Merging r280138:Jonathan Peyton
------------------------------------------------------------------------ r280138 | jlpeyton | 2016-08-30 14:28:58 -0500 (Tue, 30 Aug 2016) | 5 lines Appease older gcc compilers for the many-microtask-args.c test Older gcc compilers error out with the C99 syntax of: for (int i =...) so this change just moves the int i; declaration up above. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@287558 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21Merging r278332:Jonathan Peyton
------------------------------------------------------------------------ r278332 | achurbanov | 2016-08-11 08:04:00 -0500 (Thu, 11 Aug 2016) | 3 lines Fixes for hierarchical barrier (possible hang if team size changed). Differential Revision: http://reviews.llvm.org/D23175 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@287557 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08Merging r278036:Hans Wennborg
------------------------------------------------------------------------ r278036 | dim | 2016-08-08 11:34:05 -0700 (Mon, 08 Aug 2016) | 18 lines Fix linking of omp_foreign_thread_team_reuse test on FreeBSD Summary: On FreeBSD, linking the misc_bugs/omp_foreign_thread_team_reuse.c test case fails with: /usr/local/bin/ld: /tmp/omp_foreign_thread_team_reuse-c5e71b.o: undefined reference to symbol 'pthread_create@@FBSD_1.0' This is because the program is linked without `-lpthread`. Since the %libomp-compile-and-run macro does not allow that option to be added to the compile command line, split it up and add the required `-lpthread` between %libomp-compile and %libomp-run. Reviewers: jlpeyton, hfinkel, Hahnfeld Subscribers: Hahnfeld, emaste, openmp-commits Differential Revision: https://reviews.llvm.org/D23084 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@278059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18Creating release_39 branch off revision 275826Hans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/openmp/branches/release_39@275839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-11http://reviews.llvm.org/D22134: Implementation of OpenMP 4.5 nonmonotonic ↵Andrey Churbanov
schedule modifier git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@275052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-08Improving EPCC performance when linking with hwlocJonathan Peyton
When linking with libhwloc, the ORDERED EPCC test slows down on big machines (> 48 cores). Performance analysis showed that a cache thrash was occurring and this padding helps alleviate the problem. Also, inside the main spin-wait loop in kmp_wait_release.h, we can eliminate the references to the global shared variables by instead creating a local variable, oversubscribed and instead checking that. Differential Revision: http://reviews.llvm.org/D22093 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274894 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-08D22138: Added more Intel compiler versions as allowed build compilersAndrey Churbanov
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-08D22137: Memory leak fixed by adding missed cleanup of single level array of ↵Andrey Churbanov
hot teams info git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-08D22136: Memory leaks fixed by adding missed __kmp_free() callsAndrey Churbanov
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274850 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-08D22135: formatting changeAndrey Churbanov
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-06Fix the nowait tests for omp for and omp singleJonathan Peyton
These tests are now modeled after the sections nowait test where threads wait to be released in the first construct (either for or single) and the last thread skips the last for/single construct and releases those threads. If the test fails, then it hangs because an unnecessary barrier is executed in between the constructs. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-04__kmp_partition_places: Update assertion for new parameter update_master_onlyJonas Hahnfeld
If update_master_only is set the place list is not completely traversed and therefore this assertion failed. Make it only trigger if update_master_only is false. (was introduced by D20539) Differential Revision: http://reviews.llvm.org/D21925 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01Fix checks on schedule structJonathan Peyton
This change fixes an error in comparing the existing schedule on the team to the new schedule, in the chunk field. Also added additional checks and used KMP_CHECK_UPDATE where appropriate. Patch by Terry Wilmarth. Differential Revision: http://reviews.llvm.org/D21897 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01Improve performance of #pragma omp singleJonathan Peyton
EPCC Performance of single is considerably worse than plain barrier. Adding a read-only check to the code before the atomic compare-and-store helps considerably. Patch by Terry Wilmarth. Differential Revision: http://reviews.llvm.org/D21893 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29Fix omp_sections_nowait.c test to address Bugzilla Bug 28336Jonathan Peyton
This rewrite of the omp_sections_nowait.c test file causes it to hang if the nowait is not respected. If the nowait isn't respected, the lone thread which can escape the first sections construct will just sleep at a barrier which shouldn't exist. All reliance on timers is taken out. For good measure, the test makes sure that all eight sections are executed as well. The test should take no longer than a few seconds on any modern machine. Differential Revision: http://reviews.llvm.org/D21842 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28Fix bugs in TAS and futex lockJonathan Peyton
* Incorrect lock value written in __kmp_test_futex_lock * Incorrect lock value check in tas/futex lock with USE_LOCK_PROFILE on Patch by Hansang Bae git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28Revert r273898's UNICODE quick fix in favor of CMake's remove_definitions()Jonathan Peyton
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. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-27Fix the Windows build after r273599Hans Wennborg
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. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273898 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Remove redundant %libomp-compile step from test/lock/omp_lock.cJonathan Peyton
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22Fix bug in futex fast path inside kmp_csupport.cJonathan Peyton
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22Apply the KMP_USE_FUTEX feature macro everywhereJonathan Peyton
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Add debug trace messages for taskloopJonathan Peyton
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Bug fix for hang when tasks used in nested parallelJonathan Peyton
Bug fix for hang when omp task and nested parallelism used together. Still some problem remains with task state saving/restoring, but user's case works fine now. All tasking unit tests passed as well. Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21558 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Performance improvement: accessing thread struct as opposed to team structJonathan Peyton
Replaced readings of nproc from team structure with ones from thread structure to improve performance. Patch by Andrey Churbanov. Differential Revision: http://reviews.llvm.org/D21559 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Addition of debugger comments and whitespaceJonathan Peyton
The removal of legacy code to support long-deprecated debugger support library resulted in some whitespace changes. Comments from that legacy code were made public as they may be useful for other debuggers. Patch by Olga Malysheva. Differential Revision: http://reviews.llvm.org/D21391 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Improvements to process affinity mask settingJonathan Peyton
A couple improvements: 1) Add ability to limit fullMask size when KMP_HW_SUBSET limits resources. 2) Make KMP_HW_SUBSET work for affinity_none, and only limit fullMask in this case. Patch by Andrey Churbanov. Differential Revision: http://reviews.llvm.org/D21528 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Bug fix for segfault in stubs libraryJonathan Peyton
There was a segfault in the stubs library in posix_memalign because of a bad parameter. The fix is to send address of the pointer as a parameter. Also added check of result of posix_memalign. Patch by Andrey Churbanov. Differential Revision: http://reviews.llvm.org/D21529 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21[STATS] Adding process id to output filenameJonathan Peyton
This change appends the process id to the KMP_STATS_FILE (if specified) which enables MPI processes to output their stats to separate files. Differential Revision: http://reviews.llvm.org/D21386 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21Fix typos in Fortran headersJonathan Peyton
Fix typos in Fortran headers to match spec. Patch by Andrey Churbanov. Differential Revision: http://reviews.llvm.org/D21531 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Change hwloc discovery algorithm to print topology only for accessible resourcesJonathan Peyton
Change hwloc discovery algorithm to print topology for only accessible resources, and report uniformity correspondingly, similar to what other topology discovery algorithms do. Fixes minor inconsistency in total topology reported and resources used for threads binding in case hwloc used. Patch by Andrey Churbanov. Differential Revision: http://reviews.llvm.org/D21389 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Teach OpenMP Library to use Hwloc on WindowsJonathan Peyton
This patch allows a user to enable Hwloc on windows. There are three main changes in here: 1.kmp.h - Move definitions/declarations out of KMP_OS_WINDOWS guard (our windows implementation of affinity) because they need to be defined when KMP_USE_HWLOC is on as well. 2.teach __kmp_set_system_affinity, __kmp_get_system_affinity, __kmp_get_proc_group, and __kmp_affinity_bind_thread how to use hwloc. 3.teach CMake how to include hwloc when building Windows Another minor change in here is to make sure that anything under KMP_USE_HWLOC is also guarded by KMP_AFFINITY_SUPPORTED as well. This is to prevent Mac builds from requiring anything from Hwloc. Differential Revision: http://reviews.llvm.org/D21441 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272951 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Fix for crash in task dependenciesJonathan Peyton
With single thread using __kmpc_omp_wait_deps segfaults in OpenMP runtime. Offloading with depend also encounters this problem when we generate kmpc_omp_wait_deps instead of kmpc_omp_task_with_deps. Patch by Alex Duran Differential Revision: http://reviews.llvm.org/D21384 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272949 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Fixed missing memory cleanup in __kmp_affinity_create_hwloc_map()Jonathan Peyton
Cleanup: fixed missing memory cleanup in couple of corner cases. Fixes possible memory leak in some corner cases Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21355 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272946 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Reduce perf impact of redundant ittnotify callsJonathan Peyton
Improved performance of ittnotify calls by request from ittnotify owner: calls to __itt_string_handle_create made unique (it was called multiple times). Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21353 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Deprecate KMP_PLACE_THREADS and rename as KMP_HW_SUBSETJonathan Peyton
Deprecate KMP_PLACE_THREADS and rename it to KMP_HW_SUBSET due to confusion about its purpose and function among users. KMP_HW_SUBSET is an environment variable which allows users to easily pick a subset of the hardware topology to use. e.g., KMP_HW_SUBSET=30c,2t means use 30 cores, 2 threads per core. Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21340 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16Bug fix: crash if teams executed on hostJonathan Peyton
Added argv array check/allocation for parallel directly nested inside the teams construct, as new coming Fortran codegen passes parameters directly into kmpc_fork_call missing same parameters in kmpc_fork_teams (earlier codegen passed to parallel the subset of parameter passed to teams, and thus no check/allocation needed). Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21336 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272935 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14Fix large overhead with itt notifications on region/barrier name composingJonathan Peyton
Currently, there is a big overhead in reporting of loop metadata through ittnotify. The pair of functions: __kmp_str_loc_init/__kmp_str_loc_free are replaced with strchr/atoi calls. Thus, a lot of time consuming actions are skipped - many memory allocations/deallocations, heavy string duplication, etc. The loop metadata only needs line and column info from the source string, so no allocations and string splitting actually needed. Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21309 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14Remove unused wait/release code.Jonathan Peyton
Cleanup - unused code removal. TODO: consider to remove (replace with flag class methods) also kmp_wait_64 and kmp_release_64 routines. Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21332 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14Whitespace cleanup of dllexportsJonathan Peyton
Differential Revision: http://reviews.llvm.org/D21331 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14Renaming change: 41 -> 45 and 4.1 -> 4.5Jonathan Peyton
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. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13Bug fix for Bugzilla bug 26602: Remove function bodies with KMP_ASSERT(0)Jonathan Peyton
Fix for bugzilla https://llvm.org/bugs/show_bug.cgi?id=26602. Removed functions body consisted of the only KMP_ASSERT(0) statement. Thus possible runtime crash converted to compile-time error, which looks preferable (faster possible error detection). TODO: consider C++11 static assert as an alternative, that could make the diagnostics better. Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21304 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13Affinity mask processing improvementsJonathan Peyton
Remove static specifier from var fullMask and remove kmp_get_fullMask() routine. When iterating through procs in a mask, always check if proc is in fullMask (this check was missing in a few places). Patch by Brian Bliss. Differential Revision: http://reviews.llvm.org/D21300 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272589 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13Exclude untied tasks from task stealing constraintJonathan Peyton
If either current_task or new_task is untied then skip task scheduling constraint checks, because untied tasks are not affected by the task scheduling constraints. Differential Revision: http://reviews.llvm.org/D21196 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272570 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13Fix crash when libomp loaded/unloaded multiple timesJonathan Peyton
The problem scenario is the following: A dynamic library, libfoo.so, depends on libomp.so (it creates parallel region and calls some omp functions). An application has a loop where it dynamically loads libfoo.so, calls the function from it, unloads libfoo.so. After several loop iterations application crashes with the message about lack of resources OMP: Error #34: System unable to allocate necessary resources for OMP thread: The problem is that pthread_kill() was not followed by pthread_join() in case of terminated thread. This patch fixes this problem for both worker and monitor threads. Differential Revision: http://reviews.llvm.org/D21200 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13Hwloc refactoring patchJonathan Peyton
These changes remove the hwloc_topology_ignore_type function which doesn't exist in the hwloc 2.0 API. In the existing code, the topology extracted from hwloc has the cache levels stripped out and then assumes the final stripped topology follows the typical three-level topology: packages -> cores -> HW threads. But the code is doing unclean manipulations to determine at what level those resources are located and also assumes too much about what hwloc is detecting (there could be intermediate levels in between socket and core for instance). This new way of extracting the topology doesn't strip out any hardware objects that hwloc detects. It does not assume the three level topology, and instead searches for the relevant three levels within the topology for each bit of information using hwloc interface functions. i.e., the three level topology subset that our affinity code is interested in is extracted from the hwloc topology tree directly. For example, the new __kmp_hwloc_get_nobjs_under_obj function gives the user the number of cores under a socket reliably without worrying if there are unexpected objects between the socket object and core object in the hwloc topology structure. Also, now that all topology information is kept, there are also possibilities of using the caches/numa nodes to determine more sophisticated affinity settings in the future. There is also some cleanup code added for the destruction of the __kmp_hwloc_topology object. Differential Revision: http://reviews.llvm.org/D21195 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13Fix bitmask complement operationJonathan Peyton
The bitmask complement operation doesn't consider the max proc id which means something like !{0} will be translated to {1,2,3,4,...,600,601,...,1023} on a Linux system even though there aren't 600 processors on said system. This change has the complement bitmask and-ed with the fullmask so that it will only contain valid processors. Differential Revision: http://reviews.llvm.org/D21245 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13[STATS] Add stats gathering for taskloop constructJonathan Peyton
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272560 91177308-0d34-0410-b5e6-96231b3b80d8