summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test/worksharing
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] NFC: Fix trivial typos in commentsKelvin Li2020-01-033-3/+3
| | | | | | Submitted by: kiszk Differential Revision: https://reviews.llvm.org/D72171
* [openmp] Fixed nonmonotonic schedule when #threads > #chunks in a loop.AndreyChurbanov2019-11-271-0/+40
| | | | Differential Revision: https://reviews.llvm.org/D70713
* Remove REQUIRES OMP spec version within lit testsJonathan Peyton2019-07-176-6/+0
| | | | | | | | This is a follow up patch to D64534 (r365963) which removed all OMP spec versioning within the OpenMP runtime codebase. This patch removes REQUIRES: openmp-x.y lines from lit tests. llvm-svn: 366341
* [OpenMP] Add OpenMP 5.0 nonmonotonic codeJonathan Peyton2019-04-302-0/+220
| | | | | | | | | | | | This patch adds: * New omp_sched_monotonic flag to omp_sched_t which is handled within the runtime * Parsing of monotonic/nonmonotonic in OMP_SCHEDULE * Tests for the monotonic flag and envirable parsing * Logic to force monotonic when hierarchical scheduling is used Differential Revision: https://reviews.llvm.org/D60979 llvm-svn: 359601
* [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40Roman Lebedev2018-12-156-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I have discovered this because i wanted to experiment with building static libomp (with openmp-4.0 support only) for debugging purposes. There are three kinds of problems here: 1. `__kmp_compare_and_store_acq()` simply does not exist. It was added in D47903 by @jlpeyton. I'm guessing `__kmp_atomic_compare_store_acq()` was meant. 2. In `__kmp_is_ticket_lock_initialized()`, `lck->lk.initialized` is `std::atomic<bool>`, while `lck` is `kmp_ticket_lock_t *`. Naturally, they can't be equality-compared. Either, it should return the value read from `lck->lk.initialized`, or do what `__kmp_is_queuing_lock_initialized()` does, compare the passed pointer with the field in the struct pointed by the pointer. I think the latter is correct-er choice here. 3. Tests were not versioned. They assume that `LIBOMP_OMP_VERSION` is at the latest version. This does not touch LIBOMP_OMP_VERSION=30. That is still broken. Reviewers: jlpeyton, Hahnfeld, AndreyChurbanov Reviewed By: AndreyChurbanov Subscribers: guansong, jfb, openmp-commits, jlpeyton Tags: #openmp Differential Revision: https://reviews.llvm.org/D55496 llvm-svn: 349260
* Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39970Andrey Churbanov2018-12-134-3/+8
| | | | | | | | Broken tests fixed Differential Revision: https://reviews.llvm.org/D55598 llvm-svn: 349017
* [OpenMP] Fix doacross testing for gccJonathan Peyton2018-08-022-0/+66
| | | | | | | | | | This patch adds a test using the doacross clauses in OpenMP and removes gcc from testing kmp_doacross_check.c which is only testing the kmp rather than the gomp interface. Differential Revision: https://reviews.llvm.org/D50014 llvm-svn: 338757
* [test] Remove XFAIL of omp_for_bigbounds.c for Intel CompilerJonas Hahnfeld2018-07-261-1/+4
| | | | | | | | | The initial commit said that the test passes with Intel Compiler, so change XFAIL to only list clang and gcc. Differential Revision: https://reviews.llvm.org/D49801 llvm-svn: 338051
* Add missing memory barrier for queuing locksJonas Hahnfeld2017-12-081-1/+1
| | | | | | | | | | Otherwise I see hangs in the omp_single_copyprivate test when compiling in release mode. With the debug assertions, I get a failure `head > 0 && tail > 0`. Differential Revision: https://reviews.llvm.org/D40722 llvm-svn: 320150
* Fix for OMP doacross implementation on PowerJonas Hahnfeld2017-11-221-1/+1
| | | | | | | | | | Power has a weak consistency model so we need memory barriers to make writes (both from runtime and from user code) available for all threads. Differential Revision: https://reviews.llvm.org/D40175 llvm-svn: 318848
* OpenMP 4.5: implemented support of schedule(simd:guided) andAndrey Churbanov2017-06-054-0/+1028
| | | | | | | | | | schedule(simd:runtime) - library part. Compiler generation should use newly introduced scheduling kinds kmp_sch_guided_simd = 46, kmp_sch_runtime_simd = 47, as parameters to __kmpc_dispatch_init_* entries. Differential Revision: https://reviews.llvm.org/D31602 llvm-svn: 304724
* Enable omp_get_schedule() to return static steal type.Jonathan Peyton2016-10-071-0/+82
| | | | | | | As the code is now, calling omp_get_schedule() when OMP_SCHEDULE=static_steal will cause an assert. llvm-svn: 283576
* Fix the nowait tests for omp for and omp singleJonathan Peyton2016-07-062-48/+88
| | | | | | | | | | 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. llvm-svn: 274641
* Fix omp_sections_nowait.c test to address Bugzilla Bug 28336Jonathan Peyton2016-06-291-24/+59
| | | | | | | | | | | | | 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 llvm-svn: 274151
* Offer API for setting number of loop dispatch buffersJonathan Peyton2016-05-311-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is the lack of dispatch buffers when thousands of loops with nowait, about 10 iterations each, are executed by hundreds of threads. We only have built-in 7 dispatch buffers, but there is a need in dozens or hundreds of buffers. The problem can be fixed by setting KMP_MAX_DISP_BUF to bigger value. In order to give users same possibility I changed build-time control into run-time one, adding API just in case. This change adds an environment variable KMP_DISP_NUM_BUFFERS and a new API function kmp_set_disp_num_buffers(int num_buffers). The KMP_DISP_NUM_BUFFERS envirable works only before serial initialization, because during the serial initialization we already allocate buffers for the hot team, so it is too late to change the number of buffers later (or we need to reallocate buffers for all teams which sounds too complicated). The kmp_set_defaults() routine does not work for this envirable, because it calls serial initialization before reading the parameter string. So a new routine, kmp_set_disp_num_buffers(), is created so that it can set our internal global variable before the library initialization. If both the envirable and API used the envirable wins. Differential Revision: http://reviews.llvm.org/D20697 llvm-svn: 271318
* Remove unnecessary unistd.h header from tests.Jonathan Peyton2016-05-184-4/+0
| | | | llvm-svn: 269987
* Remove trailing whitespace from testsJonathan Peyton2016-05-1727-122/+122
| | | | llvm-svn: 269841
* Fix trip count calculation for parallel loops in runtimeJonathan Peyton2016-04-181-0/+67
| | | | | | | | | | | | | | | The trip count calculation was incorrect for loops with large bounds. For example, for(int i=-2,000,000,000; i < 2,000,000,000; i+=50000000), the trip count calculation had overflow (trying to calculate 2,000,000,000 + 2,000,000,000 with signed integers) and wasn't giving the right value. This patch fixes this error in the runtime by using unsigned integers instead. There is still a bug in the clang compiler component because it warns that there is overflow in the test case file when there isn't. This error isn't there for the Intel Compiler. So for now, the test case is designated as XFAIL. Differential Revision: http://reviews.llvm.org/D19078 llvm-svn: 266677
* Forgot to add test files for doacross and task priority.Jonathan Peyton2016-03-021-0/+56
| | | | llvm-svn: 262533
* [OPENMP] Fixed tests for gcc build.Alexey Bataev2015-11-161-1/+2
| | | | llvm-svn: 253200
* Fix for zero chunk sizeJonathan Peyton2015-11-061-0/+39
| | | | | | | | Setting dynamic schedule with chunk size 0 via omp_set_schedule(dynamic,0) and then using "schedule (runtime)" causes infinite loop because for the chunked dynamic schedule we didn't correct zero chunk to the default (1). llvm-svn: 252338
* [OPENMP] Add dependency to clang/clang-headers etc. for in-tree build of libomp.Alexey Bataev2015-11-021-1/+1
| | | | | | | Add additional dependency to clang/clang-headers/FileCheck to avoid possible troubles with in-tree build/test of libomp + allow parallel testing of libomp. Also includes bugfixes for tests + improvements to avoid possible race conditions. Differential Revision: http://reviews.llvm.org/D14055 llvm-svn: 251797
* OpenMP Initial testsuite change to purely llvm-lit based testingJonathan Peyton2015-09-2131-0/+3626
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
OpenPOWER on IntegriCloud