blob: 3a1956ef10db5aed1c85907e12c0f0ad57a71a9a [file] [log] [blame]
Tim Keith99aa87a2020-05-11 18:38:531! RUN: %S/test_errors.sh %s %t %f18 -fopenmp
David Truby75c31052020-04-09 17:54:282
3program main
4 implicit none
5 integer :: N
6 integer :: i
7 real(8) :: a(256), b(256)
8 N = 256
9
10 !$omp distribute simd
11 do i = 1, N
12 a(i) = 3.14
13 enddo
14 !$omp end distribute simd
15
16 !$omp target parallel device(0)
17 do i = 1, N
18 a(i) = 3.14
19 enddo
20 !$omp end target parallel
21
22 !ERROR: At most one DEVICE clause can appear on the TARGET PARALLEL directive
23 !$omp target parallel device(0) device(1)
24 do i = 1, N
25 a(i) = 3.14
26 enddo
27 !$omp end target parallel
28
29 !$omp target parallel defaultmap(tofrom:scalar)
30 do i = 1, N
31 a(i) = 3.14
32 enddo
33 !$omp end target parallel
34
35 !ERROR: The argument TOFROM:SCALAR must be specified on the DEFAULTMAP clause
36 !$omp target parallel defaultmap(tofrom)
37 do i = 1, N
38 a(i) = 3.14
39 enddo
40 !$omp end target parallel
41
42 !ERROR: At most one DEFAULTMAP clause can appear on the TARGET PARALLEL directive
43 !$omp target parallel defaultmap(tofrom:scalar) defaultmap(tofrom:scalar)
44 do i = 1, N
45 a(i) = 3.14
46 enddo
47 !$omp end target parallel
48
49 !$omp target parallel map(tofrom:a)
50 do i = 1, N
51 a(i) = 3.14
52 enddo
53 !$omp end target parallel
54
55 !ERROR: COPYIN clause is not allowed on the TARGET PARALLEL directive
56 !$omp target parallel copyin(a)
57 do i = 1, N
58 a(i) = 3.14
59 enddo
60 !$omp end target parallel
61
62 !$omp target parallel do device(0)
63 do i = 1, N
64 a(i) = 3.14
65 enddo
66 !$omp end target parallel do
67
68 !ERROR: At most one DEVICE clause can appear on the TARGET PARALLEL DO directive
69 !$omp target parallel do device(0) device(1)
70 do i = 1, N
71 a(i) = 3.14
72 enddo
73 !$omp end target parallel do
74
75 !$omp target parallel do defaultmap(tofrom:scalar)
76 do i = 1, N
77 a(i) = 3.14
78 enddo
79 !$omp end target parallel do
80
81 !ERROR: The argument TOFROM:SCALAR must be specified on the DEFAULTMAP clause
82 !$omp target parallel do defaultmap(tofrom)
83 do i = 1, N
84 a(i) = 3.14
85 enddo
86 !$omp end target parallel do
87
88 !ERROR: At most one DEFAULTMAP clause can appear on the TARGET PARALLEL DO directive
89 !$omp target parallel do defaultmap(tofrom:scalar) defaultmap(tofrom:scalar)
90 do i = 1, N
91 a(i) = 3.14
92 enddo
93 !$omp end target parallel do
94
95 !$omp target parallel do map(tofrom:a)
96 do i = 1, N
97 a(i) = 3.14
98 enddo
99 !$omp end target parallel do
100
101 !$omp target parallel do copyin(a)
102 do i = 1, N
103 a(i) = 3.14
104 enddo
105 !$omp end target parallel do
106
107 !$omp target teams map(a)
108 do i = 1, N
109 a(i) = 3.14
110 enddo
111 !$omp end target teams
112
113 !$omp target teams device(0)
114 do i = 1, N
115 a(i) = 3.14
116 enddo
117 !$omp end target teams
118
119 !ERROR: At most one DEVICE clause can appear on the TARGET TEAMS directive
120 !$omp target teams device(0) device(1)
121 do i = 1, N
122 a(i) = 3.14
123 enddo
124 !$omp end target teams
125
126 !ERROR: SCHEDULE clause is not allowed on the TARGET TEAMS directive
127 !$omp target teams schedule(static)
128 do i = 1, N
129 a(i) = 3.14
130 enddo
131 !$omp end target teams
132
133 !$omp target teams defaultmap(tofrom:scalar)
134 do i = 1, N
135 a(i) = 3.14
136 enddo
137 !$omp end target teams
138
139 !ERROR: The argument TOFROM:SCALAR must be specified on the DEFAULTMAP clause
140 !$omp target teams defaultmap(tofrom)
141 do i = 1, N
142 a(i) = 3.14
143 enddo
144 !$omp end target teams
145
146 !ERROR: At most one DEFAULTMAP clause can appear on the TARGET TEAMS directive
147 !$omp target teams defaultmap(tofrom:scalar) defaultmap(tofrom:scalar)
148 do i = 1, N
149 a(i) = 3.14
150 enddo
151 !$omp end target teams
152
153 !$omp target teams num_teams(3) thread_limit(10) default(shared) private(i) shared(a)
154 do i = 1, N
155 a(i) = 3.14
156 enddo
157 !$omp end target teams
158
159 !ERROR: At most one NUM_TEAMS clause can appear on the TARGET TEAMS directive
160 !$omp target teams num_teams(2) num_teams(3)
161 do i = 1, N
162 a(i) = 3.14
163 enddo
164 !$omp end target teams
165
166 !ERROR: The parameter of the NUM_TEAMS clause must be a positive integer expression
167 !$omp target teams num_teams(-1)
168 do i = 1, N
169 a(i) = 3.14
170 enddo
171 !$omp end target teams
172
173 !ERROR: At most one THREAD_LIMIT clause can appear on the TARGET TEAMS directive
174 !$omp target teams thread_limit(2) thread_limit(3)
175 do i = 1, N
176 a(i) = 3.14
177 enddo
178 !$omp end target teams
179
180 !ERROR: The parameter of the THREAD_LIMIT clause must be a positive integer expression
181 !$omp target teams thread_limit(-1)
182 do i = 1, N
183 a(i) = 3.14
184 enddo
185 !$omp end target teams
186
187 !ERROR: At most one DEFAULT clause can appear on the TARGET TEAMS directive
188 !$omp target teams default(shared) default(private)
189 do i = 1, N
190 a(i) = 3.14
191 enddo
192 !$omp end target teams
193
194 !$omp target teams num_teams(2) defaultmap(tofrom:scalar)
195 do i = 1, N
196 a(i) = 3.14
197 enddo
198 !$omp end target teams
199
200 !$omp target teams map(tofrom:a)
201 do i = 1, N
202 a(i) = 3.14
203 enddo
204 !$omp end target teams
205
206 !ERROR: Only the TO, FROM, TOFROM, or ALLOC map types are permitted for MAP clauses on the TARGET TEAMS directive
207 !$omp target teams map(delete:a)
208 do i = 1, N
209 a(i) = 3.14
210 enddo
211 !$omp end target teams
212
213
214 !$omp target teams distribute map(a)
215 do i = 1, N
216 a(i) = 3.14
217 enddo
218 !$omp end target teams distribute
219
220 !$omp target teams distribute device(0)
221 do i = 1, N
222 a(i) = 3.14
223 enddo
224 !$omp end target teams distribute
225
226 !ERROR: At most one DEVICE clause can appear on the TARGET TEAMS DISTRIBUTE directive
227 !$omp target teams distribute device(0) device(1)
228 do i = 1, N
229 a(i) = 3.14
230 enddo
231 !$omp end target teams distribute
232
233 !$omp target teams distribute defaultmap(tofrom:scalar)
234 do i = 1, N
235 a(i) = 3.14
236 enddo
237 !$omp end target teams distribute
238
239 !ERROR: The argument TOFROM:SCALAR must be specified on the DEFAULTMAP clause
240 !$omp target teams distribute defaultmap(tofrom)
241 do i = 1, N
242 a(i) = 3.14
243 enddo
244 !$omp end target teams distribute
245
246 !ERROR: At most one DEFAULTMAP clause can appear on the TARGET TEAMS DISTRIBUTE directive
247 !$omp target teams distribute defaultmap(tofrom:scalar) defaultmap(tofrom:scalar)
248 do i = 1, N
249 a(i) = 3.14
250 enddo
251 !$omp end target teams distribute
252
253 !$omp target teams distribute num_teams(3) thread_limit(10) default(shared) private(i) shared(a)
254 do i = 1, N
255 a(i) = 3.14
256 enddo
257 !$omp end target teams distribute
258
259 !ERROR: At most one NUM_TEAMS clause can appear on the TARGET TEAMS DISTRIBUTE directive
260 !$omp target teams distribute num_teams(2) num_teams(3)
261 do i = 1, N
262 a(i) = 3.14
263 enddo
264 !$omp end target teams distribute
265
266 !ERROR: The parameter of the NUM_TEAMS clause must be a positive integer expression
267 !$omp target teams distribute num_teams(-1)
268 do i = 1, N
269 a(i) = 3.14
270 enddo
271 !$omp end target teams distribute
272
273 !ERROR: At most one THREAD_LIMIT clause can appear on the TARGET TEAMS DISTRIBUTE directive
274 !$omp target teams distribute thread_limit(2) thread_limit(3)
275 do i = 1, N
276 a(i) = 3.14
277 enddo
278 !$omp end target teams distribute
279
280 !ERROR: The parameter of the THREAD_LIMIT clause must be a positive integer expression
281 !$omp target teams distribute thread_limit(-1)
282 do i = 1, N
283 a(i) = 3.14
284 enddo
285 !$omp end target teams distribute
286
287 !ERROR: At most one DEFAULT clause can appear on the TARGET TEAMS DISTRIBUTE directive
288 !$omp target teams distribute default(shared) default(private)
289 do i = 1, N
290 a(i) = 3.14
291 enddo
292 !$omp end target teams distribute
293
294 !$omp target teams distribute num_teams(2) defaultmap(tofrom:scalar)
295 do i = 1, N
296 a(i) = 3.14
297 enddo
298 !$omp end target teams distribute
299
300 !$omp target teams distribute map(tofrom:a)
301 do i = 1, N
302 a(i) = 3.14
303 enddo
304 !$omp end target teams distribute
305
306 !ERROR: Only the TO, FROM, TOFROM, or ALLOC map types are permitted for MAP clauses on the TARGET TEAMS DISTRIBUTE directive
307 !$omp target teams distribute map(delete:a)
308 do i = 1, N
309 a(i) = 3.14
310 enddo
311 !$omp end target teams distribute
312
313 !$omp target teams distribute parallel do device(0)
314 do i = 1, N
315 a(i) = 3.14
316 enddo
317 !$omp end target teams distribute parallel do
318
319 !ERROR: At most one DEVICE clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO directive
320 !$omp target teams distribute parallel do device(0) device(1)
321 do i = 1, N
322 a(i) = 3.14
323 enddo
324 !$omp end target teams distribute parallel do
325
326 !$omp target teams distribute parallel do defaultmap(tofrom:scalar)
327 do i = 1, N
328 a(i) = 3.14
329 enddo
330 !$omp end target teams distribute parallel do
331
332 !ERROR: The argument TOFROM:SCALAR must be specified on the DEFAULTMAP clause
333 !$omp target teams distribute parallel do defaultmap(tofrom)
334 do i = 1, N
335 a(i) = 3.14
336 enddo
337 !$omp end target teams distribute parallel do
338
339 !ERROR: At most one DEFAULTMAP clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO directive
340 !$omp target teams distribute parallel do defaultmap(tofrom:scalar) defaultmap(tofrom:scalar)
341 do i = 1, N
342 a(i) = 3.14
343 enddo
344 !$omp end target teams distribute parallel do
345
346 !$omp target teams distribute parallel do num_teams(3) thread_limit(10) default(shared) private(i) shared(a)
347 do i = 1, N
348 a(i) = 3.14
349 enddo
350 !$omp end target teams distribute parallel do
351
352 !ERROR: At most one NUM_TEAMS clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO directive
353 !$omp target teams distribute parallel do num_teams(2) num_teams(3)
354 do i = 1, N
355 a(i) = 3.14
356 enddo
357 !$omp end target teams distribute parallel do
358
359 !ERROR: The parameter of the NUM_TEAMS clause must be a positive integer expression
360 !$omp target teams distribute parallel do num_teams(-1)
361 do i = 1, N
362 a(i) = 3.14
363 enddo
364 !$omp end target teams distribute parallel do
365
366 !ERROR: At most one THREAD_LIMIT clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO directive
367 !$omp target teams distribute parallel do thread_limit(2) thread_limit(3)
368 do i = 1, N
369 a(i) = 3.14
370 enddo
371 !$omp end target teams distribute parallel do
372
373 !ERROR: The parameter of the THREAD_LIMIT clause must be a positive integer expression
374 !$omp target teams distribute parallel do thread_limit(-1)
375 do i = 1, N
376 a(i) = 3.14
377 enddo
378 !$omp end target teams distribute parallel do
379
380 !ERROR: At most one DEFAULT clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO directive
381 !$omp target teams distribute parallel do default(shared) default(private)
382 do i = 1, N
383 a(i) = 3.14
384 enddo
385 !$omp end target teams distribute parallel do
386
387 !$omp target teams distribute parallel do num_teams(2) defaultmap(tofrom:scalar)
388 do i = 1, N
389 a(i) = 3.14
390 enddo
391 !$omp end target teams distribute parallel do
392
393 !$omp target teams distribute parallel do map(tofrom:a)
394 do i = 1, N
395 a(i) = 3.14
396 enddo
397 !$omp end target teams distribute parallel do
398
399 !ERROR: Only the TO, FROM, TOFROM, or ALLOC map types are permitted for MAP clauses on the TARGET TEAMS DISTRIBUTE PARALLEL DO directive
400 !$omp target teams distribute parallel do map(delete:a)
401 do i = 1, N
402 a(i) = 3.14
403 enddo
404 !$omp end target teams distribute parallel do
405
406
407 !$omp target teams distribute parallel do simd map(a)
408 do i = 1, N
409 a(i) = 3.14
410 enddo
411 !$omp end target teams distribute parallel do simd
412
413 !$omp target teams distribute parallel do simd device(0)
414 do i = 1, N
415 a(i) = 3.14
416 enddo
417 !$omp end target teams distribute parallel do simd
418
419 !ERROR: At most one DEVICE clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive
420 !$omp target teams distribute parallel do simd device(0) device(1)
421 do i = 1, N
422 a(i) = 3.14
423 enddo
424 !$omp end target teams distribute parallel do simd
425
426 !$omp target teams distribute parallel do simd defaultmap(tofrom:scalar)
427 do i = 1, N
428 a(i) = 3.14
429 enddo
430 !$omp end target teams distribute parallel do simd
431
432 !ERROR: The argument TOFROM:SCALAR must be specified on the DEFAULTMAP clause
433 !$omp target teams distribute parallel do simd defaultmap(tofrom)
434 do i = 1, N
435 a(i) = 3.14
436 enddo
437 !$omp end target teams distribute parallel do simd
438
439 !ERROR: At most one DEFAULTMAP clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive
440 !$omp target teams distribute parallel do simd defaultmap(tofrom:scalar) defaultmap(tofrom:scalar)
441 do i = 1, N
442 a(i) = 3.14
443 enddo
444 !$omp end target teams distribute parallel do simd
445
446 !$omp target teams distribute parallel do simd num_teams(3) thread_limit(10) default(shared) private(i) shared(a)
447 do i = 1, N
448 a(i) = 3.14
449 enddo
450 !$omp end target teams distribute parallel do simd
451
452 !ERROR: At most one NUM_TEAMS clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive
453 !$omp target teams distribute parallel do simd num_teams(2) num_teams(3)
454 do i = 1, N
455 a(i) = 3.14
456 enddo
457 !$omp end target teams distribute parallel do simd
458
459 !ERROR: The parameter of the NUM_TEAMS clause must be a positive integer expression
460 !$omp target teams distribute parallel do simd num_teams(-1)
461 do i = 1, N
462 a(i) = 3.14
463 enddo
464 !$omp end target teams distribute parallel do simd
465
466 !ERROR: At most one THREAD_LIMIT clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive
467 !$omp target teams distribute parallel do simd thread_limit(2) thread_limit(3)
468 do i = 1, N
469 a(i) = 3.14
470 enddo
471 !$omp end target teams distribute parallel do simd
472
473 !ERROR: The parameter of the THREAD_LIMIT clause must be a positive integer expression
474 !$omp target teams distribute parallel do simd thread_limit(-1)
475 do i = 1, N
476 a(i) = 3.14
477 enddo
478 !$omp end target teams distribute parallel do simd
479
480 !ERROR: At most one DEFAULT clause can appear on the TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive
481 !$omp target teams distribute parallel do simd default(shared) default(private)
482 do i = 1, N
483 a(i) = 3.14
484 enddo
485 !$omp end target teams distribute parallel do simd
486
487 !$omp target teams distribute parallel do simd num_teams(2) defaultmap(tofrom:scalar)
488 do i = 1, N
489 a(i) = 3.14
490 enddo
491 !$omp end target teams distribute parallel do simd
492
493 !$omp target teams distribute parallel do simd map(tofrom:a)
494 do i = 1, N
495 a(i) = 3.14
496 enddo
497 !$omp end target teams distribute parallel do simd
498
499 !ERROR: Only the TO, FROM, TOFROM, or ALLOC map types are permitted for MAP clauses on the TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive
500 !$omp target teams distribute parallel do simd map(delete:a)
501 do i = 1, N
502 a(i) = 3.14
503 enddo
504 !$omp end target teams distribute parallel do simd
505
506
507end program main
508