summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test/api
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [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] 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
* [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40Roman Lebedev2018-12-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-0/+5
| | | | | | | | Broken tests fixed Differential Revision: https://reviews.llvm.org/D55598 llvm-svn: 349017
* [test] [runtime] Permit omp_get_wtick() to return 0.01Michal Gorny2018-12-111-1/+1
| | | | | | | | | | | | | Increase the range for omp_get_wtick() test to allow for 0.01 (from <0.01). This is needed for NetBSD where it returns exactly that value due to CLOCKS_PER_SEC being 100. This should not cause a significant difference from e.g. FreeBSD where it is 128, and especially from Linux where CLOCKS_PER_SEC is apparently meaningless and sysconf(_SC_CLK_TCK) gives 100 as well. Differential Revision: https://reviews.llvm.org/D55493 llvm-svn: 348857
* [OpenMP] Initial implementation of OMP 5.0 Memory Management routinesJonathan Peyton2018-09-071-0/+78
| | | | | | | | | | | | | | | | | | | | | | | Implemented omp_alloc, omp_free, omp_{set,get}_default_allocator entries, and OMP_ALLOCATOR environment variable. Added support for HBW memory on Linux if libmemkind.so library is accessible (dynamic library only, no support for static libraries). Only used stable API (hbwmalloc) of the memkind library though we may consider using experimental API in future. The ICV def-allocator-var is implemented per implicit task similar to place-partition-var. In the absence of a requested allocator, the uses the default allocator. Predefined allocators (the only ones currently available) are made similar for C and Fortran, - pointers (long integers) with values 1 to 8. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D51232 llvm-svn: 341687
* Fix memory error in case of reinit using kmp_set_defaults() for lock code.Jonathan Peyton2017-01-181-0/+53
| | | | | | | | The lock tables were being reallocated if kmp_set_defaults() was called. In the env_init code it says that the user should be able to switch between different KMP_CONSISTENCY_CHECK values which is what this change enables. llvm-svn: 292349
* Remove trailing whitespace from testsJonathan Peyton2016-05-173-5/+5
| | | | llvm-svn: 269841
* Adding new kmp_aligned_malloc() entry pointJonathan Peyton2016-05-121-0/+62
| | | | | | | | | | | | | This change adds a new entry point, kmp_aligned_malloc(size_t size, size_t alignment), an entry point corresponding to kmp_malloc() but with the capability to return aligned memory as well. Other allocator routines have been adjusted so that kmp_free() can be used for freeing memory blocks allocated by any kmp_*alloc() routine, including the new kmp_aligned_malloc() routine. Differential Revision: http://reviews.llvm.org/D19814 llvm-svn: 269365
* [OPENMP] Fixed tests for gcc build.Alexey Bataev2015-11-161-1/+1
| | | | llvm-svn: 253200
* [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 Testsuite] Change omp_get_wtime.c timer resolution to 3 percentJonathan Peyton2015-09-241-1/+1
| | | | llvm-svn: 248501
* OpenMP Initial testsuite change to purely llvm-lit based testingJonathan Peyton2015-09-215-0/+158
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