Commit Graph
57 Commits
Author SHA1 Message Date
Jonas Hahnfeld b00226fdf5 Correct wrong comment in bug_nested_proxy_task.c
The nested proxy task does not have dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@293472 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-30 09:51:02 +00:00
Jonathan Peyton fa45385094 Fix memory error in case of reinit using kmp_set_defaults() for lock code.
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.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@292349 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 07:02:21 +00:00
Jonathan Peyton f82ad7797b Enable omp_get_schedule() to return static steal type.
As the code is now, calling omp_get_schedule() when OMP_SCHEDULE=static_steal
will cause an assert.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@283576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-07 18:01:35 +00:00
Michal Gorny 27bfdc4a3c [test] Support 'lit' executable name
Support finding lit as plain 'lit', which is the name used by setup.py
in LLVM's utils/lit.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@282876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-30 16:56:16 +00:00
Michal Gorny c5fa69cd0b Fix respecting LIBOMP_LLVM_LIT_EXECUTABLE as full path
Fix lit search to correctly respect LIBOMP_LLVM_LIT_EXECUTABLE as full
program path.

The variable passed to find_program() is created by CMake as a cache
variable, and therefore can be directly overriden by the user. Since
this was the design of LIBOMP_LLVM_LIT_EXECUTABLE (as can be deduced
from the error messages) and there is no other use of LIT_EXECUTABLE,
remove the redundant variable and pass LIBOMP_LLVM_LIT_EXECUTABLE
directly to find_program().

Furthermore, the previous code did not work since the HINTS argument
specifies more search directories rather than expected full path.
Quoting the CMake documentation:

> 3. Search the paths specified by the HINTS option. These should be
> paths computed by system introspection, such as a hint provided by
> the location of another item already found. Hard-coded guesses should
> be specified with the PATHS option.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281887 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-19 06:55:56 +00:00
Jonas Hahnfeld 8e30df72a9 [OMPT] fix task frame information for gomp interface
Previous differencials D23305-D23310 changed task frame information management only for the kmp interface, but not for the whole gomp interface. This broke some testcases when building with gcc.
This patch fixes the broken task frame information for the gomp interface.

Patch by Joachim Protze!

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281468 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 13:59:39 +00:00
Jonas Hahnfeld f091351474 [OMPT] save exit address to lwt if available
In case, the current team is a serialized team (lwt), the frame information should be written to this data structure.
Before, nested serialized teams would overwrite the same task information.

Patch by Joachim Protze!

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281467 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 13:59:31 +00:00
Jonas Hahnfeld cd7b29a48d [OMPT] fix __ompt_get_teaminfo to consult lwt entries of parent teams
The comment already states, that this function should work similarly as __ompt_get_taskinfo.

The function only looked for lwt entries of the current team, but not when unrolling the parents. This fix aligns the implementation to __ompt_get_taskinfo.

The new test case creates a single theaded team (->lwt) and then a nested active team.
Before the innermost print_id(1) would deliver a different team then the outer print_id(0).

Patch by Joachim Protze!

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 13:59:24 +00:00
Jonas Hahnfeld 1b9360b367 [OMPT] Reset task exit frame when execution is finished
The exit address is set when execution of a task is started and should be reset as soon as the execution is finished.
Especially for the asm implementation of __kmp_invoke_microtask, resetting in this call would be painfull, so reset just after the invokation.

The testcase shows the effect of this patch:
Before, the implicit barriers at the end of an implicit task would see an exit address for the implicit task.

This barrier is a task scheduling point. Thus, any explicit task scheduled there would see an exit, but no reenter address for the implicit task.

Patch by Joachim Protze!

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 13:59:19 +00:00
Jonas Hahnfeld 4890f69035 [OMPT] Align implementation of reenter frame address to latest (frozen) version of OMPT spec
The latest OMPT spec changed the semantic of a tasks reenter frame to be the application frame, that will be entered, when the runtime frame drops.
Before it was the last frame in the runtime. This doesn't work for some gcc execution pathes or even clang generated code for :
Since there is no runtime frame between the executed task and the encountering task.

The test case compares exit and reenter addresses against addresses captured in application code

Patch by Joachim Protze!

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281464 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 13:59:13 +00:00
Jonas Hahnfeld 75e689d1a6 [OMPT] extend ompt tests by checks for frame pointers
OMPT tests can check for right frame information of tasks:
 * parent_task_frame was directly printed as a pointer, but actually points to a struct ompt_frame {void*, void*}
 * NULL is printed in the beginning of execution and loaded to FileChecker variable [[NULL]]
 * implicit tasks now also print their frame information
 * macro to print frame address from application
 * print task info for barrier begin

Patch by Joachim Protze!

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 13:59:05 +00:00
Jonathan Peyton bd0745e696 Appease older gcc compilers for the many-microtask-args.c test
Older gcc compilers error out with the C99 syntax of: for (int i =...)
so this change just moves the int i; declaration up above.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@280138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 19:28:58 +00:00
Dimitry Andric de1011b67f Fix linking of omp_foreign_thread_team_reuse test on FreeBSD
Summary:
On FreeBSD, linking the misc_bugs/omp_foreign_thread_team_reuse.c test
case fails with:

   /usr/local/bin/ld: /tmp/omp_foreign_thread_team_reuse-c5e71b.o: undefined reference to symbol 'pthread_create@@FBSD_1.0'

This is because the program is linked without `-lpthread`.  Since the
%libomp-compile-and-run macro does not allow that option to be added to
the compile command line, split it up and add the required `-lpthread`
between %libomp-compile and %libomp-run.

Reviewers: jlpeyton, hfinkel, Hahnfeld

Subscribers: Hahnfeld, emaste, openmp-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@278036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08 18:34:05 +00:00
Jonas Hahnfeld 5c3fd1d828 kmp_gsupport: Fix library initialization with taskgroup
Differential Revision: https://reviews.llvm.org/D23259

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@278003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08 13:23:08 +00:00
Jonas Hahnfeld b5f8854970 Mark tests with task dependencies as unsupported with GCC
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@277996 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08 11:52:49 +00:00
Jonas Hahnfeld a86e0bab74 Do not block on explicit task depending on proxy task
Consider the following code:

    int dep;
    #pragma omp target nowait depend(out: dep)
    {
        sleep(1);
    }
    #pragma omp task depend(in: dep)
    {
        printf("Task with dependency\n");
    }
    printf("Doing some work...\n");

In its current state the runtime will block on the second task and not
continue execution.

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@277992 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08 10:08:14 +00:00
Jonas Hahnfeld d9ae211c7d __kmp_free_task: Fix for serial explicit tasks producing proxy tasks
Consider the following code which may be executed by a serial team:

    int dep;
    #pragma omp target nowait depend(out: dep)
    {
        sleep(1);
    }
    #pragma omp task depend(in: dep)
    {
        #pragma omp target nowait
        {
            sleep(1);
        }
    }

Here the explicit task may not be freed until the nested proxy task has
finished. The current code hasn't considered this and called __kmp_free_task
anyway which triggered an assert because of remaining incomplete children:

    KMP_DEBUG_ASSERT( TCR_4(taskdata->td_incomplete_child_tasks) == 0 );

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@277991 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08 10:08:07 +00:00
Jonas Hahnfeld 03a057fa63 Add test case for nested creation of tasks
For discussion in D23115

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@277730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 14:55:56 +00:00
Jonathan Peyton d72ef36ee0 Fix the nowait tests for omp for and omp single
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.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-06 17:26:12 +00:00
Jonathan Peyton 5afb0c9897 Fix omp_sections_nowait.c test to address Bugzilla Bug 28336
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29 19:46:52 +00:00
Jonathan Peyton f01e27f138 Fix bugs in TAS and futex lock
* Incorrect lock value written in __kmp_test_futex_lock
* Incorrect lock value check in tas/futex lock with USE_LOCK_PROFILE on

Patch by Hansang Bae


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@274053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28 19:37:24 +00:00
Jonathan Peyton 153bf3fb97 Remove redundant %libomp-compile step from test/lock/omp_lock.c
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 16:18:59 +00:00
Jonathan Peyton e402afb408 Apply the KMP_USE_FUTEX feature macro everywhere
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 16:35:12 +00:00
Jonathan Peyton 5fda24f1d2 Bug fix for hang when tasks used in nested parallel
Bug fix for hang when omp task and nested parallelism used together.
Still some problem remains with task state saving/restoring, but
user's case works fine now. All tasking unit tests passed as well.

Patch by Andrey Churbanov

Differential Revision: http://reviews.llvm.org/D21558


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@273297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21 19:12:07 +00:00
Jonathan Peyton 56168b3a23 Revert accidental commit to lit.cfg
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 18:29:36 +00:00
Jonathan Peyton 93153d271f Refactor __kmp_execute_tasks_template function
Refactored __kmp_execute_tasks_template to shorten and remove code redundancy.
The original code for __kmp_execute_tasks_template was very redundant with
large sections of repeated code that needed to be kept consistent, and goto
statements that made the control flow difficult to discern. This refactoring
removes all gotos and redundancy.

Patch by Terry Wilmarth

Differential Revision: http://reviews.llvm.org/D20879


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@272286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 18:27:03 +00:00
Jonathan Peyton ce32bac98c Offer API for setting number of loop dispatch buffers
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@271318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 19:01:15 +00:00
Hal Finkel fea1a1cd1a Add a test case for microtask dispatch with many arguments
This is a cleaned-up version of the test case posted in the D19879 review.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@270867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26 16:34:05 +00:00
Jonathan Peyton 531ce2ade7 Allow unit testing on Windows
These changes allow testing on Windows using clang.exe.
There are two main changes:
1. Only link to -lm when it actually exists on the system
2. Create basic versions of pthread_create() and pthread_join() for windows.
   They are not POSIX compliant by any stretch but will allow any existing
   and future tests to use pthread_create() and pthread_join() for testing
   interactions of libomp with os threads.

Differential Revision: http://reviews.llvm.org/D20391


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@270464 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 17:50:32 +00:00
Jonathan Peyton f7f0293db9 Remove unnecessary unistd.h header from tests.
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@269987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 21:36:34 +00:00
Jonathan Peyton fcef12cd45 Remove trailing whitespace from tests
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@269841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:08:52 +00:00
Jonathan Peyton 9c0b306f7d [OpenMP Testing] Have lit.py be a valid lit executable
Users can use either llvm-lit (generated during llvm build) or lit.py which
exists in llvm/utils/lit.


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@269774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 15:12:11 +00:00
Jonathan Peyton 700a1a0f37 Adding new kmp_aligned_malloc() entry point
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@269365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 22:00:37 +00:00
Jonathan Peyton e0719d4bb6 Fix team reuse with foreign threads
After hot teams were enabled by default, the library started using levels kept
in the team structure. The levels are broken in case foreign thread exits and
puts its team into the pool which is then re-used by another foreign thread.
The broken behavior observed is when printing the levels for each new team, one
gets 1, 2, 1, 2, 1, 2, etc. This makes the library believe that every other
team is nested which is incorrect. What is wanted is for the levels to be
1, 1, 1, etc.

Differential Revision: http://reviews.llvm.org/D19980


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@269363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 21:54:30 +00:00
Jonathan Peyton 56dc65916c Fix trip count calculation for parallel loops in runtime
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


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@266677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 21:38:29 +00:00
Jonathan Peyton be019e9440 Exponential back off logic for test-and-set lock
This change adds back off logic in the test and set lock for better contended
lock performance. It uses a simple truncated binary exponential back off
function. The default back off parameters are tuned for x86.

The main back off logic has a two loop structure where each is controlled by a
user-level parameter:
max_backoff - limits the outer loop number of iterations.
    This parameter should be a power of 2.
min_ticks - the inner spin wait loop number of "ticks" which is system
    dependent and should be tuned for your system if you so choose.
    The "ticks" on x86 correspond to the time stamp counter,
    but on other architectures ticks is a timestamp derived
    from gettimeofday().

The user can modify these via the environment variable:
KMP_SPIN_BACKOFF_PARAMS=max_backoff[,min_ticks]
Currently, since the default user lock is a queuing lock,
one would have to also specify KMP_LOCK_KIND=tas to use the test-and-set locks.

Differential Revision: http://reviews.llvm.org/D19020


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@266329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14 16:00:37 +00:00
Jonathan Peyton 84ea928f38 OMP_WAIT_POLICY changes
This change has OMP_WAIT_POLICY=active to mean that threads will busy-wait in
spin loops and virtually never go to sleep. OMP_WAIT_POLICY=passive now means
that threads will immediately go to sleep inside a spin loop. KMP_BLOCKTIME was
the previous mechanism to specify this behavior via KMP_BLOCKTIME=0 or
KMP_BLOCKTIME=infinite, but the standard OpenMP environment variable should
also be able to specify this behavior.

Differential Revision: http://reviews.llvm.org/D18577


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@265339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-04 19:38:32 +00:00
Jonas Hahnfeld 3bcc68623b [OMPT] Fix parallel_id and task_id in loop_end with schedule static
For serialized parallel regions, wrong ids were reported. Now the same code is
used as in kmp_dispatch.cpp which emits the correct ids.

Differential Revision: http://reviews.llvm.org/D18348

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@264266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 12:52:20 +00:00
Jonas Hahnfeld 014497155a [OMPT] Test ids reported by ompt_get_{parallel,task}_id
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@264265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 12:52:11 +00:00
Jonas Hahnfeld 0dd34acf87 [OMPT] Fix duplicate implicit_task_end events for master thread with GCC
For non-serialized parallel regions the master thread issued two callbacks:
The first one in kmp_gsupport.c and the second in __kmp_join_call. Therefore
only trigger the callback in kmp_gsupport.c for serialized parallel regions.

Differential Revision: http://reviews.llvm.org/D16716

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@264264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 12:52:04 +00:00
Jonas Hahnfeld 55582d0683 [OMPT] Make tests require OMPT_BLAME
ompt_event_barrier_{begin,end} are optional blame events.
In total it doesn't make any sense to test partially built OMPT support.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@264031 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 08:23:24 +00:00
Jonas Hahnfeld 569d1e46d8 [OMPT] Create infrastructure and add first tests for OMPT
Some basic checks next to the implementation should futher lower the
possibility to introduce regressions. (Note that this would have catched
the ordering issue fixed in rL258866 and pointed to rL263940.)

The tests are implementation dependent in one point because they assume that
thread ids are assigned in ascending order. This is not defined by the standard
but currently ensured in libomp. We have to think about another way of ordering
the threads should this ever be subject to change...

Note that this isn't aiming at replacing the implementation independent
test-suite at https://github.com/OpenMPToolsInterface/ompt-test-suite!

Differential Revision: http://reviews.llvm.org/D16715

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@264027 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 07:22:49 +00:00
Jonathan Peyton ad1775a1cf Add new OpenMP 4.5 taskloop construct feature
From the standard: The taskloop construct specifies that the iterations of one
or more associated loops will be executed in parallel using OpenMP tasks. The
iterations are distributed across tasks created by the construct and scheduled
to be executed.

This initial implementation uses a simple linear tasks distribution algorithm.
Later we can add other algorithms to speedup generation of huge number of tasks
(i.e., tree-like tasks generation should be faster).

This needs to be put into the OpenMP runtime library in order for the
compiler team to develop the compiler side of the implementation.

Differential Revision: http://reviews.llvm.org/D17404


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@262535 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 22:47:51 +00:00
Jonathan Peyton 1588c74337 Forgot to add test files for doacross and task priority.
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@262533 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 22:43:14 +00:00
Jonathan Peyton c62c0fa658 Add initial support for OpenMP 4.5 task priority feature
The maximum task priority value is read from envirable: OMP_MAX_TASK_PRIORITY.
But as of now, nothing is done with it.  We just handle the environment variable
and add the new api: omp_get_max_task_priority() which returns that value or
zero if it is not set.

Differential Revision: http://reviews.llvm.org/D17411


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@261908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 18:04:09 +00:00
Jonas Hahnfeld db9f0656a6 [CMake] Introduce OPENMP_LLVM_TOOLS_DIR
This will be used in a later patch to find additional LLVM tools for tests and
enables reusability for libomptarget that is currently under review.

Differential Revision: http://reviews.llvm.org/D16713

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@259876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 07:00:13 +00:00
Andrey Churbanov 86a6c9071f omp_barrier.c test fixed in order to reliably and faster run on any number of processors
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@258695 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 16:52:10 +00:00
Hans Wennborg 940dd50273 lit.cfg: Pass -isysroot to the SDK on Darwin
Newly-built Clangs don't automatically find the SDK, and newer versions
of Mac OS X don't provide it under /usr/include etc.

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@258169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:26:43 +00:00
Andrey Churbanov c77957295e test omp_threadprivate_for.c fixed
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@256473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-27 18:14:40 +00:00
Jonathan Peyton 8d8e4657d1 Adding Hwloc library option for affinity mechanism
These changes allow libhwloc to be used as the topology discovery/affinity
mechanism for libomp.  It is supported on Unices. The code additions:
* Canonicalize KMP_CPU_* interface macros so bitmask operations are
  implementation independent and work with both hwloc bitmaps and libomp
  bitmaps.  So there are new KMP_CPU_ALLOC_* and KMP_CPU_ITERATE() macros and
  the like. These are all in kmp.h and appropriately placed.
* Hwloc topology discovery code in kmp_affinity.cpp. This uses the hwloc
  interface to create a libomp address2os object which the rest of libomp knows
  how to handle already.
* To build, use -DLIBOMP_USE_HWLOC=on and
  -DLIBOMP_HWLOC_INSTALL_DIR=/path/to/install/dir [default /usr/local]. If CMake
  can't find the library or hwloc.h, then it will tell you and exit.

Differential Revision: http://reviews.llvm.org/D13991


git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@254320 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 20:02:59 +00:00