- Jan 19, 2019
-
-
Chandler Carruth authored
to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
-
- Jan 17, 2019
-
-
Hans Wennborg authored
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
-
- Jan 16, 2019
-
-
Jonathan Peyton authored
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
-
Joachim Protze authored
The compiler warns about an unused variable/statement: runtime/src/kmp_affinity.cpp:4958:18: warning: statement has no effect [-Wunused-value] KA_TRACE(1000, ; { ^ runtime/src/kmp_debug.h:84:24: note: in definition of macro 'KA_TRACE' __kmp_debug_printf x; \ ^ Instead of the unused reference to this function, this patch now calls the function with an empty string. The call to this function should have no effect. Patch provided by joachim.protze Reviewers: jlpeyton, hbae, AndreyChurbanov Reviewed By: AndreyChurbanov Tags: #openmp, #ompt Differential Revision: https://reviews.llvm.org/D56775 llvm-svn: 351323
-
Joachim Protze authored
llvm-svn: 351315
-
Joachim Protze authored
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
-
- Jan 15, 2019
-
-
Jonathan Peyton authored
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
-
Jonathan Peyton authored
This change fixes the sanity issue reported in Bug 40042. Lock function definitions for the three lock kinds were added to disambiguate calls to the lock functions done directly and indirectly. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=40042 Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D56103 llvm-svn: 351224
-
Jonathan Peyton authored
Make __ompt_implicit_task_end a static function and remove the inline part. Remove pId variable that is unused. This fixes small regression in SPEC kdtree benchmark. Also reformat some of __ompt_implicit_task_end. Differential Revision: https://reviews.llvm.org/D55788 llvm-svn: 351221
-
Joachim Protze authored
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
-
- Jan 13, 2019
-
-
Roman Lebedev authored
Summary: Two things: 1. Those two variables had the wrong sigdness, which was resulting in "sign mismatch in comparison" warning. 2. The whole `kmp_debugger.cpp` wasn't being built, or rather, it was being built as-if `USE_DEBUGGER` was off, thus, nothing provided the definition of `__kmp_omp_debug_struct_info`, `__kmp_debugging`. Makes sense, because `USE_DEBUGGER` is set in `kmp_config.h`, which is not included explicitly. It is included by `kmp.h`, but that one is only included inside of the `#if USE_DEBUGGER` block.. I *think* this is the only source file with this issue, everything else seem to `#include` either `kmp.h` or `kmp_config.h`. The alternative solution would be to add `add_compile_options(-include kmp_config.h)` in CMake. I did verify that `__kmp_omp_debug_struct_info` becomes available with this patch. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=38612 | PR38612 ]]. Reviewers: AndreyChurbanov, jlpeyton, Hahnfeld Reviewed By: jlpeyton Subscribers: guansong, jfb, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D55783 llvm-svn: 351019
-
- Jan 09, 2019
-
-
Andrey Churbanov authored
Patch by sergi.mateo.bellido@gmail.com Differential Revision: https://reviews.llvm.org/D56432 llvm-svn: 350713
-
- Jan 03, 2019
-
-
Jonathan Peyton authored
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
-
- Dec 18, 2018
-
-
Joachim Protze authored
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
-
- Dec 15, 2018
-
-
Roman Lebedev authored
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
-
- Dec 14, 2018
-
-
Jonathan Peyton authored
The value returned by __kmp_now_nsec() can overflow 32-bit values causing incorrect values to be returned. The overflow can end up causing a divide by zero error because in __kmp_initialize_system_tick(), the value (__kmp_now_nsec() - nsec) can end up being much larger than the numerator: 1e6 * (delay + (now - goal)) during a pathological timing where the current time calculated is much larger than nsec. When this happens, the value of __kmp_ticks_per_msec is set to zero which is then used as the denominator in the KMP_NOW_MSEC() macro leading to the divide by zero error. Differential Revision: https://reviews.llvm.org/D55300 llvm-svn: 349090
-
Jonathan Peyton authored
This patch adds the affinity format functionality introduced in OpenMP 5.0. This patch adds: Two new environment variables: OMP_DISPLAY_AFFINITY=TRUE|FALSE OMP_AFFINITY_FORMAT=<string> and Four new API: 1) omp_set_affinity_format() 2) omp_get_affinity_format() 3) omp_display_affinity() 4) omp_capture_affinity() The affinity format functionality has two ICV's associated with it: affinity-display-var (bool) and affinity-format-var (string). The affinity-display-var enables/disables the functionality through the envirable OMP_DISPLAY_AFFINITY. The affinity-format-var is a formatted string with the special field types beginning with a '%' character similar to printf For example, the affinity-format-var could be: "OMP: host:%H pid:%P OStid:%i num_threads:%N thread_num:%n affinity:{%A}" The affinity-format-var is displayed by every thread implicitly at the beginning of a parallel region when any thread's affinity has changed (including a brand new thread being spawned), or explicitly using the omp_display_affinity() API. The omp_capture_affinity() function can capture the affinity-format-var in a char buffer. And omp_set|get_affinity_format() allow the user to set|get the affinity-format-var explicitly at runtime. omp_capture_affinity() and omp_get_affinity_format() both return the number of characters needed to hold the entire string it tried to make (not including NULL character). If not enough buffer space is available, both these functions truncate their output. Differential Revision: https://reviews.llvm.org/D55148 llvm-svn: 349089
-
- Dec 11, 2018
-
-
Michal Gorny authored
Disable KMP_HAVE_QUAD when building via gcc on NetBSD system, as the build fails due to unimplemented builtins: .../kmp_atomic.cpp.o: In function `__kmpc_atomic_cmplx16_mul': .../kmp_atomic.cpp:1332: undefined reference to `__multc3' .../kmp_atomic.cpp.o: In function `__kmpc_atomic_cmplx16_div': .../kmp_atomic.cpp:1334: undefined reference to `__divtc3' ... Differential Revision: https://reviews.llvm.org/D55478 llvm-svn: 348886
-
Michal Gorny authored
Switch NetBSD from reading /proc (which is broken) to getloadavg() (which is already used by Darwin). NetBSD discourages using procfs in favor of system API calls. Differential Revision: https://reviews.llvm.org/D55486 llvm-svn: 348885
-
Kamil Rytarowski authored
Summary: Use the sysctl(3) function to check whether an address is mapped into the address space. Reviewers: mgorny, joerg, #openmp Reviewed By: mgorny Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D55549 llvm-svn: 348874
-
Kamil Rytarowski authored
Summary: _lwp_self() returns current Thread Id in a numeric version on NetBSD. Reviewers: joerg, mgorny, #openmp Reviewed By: mgorny Subscribers: llvm-commits, openmp-commits, #openmp Tags: #openmp Differential Revision: https://reviews.llvm.org/D55497 llvm-svn: 348873
-
- Dec 10, 2018
-
-
Jonathan Peyton authored
Fix two build issues: 1) Recent commit 348756 accidentally included Unix clang compilers to use immintrin.h when only clang-cl should be using it leading to the following error: openmp-llvm/runtime/src/kmp_lock.cpp:2035:25: error: always_ inline function '_xbegin' requires target feature 'rtm', but would be inlined into function '__kmp_test_adaptive_lock_only' that is compiled without support for 'rtm' kmp_uint32 status = _xbegin(); This patch changes the guard to use immintrin.h to only use clang-cl instead of all clang 2) gcc-8 gives a warning about multiline comment in kmp_runtime.cpp: This patch just changes it to a two line comment openmp-llvm/runtime/src/kmp_runtime.cpp:7697:8: warning: multi-line comment [-Wcomment] #endif // KMP_OS_LINUX || KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD \ llvm-svn: 348783
-
Andrey Churbanov authored
Patch by Peiyuan Song <squallatf@gmail.com> Differential Revision: https://reviews.llvm.org/D53422 llvm-svn: 348756
-
- Dec 09, 2018
-
-
Kamil Rytarowski authored
Summary: This patch permits OpenMP to build and work (with both gcc and clang) on OpenBSD. It mostly follows what was done for FreeBSD and NetBSD, except OpenBSD does not have pthread_getattr_np support, so it follows OS X in that one instance. Reviewers: #openmp, krytarowski Reviewed By: krytarowski Subscribers: guansong, jfb, emaste, mgorny, krytarowski, #openmp Tags: #openmp Differential Revision: https://reviews.llvm.org/D34280 llvm-svn: 348726
-
Kamil Rytarowski authored
Summary: Additions mostly follow FreeBSD and NetBSD and are not intrusive. There is similar patch for OpenBSD: https://reviews.llvm.org/D34280 The -lm was being omitted due to -Wl,--as-needed in cmake rule, similar patch is in freebsd-ports/devel/llvm-devel port. Simple OpenMP programs compile and work as expected: $ clang-devel ~/omp_hello.c -fopenmp -I/usr/local/llvm-devel/include $ LD_LIBRARY_PATH=/usr/local/llvm-devel/lib OMP_NUM_THREADS=100 ./a.out The assertion in LLVMgold.so when -fopenmp was used together with -flto in 20170524 snapshot is no longer triggered on current svn-trunk and works fine as in llvm-4.0 with our local patches. Reviewers: #openmp, krytarowski Reviewed By: krytarowski Subscribers: dexonsmith, jfb, krytarowski, guansong, gregrodgers, emaste, mgorny, mehdi_amini Differential Revision: https://reviews.llvm.org/D35129 llvm-svn: 348725
-
- Nov 30, 2018
-
-
Jonathan Peyton authored
There is a conflict between libomptarget and libomp concerning some of the standard OpenMP device API which needs further intestigation. llvm-svn: 347932
-
- Nov 29, 2018
-
-
Jonathan Peyton authored
This patch adds __kmpc_omp_reg_task_with_affinity to register affinity information for tasks. For now, the affinity information is not used, and the function always succeeds. This also adds the kmp_task_affinity_info_t structure to store the task affinity information. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D55026 llvm-svn: 347907
-
- Nov 28, 2018
-
-
Jonathan Peyton authored
This change renames ompt_mutex_impl_unknown to ompt_mutex_impl_none, following the name change in the specification. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D54347 llvm-svn: 347802
-
Jonathan Peyton authored
* Fix calculation of string length. * Remove NULL-check of pointer which has been dereferenced. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D54948 llvm-svn: 347801
-
Jonathan Peyton authored
There is low probability that array th_hot_teams can be accessed out of bound (when many nested levels are requested to keep hot teams via KMP_HOT_TEAMS_MAX_LEVEL). The patch adds the check of index that fixes the problem. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D54950 llvm-svn: 347800
-
Jonathan Peyton authored
Add omp_get_device_num() function for 5.0 which returns the number of the device the current thread is running on. Also, did some cleanup and updating of device API functions to make them into weak functions that should be replaced with libomptarget functions when libomptarget is present. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D54342 llvm-svn: 347799
-
- Nov 14, 2018
-
-
https://bugs.llvm.org/show_bug.cgi?id=39137Andrey Churbanov authored
Do not write to internal structure if it keeps same value. Differential Revision: https://reviews.llvm.org/D54305 llvm-svn: 346862
-
- Nov 07, 2018
-
-
Andrey Churbanov authored
Patch by samuel.thibault@ens-lyon.org Differential Revision: https://reviews.llvm.org/D54079 llvm-svn: 346310
-
Andrey Churbanov authored
Differential Revision: https://reviews.llvm.org/D53380 llvm-svn: 346307
-
- Oct 25, 2018
-
-
Andrey Churbanov authored
Patch by squallatf@gmail.com Differential Revision: https://reviews.llvm.org/D53480 llvm-svn: 345255
-
- Oct 05, 2018
-
-
Jonathan Peyton authored
llvm-svn: 343869
-
Jonathan Peyton authored
The KMP_DYNAMIC_LIB guard was hard set to 1. This patch has the guard depend on CMake variable LIBOMP_ENABLE_SHARED. llvm-svn: 343866
-
- Oct 04, 2018
-
-
Jonathan Peyton authored
Initializing an ompt_data_t object using the pointer union member is potentially unsafe in 32-bit programs. This change fixes the issue by using the constant, ompt_data_none. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D52046 llvm-svn: 343785
-
- Oct 02, 2018
-
-
Jonathan Peyton authored
On Windows, child workers are terminated by the parent during the normal program exit process (ExitProcess()) and they are not able to finish generating their OpenMP events. We can force manual library shut down in __kmpc_end() to fix this at least for the cases where __kmpc_end() is properly inserted. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D52628 llvm-svn: 343619
-
- Oct 01, 2018
-
-
https://reviews.llvm.org/D51694Andrey Churbanov authored
Patch suggested by Kelvin Li: removed optional "kind=" part of kind-selector for variables with long names and kind names. Differential Revision: https://reviews.llvm.org/D52712 llvm-svn: 343475
-