summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP][OMPT] fix reduction test for 32-bit x86protze@itc.rwth-aachen.de2020-02-051-3/+7
| | | | | | | | | | | | | | Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44733 | TEST 'libomp :: ompt/synchronization/reduction/tree_reduce.c' FAILED on 32-bit x86 ]] For 32-bit we need at least 3 variables to avoid atomic reduction to be choosen by runtime function `__kmp_determine_reduction_method`. This patch adds reduction variables to the testcase. Reviewers: mgorny, Hahnfeld Differential Revision: https://reviews.llvm.org/D73850 (cherry picked from commit 90e4ebdce55fd3c1f8877f19784a5339b9890f98)
* [OpenMP] NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-073-3/+3
| | | | | | | | | | | | Reviewers: jdoerfert, Jim Reviewed By: Jim Subscribers: Jim, mgorny, guansong, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72285
* [OpenMP] NFC: Fix trivial typos in commentsKelvin Li2020-01-036-6/+6
| | | | | | Submitted by: kiszk Differential Revision: https://reviews.llvm.org/D72171
* [OpenMP] Implementation of OMPT reduction callbacksprotze@itc.rwth-aachen.de2019-12-273-0/+122
| | | | | | | | | Including two tests These callbacks were added late to the 5.0 specification, an implementation is missing. Reviewed By: jdoerfert Differential Review: https://reviews.llvm.org/D70395
* [openmp] Fixed nonmonotonic schedule when #threads > #chunks in a loop.AndreyChurbanov2019-11-271-0/+40
| | | | Differential Revision: https://reviews.llvm.org/D70713
* Remove +x permission on some filesSylvestre Ledru2019-11-161-0/+0
|
* [openmp] [test] Skip one more test that kills NetBSD buildbotMichał Górny2019-11-071-0/+3
|
* fixed test: eliminated race condition which might cause deadlockAndrey Churbanov2019-09-251-1/+1
| | | | llvm-svn: 372887
* Enable tasks dependencies hashmaps resizing.Andrey Churbanov2019-09-251-0/+38
| | | | | | | | Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D67447 llvm-svn: 372879
* [OpenMP] Fix broken build due to new OMPT testsHansang Bae2019-08-054-4/+4
| | | | | | | | | New OMPT tests with teams construct should be disabled for GCC as it emits code with a GOMP entry not supported in the LLVM runtime. Differential Revision: https://reviews.llvm.org/D65757 llvm-svn: 367939
* Add OMPT support for teams constructHansang Bae2019-08-036-14/+308
| | | | | | | | This change adds OMPT support for events from teams construct. Differential Revision: https://reviews.llvm.org/D64025 llvm-svn: 367746
* [OpenMP] RISCV64 portJonas Hahnfeld2019-07-251-0/+20
| | | | | | | | | | | | | | This is a port of libomp for the RISC-V 64-bit Linux target. We have tested this port on a HiFive Unleashed development board using a downstream LLVM that has support for the missing bits in upstream. As of now, all tests are passing, including OMPT. Patch by Ferran Pallarès! Differential Revision: https://reviews.llvm.org/D59880 llvm-svn: 367021
* [OMPT] Cleanup reset of exit_frame pointerJonas Hahnfeld2019-07-221-0/+3
| | | | | | | | | | | | | | | | | | This is done at call-site and does not need to be handled in __kmp_invoke_microtask. It was already absent from the x86 and x86_64 assembly, this patch removes it from the generic implementation in z_Linux_util.cpp and adds documentation for AArch64 and PPC64 that it's actually not needed. I can't test on these architectures, so I don't want to change the code just because it looks right :) While at it, rename some variables for consistency and add a check in test/ompt/parallel/normal.c that the pointer was reset before entering the barrier. Differential Revision: https://reviews.llvm.org/D64442 llvm-svn: 366721
* Remove REQUIRES OMP spec version within lit testsJonathan Peyton2019-07-1713-13/+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] Remove OMP spec versioningJonathan Peyton2019-07-125-15/+0
| | | | | | | | | | Remove all older OMP spec versioning from the runtime and build system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D64534 llvm-svn: 365963
* Create a runtime option to disable task throttling.Andrey Churbanov2019-07-021-0/+60
| | | | | | | | Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D63196 llvm-svn: 364934
* New implementation of OpenMP 5.0 detached tasks.Andrey Churbanov2019-06-193-0/+367
| | | | | | | | Patch by Alex Duran Differential Revision: https://reviews.llvm.org/D62485 llvm-svn: 363799
* Added propagation of not big initial stack size of master thread to workers.Andrey Churbanov2019-06-051-0/+65
| | | | | | | | Currently implemented only for non-Windows 64-bit platforms. Differential Revision: https://reviews.llvm.org/D62488 llvm-svn: 362618
* Fix OMP_TARGET_OFFLOAD parsingHansang Bae2019-05-301-0/+62
| | | | | | | | | | | Current parsing allows trailing string after the permitted value, MANDATORY|DISABLED|DEFAULT -- e.g., "mandatorynot" is also recognized as "MANDATORY". Such cases should be recognized as incorrect/unknown value. Differential Revision: https://reviews.llvm.org/D62431 llvm-svn: 362125
* [openmp] [test] Skip kernel-breaking tests on NetBSDMichal Gorny2019-05-283-0/+13
| | | | | | | | | The omp_taskloop_num_tasks and omp_taskwait have deadlooped on the NetBSD buildbot previously, practically hanging the host running it. Disable them until we can find a good solution, or make the kernel less fragile. llvm-svn: 361825
* [OpenMP] Add implementation to two OMPT API routinesJonathan Peyton2019-05-213-10/+151
| | | | | | | | | | | This change adds implementation to ompt_finalize_tool() and ompt_get_task_memory(). Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D61657 llvm-svn: 361309
* [OpenMP][OMPT] Fix locking testcases for 32 bit architecturesJoachim Protze2019-05-202-2/+2
| | | | | | | | | | | | | | https://reviews.llvm.org/D58454 did not fix the problem for a typical use case of building LLVM with gcc or icc and then testing with the newly built clang compiler. The compilers do not agree on how to extend a 32-bit pointer to uint64, so make the pointer unsigned first, before adjusting the size. Patch by Joachim Protze Differential Revision: https://reviews.llvm.org/D58506 llvm-svn: 361158
* [OMPT] Handling of the events of initial-task-begin and initial-task-endJoachim Protze2019-05-209-45/+51
| | | | | | | | | | | OpenMP 5.0 says that the callback for the events initial-task-begin and initial-task-end has to be ompt_callback_implicit_task. Patch by Tim Cramer Differential Revision: https://reviews.llvm.org/D58776 llvm-svn: 361157
* [OpenMP] Implement task modifier for reduction clauseJonathan Peyton2019-05-014-0/+414
| | | | | | | | | | | | | | | | | Implemented task modifier in two versions - one without taking into account omp_orig variable (the omp_orig still can be processed by compiler without help of the library, but each reduction object will need separate initializer with global access to omp_orig), another with omp_orig variable included into interface (single initializer can be used for multiple reduction objects of the same type). Second version can be used when the omp_orig is not globally accessible, or to optimize code in case of multiple reduction objects of the same type. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D60976 llvm-svn: 359710
* [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] Implement 5.0 memory managementJonathan Peyton2019-04-084-81/+112
| | | | | | | | | | | | | | | | | | * Replace HBWMALLOC API with more general MEMKIND API, new functions and variables added. * Have libmemkind.so loaded when accessible. * Redirect memspaces to default one except for high bandwidth which is processed separately. * Ignore some allocator traits e.g., sync_hint, access, pinned, while others are processed normally e.g., alignment, pool_size, fallback, fb_data, partition. * Add tests for memory management Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D59783 llvm-svn: 357929
* Ensure correct pthread flags and libraries are usedDimitry Andric2019-04-033-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On most platforms, certain compiler and linker flags have to be passed when using pthreads, otherwise linking against libomp.so might fail with undefined references to several pthread functions. Use CMake's `find_package(Threads)` to determine these for standalone builds, or take them (and optionally modify them) from the top-level LLVM cmake files. Also, On FreeBSD, ensure that libomp.so is linked against libm.so, similar to NetBSD. Adjust test cases with hardcoded `-lpthread` flag to use the common build flags, which should now have the required pthread flags. Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim, Hahnfeld Reviewed By: Hahnfeld Subscribers: AndreyChurbanov, tra, EricWF, Hahnfeld, jfb, jdoerfert, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D59451 llvm-svn: 357618
* Fix interoperability test compilation on FreeBSDDimitry Andric2019-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While building the 8.0 releases on FreeBSD, I encountered the following error in the regression tests, where ompt/misc/interoperability.cpp failed to compile, with: ``` projects/openmp/runtime/test/ompt/misc/interoperability.cpp:7:10: fatal error: 'alloca.h' file not found #include <alloca.h> ^~~~~~~~~~ ``` Like on NetBSD, alloca(3) is defined in <stdlib.h> instead. Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim Reviewed By: jlpeyton Subscribers: jdoerfert, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D59736 llvm-svn: 356936
* [OpenMP] Fix OMPT cancellation test for GOMPJonathan Peyton2019-03-151-2/+2
| | | | | | | | | The GOMP sections interface uses schedule(dynamic) dispatch so it cannot be assumed which thread executes the cancel and which thread executes the cancellation point. This patch allows either thread to execute either section. llvm-svn: 356302
* [OPENMP] Deal with additional store inserted by Clang under -fno-PIC for ↵Stefan Pintilie2019-03-015-7/+6
| | | | | | | | | | | | | | | | PowerPC. Changing the default from -fPIC to -fno-PIC on PowerPC exposed an issue in OpenMP for PowerPC. The issue is reported here: https://bugs.llvm.org/show_bug.cgi?id=40082 This is a fix for that issue. Also removed the XFAIL from the two tests that were failing under -fno-PIC. Differential Revision: https://reviews.llvm.org/D56286 llvm-svn: 355229
* [OpenMP][OMPT] Distinguish different barrier kindsJonathan Peyton2019-02-281-5/+9
| | | | | | | | | | | | | This change makes the runtime decide the intended use of each barrier invocation, for the OMPT synchronization tool callbacks. The OpenMP 5.0 specification defines four possible barrier kinds -- implicit, explicit, implementation, and just normal barrier. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D58247 llvm-svn: 355140
* [OpenMP] Fix check-openmp after r354553Jonas Hahnfeld2019-02-211-0/+2
| | | | | | | | | | | | | | | | | | Calling add_openmp_testsuite will add the tests to check-openmp unless EXCLUDE_FROM_ALL is set. This is problematic because the tests for OMPT will be included twice which doesn't work if the same test is executed concurrently by multiple threads. See: http://lab.llvm.org:8011/builders/openmp-gcc-x86_64-linux-debian/builds/163 http://lab.llvm.org:8011/builders/openmp-clang-x86_64-linux-debian/builds/184 http://lab.llvm.org:8011/builders/openmp-clang-ppc64le-linux-rhel/builds/133 (On PPC some failures are unrelated to r354553, the bot has been red before and this commit is not expected to fix that. For a proper patch please see https://reviews.llvm.org/D56286.) llvm-svn: 354572
* [OpenMP][OMPT] Fix locking testcases for 32 bit architecturesJoachim Protze2019-02-213-2/+3
| | | | | | | | | | | Fix for the bug reported in: https://bugs.llvm.org/show_bug.cgi?id=40531 The address is now casted the same way as in the runtime code. Differential Revision: https://reviews.llvm.org/D58454 llvm-svn: 354553
* [OpenMP] Remove XFAIL for cancellation tests using gccJonathan Peyton2019-02-192-2/+1
| | | | llvm-svn: 354370
* [OpenMP 5.0] Add omp_get_supported_active_levels()Jonathan Peyton2019-02-191-0/+1
| | | | | | | | | | This patch adds the new 5.0 API function omp_get_supported_active_levels(). Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D58211 llvm-svn: 354368
* [OMPT] Remove test output from source treeJonas Hahnfeld2019-02-111-1/+1
| | | | | | | | | %s refers to the test file in the source tree. This was accidentally added in r351197 / 2b46d30 ("[OMPT] Second chunk of final OMPT 5.0 interface updates"). Differential Revision: https://reviews.llvm.org/D58002 llvm-svn: 353715
* [OMPT] Make sure that OMPT is enabled when accessing internals of the runtimeJoachim Protze2019-01-301-0/+148
| | | | | | | | | | | | | | | | | | | | Redo after revert by hans. The wrong include in one test is fixed. Make sure that OMPT is enabled in runtime entry points that access internals of the runtime. Else, return an appropiate value indicating an error or that the data is not available. Patch provided by @sconvent Reviewers: jlpeyton, omalyshe, hbae, Hahnfeld, joachim.protze Reviewed By: joachim.protze Tags: #openmp, #ompt Differential Revision: https://reviews.llvm.org/D47717 llvm-svn: 352611
* Revert r351311 "[OMPT] Make sure that OMPT is enabled when accessing ↵Hans Wennborg2019-01-171-148/+0
| | | | | | | | | | | | | | | | | | | | | | | | internals of the runtime" and also the follow-up r351315. The new test is failing on the buildbots. > Make sure that OMPT is enabled in runtime entry points that access internals > of the runtime. Else, return an appropiate value indicating an error or that > the data is not available. > > Patch provided by @sconvent > > Reviewers: jlpeyton, omalyshe, hbae, Hahnfeld, joachim.protze > > Reviewed By: joachim.protze > > Tags: #openmp, #ompt > > Differential Revision: https://reviews.llvm.org/D47717 llvm-svn: 351431
* [OpenMP] Add omp_pause_resource* APIJonathan Peyton2019-01-161-0/+58
| | | | | | | | | | | | Add omp_pause_resource and omp_pause_resource_all API and enum, plus stub for internal implementation. Implemented callable helper function to do local pause, and added basic functionality for hard and soft pause. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D55078 llvm-svn: 351372
* [OpenMP] Output written by tests should go to build directoryJoachim Protze2019-01-161-1/+1
| | | | llvm-svn: 351332
* [OMPT] Make sure that OMPT is enabled when accessing internals of the runtimeJoachim Protze2019-01-161-0/+148
| | | | | | | | | | | | | | | | | | Make sure that OMPT is enabled in runtime entry points that access internals of the runtime. Else, return an appropiate value indicating an error or that the data is not available. Patch provided by @sconvent Reviewers: jlpeyton, omalyshe, hbae, Hahnfeld, joachim.protze Reviewed By: joachim.protze Tags: #openmp, #ompt Differential Revision: https://reviews.llvm.org/D47717 llvm-svn: 351311
* [OpenMP] Fix for nested proc_bind affinity bugJonathan Peyton2019-01-151-0/+33
| | | | | | | | | | | | | | Using proc_bind clause on a nested #pragma omp parallel region with KMP_AFFINITY set causes an assertion error. This assertion occurs because the place-partition-var is not properly initialized in the nested master threads. Trying to get an intuitive result with KMP_AFFINITY + proc_bind is difficult because of how the KMP_AFFINITY gtid-to-place mapping occurs. This patch creates an initial place list no matter what affinity mechanism is used. For KMP_AFFINITY, the place-partition-var is initialized to all the places. Differential Revision: https://reviews.llvm.org/D55795 llvm-svn: 351227
* [OMPT] Second chunk of final OMPT 5.0 interface updatesJoachim Protze2019-01-1511-21/+32
| | | | | | | | | | | | | | | | | | | | | The omp-tools.h file is generated from the OpenMP spec to ensure that the interface is implemented as specified. The other changes are necessary to update the interface implementation to the final version as published in 5.0. The omp-tools.h header was previously called ompt.h, currently a copy under this name is installed for legacy tools. Patch partially perpared by @sconvent Reviewers: AndreyChurbanov, hbae, Hahnfeld Reviewed By: hbae Tags: #openmp, #ompt Differential Revision: https://reviews.llvm.org/D55579 llvm-svn: 351197
* [OpenMP] Add omp_get_device_num() and update several other device API functionsJonathan Peyton2019-01-031-0/+24
| | | | | | | | | | | | | | | | | | | | Add omp_get_device_num() function for 5.0 which returns the number of the device the current thread is running on. Currently, we are leaving it to the compiler to handle this properly if it is called inside target. Also, did some cleanup and updating of duplicate device API functions (in both libomp and libomptarget) to make them into weak functions that check for the symbol from libomptarget, and will call the version in libomptarget if it is present. If any additional device API functions are implemented also in libomptarget in the future, we should add the dlsym calls to the host functions. Also, if the omp_target_* functions are to be implemented for the host (this has been requested), they should attempt to call the libomptarget versions as well. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D55578 llvm-svn: 350352
* [runtime] [test] Fix using %python pathMichal Gorny2018-12-2212-16/+17
| | | | | | | | | | Fix the newly-added tests to use %python substitution in order to use the correct path to Python interpreter. Otherwise, they fail on NetBSD where there is no 'python', just 'pythonX.Y'. Differential Revision: https://reviews.llvm.org/D56048 llvm-svn: 350001
* [Tests] [OpenMP] XFAIL also for ppc64le.Stefan Pintilie2018-12-182-2/+2
| | | | | | | Two tests were XFAILed for powerpc64le in r349512. They should have also been XFAILed for ppc64le. llvm-svn: 349521
* XFAIL Pair of OpenMP Tests for PowerPC LE LinuxStefan Pintilie2018-12-184-1/+3
| | | | | | | | | | | | | | | XFAIL two tests that fail on PowerPC LE Linux due to the change of default from PIC to no-PIC on that platform. A Bug has been opened for this: https://bugs.llvm.org/show_bug.cgi?id=40082 The tests are: runtime/test/ompt/misc/control_tool.c runtime/test/ompt/synchronization/taskwait.c llvm-svn: 349512
* [Tests] fix non-determinism failure in testcaseJoachim Protze2018-12-181-0/+1
| | | | llvm-svn: 349460
* [OMPT] First chunk of final OMPT 5.0 interface updatesJoachim Protze2018-12-1810-59/+59
| | | | | | | | | | | | | This patch updates the implementation of the ompt_frame_t, ompt_wait_id_t and ompt_state_t. The final version of the OpenMP 5.0 spec added the "t" for these types. Furthermore the structure for ompt_frame_t changed and allows to specify that the reenter frame belongs to the runtime. Patch partially prepared by Simon Convent Reviewers: hbae llvm-svn: 349458
* [OMPT] Add testcase for thread_num provided by implicit task eventsJoachim Protze2018-12-181-0/+61
| | | | llvm-svn: 349457
OpenPOWER on IntegriCloud