1 // RUN: %libomp-compile-and-run
4 #include "omp_testsuite.h"
5 #include "omp_my_sleep.h"
16 for (i
= 0; i
< NUM_TASKS
; i
++) {
17 /* First we have to store the value of the loop index in a new variable
18 * which will be private for each task because otherwise it will be overwritten
19 * if the execution of the task takes longer than the time which is needed to
20 * enter the next step of the loop!
27 tids
[myi
] = omp_get_thread_num();
28 } /* end of omp task */
31 } /*end of parallel */
33 /* Now we ckeck if more than one thread executed the tasks. */
34 for (i
= 1; i
< NUM_TASKS
; i
++) {
35 if (tids
[0] != tids
[i
])
39 } /* end of check_parallel_for_private */
46 if (omp_get_max_threads() < 2)
47 omp_set_num_threads(8);
49 for(i
= 0; i
< REPETITIONS
; i
++) {
50 if(!test_omp_task()) {