File: acc-routine.f90

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (136 lines) | stat: -rw-r--r-- 5,013 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
! RUN: %python %S/../test_errors.py %s %flang -fopenacc

subroutine sub1(a)
 real, dimension(10) :: a
end subroutine

subroutine sub2(a)
  !$acc routine(sub1) gang(dim:1)
  real, dimension(10) :: a
  call sub1(a)
end subroutine

subroutine sub3()
  !$acc routine bind(sub1)
end subroutine

subroutine sub4()
  !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive
  !$acc routine gang(num: 1)
end subroutine

subroutine sub5()
  !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive
  !$acc routine gang(static: 1)
end subroutine

subroutine sub6()
  !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang gang

  !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker gang

  !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector gang

  !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq gang

  !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker worker

  !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang worker

  !ERROR: Clause WORKER is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector worker

  !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq worker

  !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector vector

  !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang vector

  !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker vector

  !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq vector

  !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq seq

  !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang seq

  !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker seq

  !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector seq

end subroutine

subroutine sub7()
  !$acc routine device_type(*) gang device_type(host) worker

  !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine device_type(*) gang seq

  !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine device_type(*) gang worker

  !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang device_type(*) gang

  !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang device_type(*) worker

  !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang device_type(*) vector

  !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive
  !$acc routine gang device_type(*) seq

  !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker device_type(*) worker

  !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker device_type(*) gang

  !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker device_type(*) vector

  !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive
  !$acc routine worker device_type(*) seq

  !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector device_type(*) vector

  !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector device_type(*) gang

  !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector device_type(*) vector

  !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive
  !$acc routine vector device_type(*) seq

  !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq device_type(*) seq

  !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq device_type(*) gang

  !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq device_type(*) vector

  !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive
  !$acc routine seq device_type(*) worker

  !$acc routine device_type(host) seq device_type(nvidia) gang device_type(multicore) vector device_type(*) worker
end subroutine