33#define mysleep(n) Sleep(n)
36#define mysleep(n) usleep((n)*1000)
53#define DEP_ALL_MEM 0x80
75#pragma omp atomic capture
77 th = omp_get_thread_num();
78 printf(
"task m_%d, th %d, checker %d\n",
ptask->
f_priv, th, lcheck);
81 printf(
"Error m1, checker %d != 1\n", lcheck);
84#pragma omp atomic read
88 printf(
"Error m2, checker %d != 1\n", lcheck);
97#pragma omp atomic capture
99 th = omp_get_thread_num();
100 printf(
"task 2_%d, th %d, checker %d\n",
ptask->
f_priv, th, lcheck);
103 printf(
"Error s1, checker %d != 1\n", lcheck);
106#pragma omp atomic read
110 printf(
"Error s2, checker %d != 1\n", lcheck);
124 dep *dep_lst,
int nd_noalias,
dep *noalias_lst);
125static id loc = {0, 2, 0, 0,
";file;func;0;0;;"};
133 char *ompx_all_memory = (
void *)0xffffffffffffffff;
139#pragma omp single nowait
144 int t = omp_get_thread_num();
145#pragma omp task depend(in : i1, i2)
148#pragma omp atomic capture
150 th = omp_get_thread_num();
151 printf(
"task 0_%d, th %d, checker %d\n", t, th, lcheck);
152 if (lcheck > 2 || lcheck < 1) {
154 printf(
"Error1, checker %d, not 1 or 2\n", lcheck);
157#pragma omp atomic read
159 if (lcheck > 2 || lcheck < 1) {
162 printf(
"Error2, checker %d, not 1 or 2\n", lcheck);
167#pragma omp task depend(in : i1, i2)
170#pragma omp atomic capture
172 th = omp_get_thread_num();
173 printf(
"task 1_%d, th %d, checker %d\n", t, th, lcheck);
174 if (lcheck > 2 || lcheck < 1) {
176 printf(
"Error3, checker %d, not 1 or 2\n", lcheck);
179#pragma omp atomic read
181 if (lcheck > 2 || lcheck < 1) {
183 printf(
"Error4, checker %d, not 1 or 2\n", lcheck);
191 sdep[0].
addr = (size_t)&i1;
194 sdep[1].
addr = (size_t)&i2;
201#pragma omp task depend(in : i1) depend(inout : ompx_all_memory[0])
204#pragma omp atomic capture
206 th = omp_get_thread_num();
207 printf(
"task 3_%d, th %d, checker %d\n", t, th, lcheck);
210 printf(
"Error m1, checker %d != 1\n", lcheck);
213#pragma omp atomic read
217 printf(
"Error m2, checker %d != 1\n", lcheck);
223#pragma omp task depend(in : i1, i2)
226#pragma omp atomic capture
228 th = omp_get_thread_num();
229 printf(
"task 4_%d, th %d, checker %d\n", t, th, lcheck);
230 if (lcheck > 2 || lcheck < 1) {
232 printf(
"Error5, checker %d, not 1 or 2\n", lcheck);
235#pragma omp atomic read
237 if (lcheck > 2 || lcheck < 1) {
239 printf(
"Error6, checker %d, not 1 or 2\n", lcheck);
244#pragma omp task depend(in : i1, i2)
247#pragma omp atomic capture
249 th = omp_get_thread_num();
250 printf(
"task 5_%d, th %d, checker %d\n", t, th, lcheck);
251 if (lcheck > 2 || lcheck < 1) {
253 printf(
"Error7, checker %d, not 1 or 2\n", lcheck);
256#pragma omp atomic read
258 if (lcheck > 2 || lcheck < 1) {
260 printf(
"Error8, checker %d, not 1 or 2\n", lcheck);
266#pragma omp task depend(inout : ompx_all_memory[0])
269#pragma omp atomic capture
271 th = omp_get_thread_num();
272 printf(
"task 6_%d, th %d, checker %d\n", t, th, lcheck);
275 printf(
"Error m1, checker %d != 1\n", lcheck);
278#pragma omp atomic read
282 printf(
"Error m2, checker %d != 1\n", lcheck);
288#pragma omp task depend(inout : ompx_all_memory[0]) depend(mutexinoutset : i3)
291#pragma omp atomic capture
293 th = omp_get_thread_num();
294 printf(
"task 7_%d, th %d, checker %d\n", t, th, lcheck);
297 printf(
"Error m1, checker %d != 1\n", lcheck);
300#pragma omp atomic read
304 printf(
"Error m2, checker %d != 1\n", lcheck);
309#pragma omp task depend(in : i3)
312#pragma omp atomic capture
314 th = omp_get_thread_num();
315 printf(
"task 8_%d, th %d, checker %d\n", t, th, lcheck);
318 printf(
"Error9, checker %d, != 1\n", lcheck);
321#pragma omp atomic read
325 printf(
"Error10, checker %d, != 1\n", lcheck);
336 printf(
"failed, err = %d, checker = %d\n",
err,
checker);
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d int
#define omp_set_num_threads
int thunk_s(int gtid, task_t *ptask)
int(* entry_t)(int, task_t *)
int thunk_m(int gtid, task_t *ptask)
int __kmpc_omp_task_with_deps(id *loc, int gtid, task_t *task, int ndeps, dep *dep_lst, int nd_noalias, dep *noalias_lst)
task_t * __kmpc_omp_task_alloc(id *loc, int gtid, int flags, size_t sz, size_t shar, entry_t rtn)
int __kmpc_global_thread_num(id *)