Commit Graph
51 Commits
Author SHA1 Message Date
Jonathan Peyton d4b114904a [OpenMP] Remove OMP spec versioning
Remove all older OMP spec versioning from the runtime and build system.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D64534


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@365963 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 21:45:36 +00:00
Andrey Churbanov 0afc673b17 Fixed memory use-after-free problem.
Bug reported in https://bugs.llvm.org/show_bug.cgi?id=42269.
Freeing of the contention group (CG) stucture by master thread looks wrong,
because workers can leave the CG later on. Intead the freeing
is now done by the last thread leaving the CG.

Differential Revision: https://reviews.llvm.org/D63599


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@364456 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 18:11:26 +00:00
Joachim Protze 665d5c5112 [OpenMP][OMPT] Fix locking testcases for 32 bit architectures
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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@361158 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-20 14:21:42 +00:00
Jonathan Peyton e45eef02bb [OpenMP] Implement 5.0 memory management
* 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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@357929 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-08 17:59:28 +00:00
Jonathan Peyton 3d280aa419 [OpenMP][Stats] Fix stats gathering for distribute and team clause
The distribute clause needs an explicit push of a timer. The teams
clause needs a timer added and also, similarly to parallel, exchanged
with the serial timer when encountered so that serial regions are
counted properly.

Differential Revision: https://reviews.llvm.org/D59801


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@357621 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-03 18:53:26 +00:00
Jonathan Peyton 8453ca8594 [OpenMP 5.0] Deprecate nest-var and associated features
Nest-var, OMP_NESTED, omp_set_nested()., and omp_get_nested() have been
deprecated in the 5.0 spec. Initial nesting info is now derived from
OMP_MAX_ACTIVE_LEVELS, OMP_NUM_THREADS, and OMP_PROC_BIND.

This patch deprecates the internal ICV that corresponds to nest-var, and
replaces it with the max-active-levels-var ICV to determine nesting. The
change still allows for use of OMP_NESTED (according to 5.0 changes),
omp_get_nested, and omp_set_nested, which have had deprecation messages
added to them. The change allows certain settings of OMP_NUM_THREADS,
OMP_PROC_BIND, and OMP_MAX_ACTIVE_LEVELS to turn on nesting, but
OMP_NESTED=0 will still force nesting to be off.

The runtime now prints informative messages about deprecation of
OMP_NESTED, omp_set_nested(), and omp_get_nested(), when those
environment variables or routines are used. It also prints deprecated
message in output for KMP_SETTINGS and OMP_DISPLAY_ENV for OMP_NESTED.
This patch also fixes OMP_DISPLAY_ENV output for OMP_TARGET_OFFLOAD.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D58408


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@355138 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-28 20:47:21 +00:00
Jonathan Peyton bbb6f01707 [OpenMP] Make use of sched_yield optional in runtime
This patch cleans up the yielding code and makes it optional. An
environment variable, KMP_USE_YIELD, was added. Yielding is still
on by default (KMP_USE_YIELD=1), but can be turned off completely
(KMP_USE_YIELD=0), or turned on only when oversubscription is detected
(KMP_USE_YIELD=2). Note that oversubscription cannot always be detected
by the runtime (for example, when the runtime is initialized and the
process forks, oversubscription cannot be detected currently over
multiple instances of the runtime).

Because yielding can be controlled by user now, the library mode
settings (from KMP_LIBRARY) for throughput and turnaround have been
adjusted by altering blocktime, unless that was also explicitly set.

In the original code, there were a number of places where a double yield
might have been done under oversubscription. This version checks
oversubscription and if that's not going to yield, then it does
the spin check.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D58148


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@355120 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-28 19:11:29 +00:00
Jonathan Peyton e85e92b0ff [OpenMP] Fix thread_limits to work properly for teams construct
The thread-limit-var and omp_get_thread_limit API was not perfectly handled for
teams construct. Now, when modified by thread_limit clause, omp_get_thread_limit
reports the correct value. In addition, the value is restored when leaving the
teams construct to what it was in the encountering context.

This is done partly by creating the notion of a Contention Group root (CG root)
that keeps track of the thread at the root of each separate CG, the
thread-limit-var associated with the CG, and associated counter of active
threads within the contention group.

thread-limits are passed from master to worker threads via an entry in the ICV
data structure. When a "contention group switch" occurs, a new CG root record is
made and passed from master to worker. A thread could potentially have several
CG root records if it encounters multiple nested teams constructs (but at the
moment the spec doesn't allow for nested teams, so the most one could have
currently is 2). The master of the teams masters gets the thread-limit clause
value stored to its local ICV structure, and the other teams masters copy it
from the master. The thread-limit is set from that ICV copy and restored to the
ICV copy when entering and leaving the teams construct.

This change also fixes a bug when the top-level teams construct team gets
reused, and OMP_DYNAMIC was true, which can cause the expected size of this team
to be smaller than what was actually allocated. The fix updates the size of the
team after its threads were reserved.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D56804


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@353747 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-11 21:04:23 +00:00
Chandler Carruth 7e084d9fdf Update more file headers across all of the LLVM projects in the monorepo
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.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 10:56:40 +00:00
Jonathan Peyton 4338c2574e [OpenMP] Add omp_pause_resource* API
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@351372 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-16 20:07:39 +00:00
Joachim Protze f52d8ccc95 [OMPT] Second chunk of final OMPT 5.0 interface updates
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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@351197 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-15 15:36:53 +00:00
Joachim Protze daa386bb15 [OMPT] First chunk of final OMPT 5.0 interface updates
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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@349458 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-18 08:52:30 +00:00
Jonathan Peyton 0918584865 [OpenMP] Implement OpenMP 5.0 affinity format functionality
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@349089 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-13 23:14:24 +00:00
Jonathan Peyton 9982959fbe [OpenMP] Rename ompt_mutex_impl_unknown to ompt_mutex_impl_none
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@347802 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-28 20:19:53 +00:00
Jonathan Peyton c39393741e [OpenMP] Shutdown library on Windows if possible for better OMPT behavior
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@343619 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-02 19:15:04 +00:00
Joachim Protze 059ad35b23 [OMPT] Update types according to TR7
Some types and callback signatures have changed from TR6 to TR7.
Major changes (only adding signatures and stubs):
(-remove idle callback) done by D48362
-add reduction and dispatch callback
-add get_task_memory and finalize_tool runtime entry points
-ompt_invoker_t  becomes ompt_parallel_flag_t
-more types of sync_regions

Patch provided by Simon Convent

Reviewers: hbae, protze.joachim

Differential Revision: https://reviews.llvm.org/D50774

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@341834 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-10 14:34:54 +00:00
Jonathan Peyton afaf9baa48 [OpenMP] Change hint parameter type for critical to uint32_t
Add atomic hint flags to the enum.
The hint parameter type was changed to uint32_t in __kmpc_critical_with_hint()

Patch by Olga Malysheva

Differential Revision: https://reviews.llvm.org/D51235


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@341694 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 18:46:40 +00:00
Jonathan Peyton d590b1f16e [OpenMP] Initial implementation of OMP 5.0 Memory Management routines
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@341687 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 18:25:49 +00:00
Gheorghe-Teodor Bercea 3e1e7c423b [OpenMP][Fix] Conditional compilation leaves variables unused
Summary: Prevent variables from being left unused by conditional compilation.

Reviewers: ABataev, grokos, Hahnfeld, caomhin, protze.joachim

Reviewed By: Hahnfeld

Subscribers: guansong, openmp-commits

Differential Revision: https://reviews.llvm.org/D51303

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@340771 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 19:54:26 +00:00
Jonathan Peyton 2b9968a2f9 [OpenMP] Cleanup code
This patch cleans up unused functions, variables, sign compare issues, and
addresses some -Warning flags which are now enabled including -Wcast-qual.
Not all the warning flags in LibompHandleFlags.cmake are enabled, but some
are with this patch.

Some __kmp_gtid_from_* macros in kmp.h are switched to static inline functions
which allows us to remove the awkward definition of KMP_DEBUG_ASSERT() and
KMP_ASSERT() macros which used the comma operator. This had to be done for the
innumerable -Wunused-value warnings related to KMP_DEBUG_ASSERT()

Differential Revision: https://reviews.llvm.org/D49105


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@339393 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-09 22:04:30 +00:00
Jonathan Peyton 4aa544bb41 [OpenMP] Implement GOMP doacross compatibility
This change introduces GOMP doacross compatibility. There are 12 new interface
functions 6 for long type and 6 for unsigned long long type:
GOMP_doacross_post, GOMP_doacross_wait, GOMP_loop_doacross_[schedule]_start
where schedule can be static, dynamic, guided, or runtime.

These functions just translate the parameters if necessary and send them
to the corresponding kmp function.
E.g., GOMP_doacross_post() -> __kmpc_doacross_post()

For the GOMP_doacross_post function, there is template specialization to
account for when long is a four byte vs an eight byte type. If it is a
four byte type, then a temporary array has to be created to convert the
four byte integers into eight byte integers and then sending that into
__kmpc_doacross_post(). Because GOMP_doacross_wait uses varargs, it
always needs a temporary array and does not need template specialization.

Differential Revision: https://reviews.llvm.org/D49857


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@338280 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 17:48:33 +00:00
Jonathan Peyton 0d4ae7a6d1 [OpenMP][Stats] Cleanup stats gathering code
1) Remove unnecessary data from list node structure
2) Remove timerPair in favor of pushing/popping explicitTimers.
   This way, nested timers will work properly.
3) Fix #pragma omp critical timers
4) Add histogram capability
5) Add KMP_STATS_FILE formatting capability
6) Have time partitioned into serial & parallel by introducing
   partitionedTimers::exchange(). This also counts the number of serial regions
   in the executable.
7) Fix up the timers around OMP loops so that scheduling overhead and work are
   both counted correctly.
8) Fix up the iterations statistics so they count the number of iterations the
   thread receives at each loop scheduling event
9) Change timers so there is only one RDTSC read per event change
10) Fix up the outdated comments for the timers

Differential Revision: https://reviews.llvm.org/D49699


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@338276 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 17:41:08 +00:00
Jonathan Peyton ab0fc85192 [OpenMP] Use C++11 Atomics - barrier, tasking, and lock code
These are preliminary changes that attempt to use C++11 Atomics in the runtime.
We are expecting better portability with this change across architectures/OSes.
Here is the summary of the changes.

Most variables that need synchronization operation were converted to generic
atomic variables (std::atomic<T>). Variables that are updated with combined CAS
are packed into a single atomic variable, and partial read/write is done
through unpacking/packing

Patch by Hansang Bae

Differential Revision: https://reviews.llvm.org/D47903


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@336563 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09 17:36:22 +00:00
Joachim Protze 16595a2d12 [OMPT] Rename ompt_wait_id to omp_wait_id
Rename ompt_wait_id to omp_wait_id, as defined in the spec.

Differential Revision: https://reviews.llvm.org/D46530

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@333368 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-28 08:16:08 +00:00
Joachim Protze 8b6b3274cb [OMPT] Rename ompt_frame_t to omp_frame_t
Rename ompt_frame_t to omp_frame_t, as defined in the spec.

Differential Revision: https://reviews.llvm.org/D43568

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@333367 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-28 08:14:58 +00:00
Joachim Protze a838d8e95f [OMPT] Fix thread_num for implicit_task_end callbacks in nested parallel regions
implicit_task_end callbacks in nested parallel regions did not always give the
correct thread_num, since the inner parallel region may have already been
finalized.
Now, the thread_num is stored at the beginning of the implicit task and
retrieved at the end, whenever necessary.

A testcase was added as well.

Differential Revision: https://reviews.llvm.org/D46260

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@331632 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-07 12:42:21 +00:00
Andrey Churbanov a033a76d8f Fixed __kmpc_get_target_offload() to call library initialization.
Differential Revision: https://reviews.llvm.org/D44793


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@328228 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-22 18:51:51 +00:00
Jonathan Peyton a2d302c99b Read OMP_TARGET_OFFLOAD and provide API to access ICV
Added settings code to read OMP_TARGET_OFFLOAD environment variable. Added
target-offload-var ICV as __kmp_target_offload, set via OMP_TARGET_OFFLOAD,
if available, otherwise defaulting to DEFAULT. Valid values for the ICV are
specified as enum values {0,1,2} for disabled, default, and mandatory. An
internal API access function __kmpc_get_target_offload is provided.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D44577


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@328046 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-20 21:18:17 +00:00
Joachim Protze fb55b8c10e Partial revert of [OMPT] Rename ompt_mutex_impl_t to kmp_mutex_impl
The previous commit did not revert all replaced ompt_mutex_impl_unknown.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322631 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-17 11:13:11 +00:00
Joachim Protze 59049946c0 [OMPT] Rename ompt_mutex_impl_t to kmp_mutex_impl
The defintion is not part of the spec and thus should not have the prefix
"ompt_" but rather a prefix that indicates that this is implementation
specific.

Differential Revision: https://reviews.llvm.org/D41166

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@322621 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-17 10:06:01 +00:00
Jonas Hahnfeld a58db48c8c Correct types of pointers to doacross_num_done
This field is defined as kmp_int32, so we should use neither
pointers to kmp_int64 nor 64 bit atomic instructions.
(Found while testing on a Raspberry Pi, 32 bit ARM)

Differential Revision: https://reviews.llvm.org/D41656

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321964 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-07 16:54:36 +00:00
Jonas Hahnfeld 3342a84ab0 Fix PR30890: Reduction across teams hangs
__kmpc_reduce_nowait() correctly swapped the teams for reductions
in a teams construct. Apply the same logic to __kmpc_reduce() and
__kmpc_reduce_end().

Differential Revision: https://reviews.llvm.org/D40753

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-05 16:51:24 +00:00
Jonas Hahnfeld 9da031d4d2 Fix for OMP doacross implementation on Power
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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-22 17:15:20 +00:00
Andrey Churbanov 0b53bf7427 Fixed OMP doacross implementation on 32-bit platforms.
Differential Revision: https://reviews.llvm.org/D40171


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@318658 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-20 16:00:42 +00:00
Joachim Protze 50aea48c65 [OMPT] Fix assertion for OpenMP code generated with outdated compilers
For up-to-date compilers, this assertion is reasonable, but it breaks
compatibility with the typical compiler installed on most systems.
This patch changes the default value to what we had when there was no
compiler support. A warning about the outdated compiler is printed during
runtime, when this point is reached.

Differential Revision: https://reviews.llvm.org/D39890

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10 21:07:01 +00:00
Joachim Protze 28671628a4 Rename fields of ompt_frame_t
This is part of the renaming of data types from OpenMP TR4 to TR6

Patch by Simon Convent

Differential Revision: https://reviews.llvm.org/D39326

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317435 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-05 14:11:10 +00:00
Jonas Hahnfeld 74248f8850 Revert "Rename fields of ompt_frame_t"
This reverts commit r317338 which discarded some recent commits.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03 18:28:25 +00:00
Jonas Hahnfeld ac062a9ef1 Revert "Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 (TR6)"
This reverts commit r317339 which discarded some recent commits.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317346 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03 18:28:19 +00:00
Joachim Protze 92e5a1069f Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 (TR6)
The TR6 document is expected to be publically released around November 15.
This patch does not implement OMPT for libomptarget.

Patch by Simon Convent and Joachim Protze

Differential Revision: https://reviews.llvm.org/D39182

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317339 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03 17:09:00 +00:00
Joachim Protze 1d2c9dccb9 Rename fields of ompt_frame_t
This is part of the renaming of data types from OpenMP TR4 to TR6

Patch by Simon Convent

Differential Revision: https://reviews.llvm.org/D39326

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317338 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03 17:08:40 +00:00
Joachim Protze ff9d3f5109 Update implementation of OMPT to the specification OpenMP 5.0 Preview 1 (TR4).
The code is tested to work with latest clang, GNU and Intel compiler. The implementation
is optimized for low overhead when no tool is attached shifting the cost to execution with
tool attached.

This patch does not implement OMPT for libomptarget.

Patch by Simon Convent and Joachim Protze

Differential Revision: https://reviews.llvm.org/D38185

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@317085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01 10:08:30 +00:00
Jonathan Peyton be524d6135 Apply formatting changes
.clang-format's comments are removed and a (hopefully) final
set of formatting changes are applied.

Differential Revision: https://reviews.llvm.org/D38837
Differential Revision: https://reviews.llvm.org/D38920


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@316227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-20 19:30:57 +00:00
Jonathan Peyton 5b33aeb207 Remove unnecessary semicolons
Removes semicolons after if {} blocks, function definitions, etc.
I was able to apply the large OMPT patch cleanly on top of this one
with no conflicts.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@314340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-27 20:36:27 +00:00
Andrey Churbanov b88a01f4ef OpenMP RTL cleanup: eliminated warnings with -Wcast-qual, patch 2.
Changes are: got all atomics to accept volatile pointers that allowed
to simplify many type conversions. Windows specific code fixed correspondingly.

Differential Revision: https://reviews.llvm.org/D35417


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@308164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-17 09:03:14 +00:00
Andrey Churbanov 1c31fdada0 OpenMP RTL cleanup: eliminated warnings with -Wcast-qual.
Changes are: replaced C-style casts with cons_cast and reinterpret_cast;
type of several counters changed to signed; type of parameters of 32-bit and
64-bit AND and OR intrinsics changes to unsigned; changed files formatted
using clang-format version 3.8.1.

Differential Revision: https://reviews.llvm.org/D34759


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@307020 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-03 11:24:08 +00:00
Jonathan Peyton e703e783e7 Clang-format and whitespace cleanup of source code
This patch contains the clang-format and cleanup of the entire code base. Some
of clang-formats changes made the code look worse in places. A best effort was
made to resolve the bulk of these problems, but many remain. Most of the
problems were mangling line-breaks and tabbing of comments.

Patch by Terry Wilmarth

Differential Revision: https://reviews.llvm.org/D32659


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@302929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12 18:01:32 +00:00
Andrey Churbanov 9a49cce023 KMP_HW_SUBSET extended with NUMA support when HWLOC enabled
Differential Revision: https://reviews.llvm.org/D31600


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@300220 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13 17:15:07 +00:00
Andrey Churbanov 8f2e239462 Added an option to bind initial thread at the start of application
via setting envirable KMP_INITIAL_THREAD_BIND=1.

Differential Revision: https://reviews.llvm.org/D29665


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@295339 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 17:08:40 +00:00
Andrey Churbanov dae8e28bec Fix for the __kmpc_global_num_threads function to return the value of the __kmp_all_nth global var.
Patch by Yonghong Yan.

Differential Revision: https://reviews.llvm.org/D27975


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@290272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 21:20:20 +00:00
Jonathan Peyton 4277fc10ad Follow up to r289732: Update comments in source files to reference .cpp files
Patch by Hansang Bae


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@289739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 23:01:24 +00:00