3 ! { dg-additional-options "-fopt-info-note-omp" }
4 ! { dg-additional-options "-foffload=-fopt-info-note-omp" }
6 ! { dg-additional-options "--param=openacc-privatization=noisy" }
7 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
9 ! { dg-additional-options "-Wuninitialized" }
12 ! { dg-xfail-run-if TODO { openacc_radeon_accel_selected && { ! __OPTIMIZE__ } } }
14 ! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName'
15 ! passed to 'incr' may be unset, and in that case, it will be set to [...]",
16 ! so to maintain compatibility with earlier Tcl releases, we manually
17 ! initialize counter variables:
18 ! { dg-line l_dummy[variable c_loop 0] }
19 ! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid
20 ! "WARNING: dg-line var l_dummy defined, but not used". */
26 real :: res(65536), tmp
31 call gangs(myint
, res
)
35 if (res(i
) .ne
. tmp
) stop 1
41 call workers(myint
, res
)
45 if (res(i
) .ne
. tmp
) stop 2
51 call vectors(myint
, res
)
55 if (res(i
) .ne
. tmp
) stop 3
61 call gangs_workers_vectors(myint
, res
)
65 if (res(i
) .ne
. tmp
) stop 4
70 subroutine gangs(t1
, res
)
74 real, intent(out
) :: res(:)
76 !$acc parallel copyout(res) num_gangs(64)
78 !$acc loop collapse(2) gang private(t1) ! { dg-line l_loop[incr c_loop] }
79 ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
80 ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
81 ! { dg-note {variable 't1' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
84 t1
= (i
* 256 + j
) * 97
92 subroutine workers(t1
, res
)
96 real, intent(out
) :: res(:)
98 !$acc parallel copyout(res) num_gangs(64) num_workers(64)
99 ! { dg-warning "using .num_workers \\(32\\)., ignoring 64" "" { target openacc_nvidia_accel_selected } .-1 }
101 !$acc loop gang ! { dg-line l_loop[incr c_loop] }
102 ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
104 !$acc loop worker private(t1) ! { dg-line l_loop[incr c_loop] }
105 ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
106 ! { dg-note {variable 't1' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
108 t1
= (i
* 256 + j
) * 99
109 res(i
* 256 + j
) = t1
114 end subroutine workers
116 subroutine vectors(t1
, res
)
120 real, intent(out
) :: res(:)
122 !$acc parallel copyout(res) num_gangs(64) num_workers(64)
123 ! { dg-warning "using .num_workers \\(32\\)., ignoring 64" "" { target openacc_nvidia_accel_selected } .-1 }
125 !$acc loop gang worker ! { dg-line l_loop[incr c_loop] }
126 ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
128 !$acc loop vector private(t1) ! { dg-line l_loop[incr c_loop] }
129 ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
130 ! { dg-note {variable 't1' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
132 t1
= (i
* 256 + j
) * 101
133 res(i
* 256 + j
) = t1
138 end subroutine vectors
140 subroutine gangs_workers_vectors(t1
, res
)
144 real, intent(out
) :: res(:)
146 !$acc parallel copyout(res) num_gangs(64) num_workers(64)
147 ! { dg-warning "using .num_workers \\(32\\)., ignoring 64" "" { target openacc_nvidia_accel_selected } .-1 }
149 !$acc loop collapse(2) gang worker vector private(t1) ! { dg-line l_loop[incr c_loop] }
150 ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
151 ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
152 ! { dg-note {variable 't1' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_loop$c_loop }
155 t1
= (i
* 256 + j
) * 103
156 res(i
* 256 + j
) = t1
161 end subroutine gangs_workers_vectors