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