| 1 |
module m |
| 2 |
implicit none |
| 3 |
integer :: t |
| 4 |
!$omp threadprivate (t) |
| 5 |
integer :: f, l, ll, r, r2 |
| 6 |
!$omp declare target to(f, l, ll, r, r2) |
| 7 |
end module m |
| 8 |
|
| 9 |
subroutine foo(fi, p, pp, g, s, nta, nth, ntm, i1, i2, i3, q) |
| 10 |
use m |
| 11 |
implicit none |
| 12 |
integer, value :: p, pp, g, s, nta, nth, ntm |
| 13 |
logical, value :: fi, i1, i2, i3 |
| 14 |
integer, pointer :: q(:) |
| 15 |
integer :: i |
| 16 |
|
| 17 |
!$omp taskgroup task_reduction(+:r2) !allocate (r2) |
| 18 |
!$omp taskloop simd & |
| 19 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) untied if(taskloop: i1) & |
| 20 |
!$omp& if(simd: i2) final(fi) mergeable priority (pp) & |
| 21 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) in_reduction(+:r2) nontemporal(ntm) & |
| 22 |
!$omp& order(concurrent) !allocate (f) |
| 23 |
do i = 1, 64 |
| 24 |
ll = ll + 1 |
| 25 |
end do |
| 26 |
!$omp end taskgroup |
| 27 |
|
| 28 |
!$omp taskgroup task_reduction(+:r) !allocate (r) |
| 29 |
!$omp taskloop simd & |
| 30 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) & |
| 31 |
!$omp& collapse(1) untied if(i1) final(fi) mergeable nogroup priority (pp) & |
| 32 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) in_reduction(+:r) nontemporal(ntm) & |
| 33 |
!$omp& order(concurrent) !allocate (f) |
| 34 |
do i = 1, 64 |
| 35 |
ll = ll + 1 |
| 36 |
end do |
| 37 |
!$omp taskwait |
| 38 |
|
| 39 |
!$omp taskloop simd & |
| 40 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) & |
| 41 |
!$omp& collapse(1) if(taskloop: i1) final(fi) priority (pp) & |
| 42 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(+:r) if (simd: i3) nontemporal(ntm) & |
| 43 |
!$omp& order(concurrent) !allocate (f) |
| 44 |
do i = 1, 64 |
| 45 |
ll = ll + 1 |
| 46 |
end do |
| 47 |
!$omp end taskgroup |
| 48 |
|
| 49 |
!$omp taskgroup task_reduction (+:r2) !allocate (r2) |
| 50 |
!$omp master taskloop & |
| 51 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) & |
| 52 |
!$omp& collapse(1) untied if(taskloop: i1) final(fi) mergeable priority (pp) & |
| 53 |
!$omp& reduction(default, +:r) in_reduction(+:r2) !allocate (f) |
| 54 |
do i = 1, 64 |
| 55 |
ll = ll + 1 |
| 56 |
end do |
| 57 |
!$omp end taskgroup |
| 58 |
|
| 59 |
!$omp taskgroup task_reduction (+:r2) !allocate (r2) |
| 60 |
!$omp master taskloop simd & |
| 61 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) & |
| 62 |
!$omp& collapse(1) untied if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) & |
| 63 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) in_reduction(+:r2) nontemporal(ntm) & |
| 64 |
!$omp& order(concurrent) !allocate (f) |
| 65 |
do i = 1, 64 |
| 66 |
ll = ll + 1 |
| 67 |
end do |
| 68 |
!$omp end taskgroup |
| 69 |
|
| 70 |
!$omp parallel master taskloop & |
| 71 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) & |
| 72 |
!$omp& collapse(1) untied if(taskloop: i1) final(fi) mergeable priority (pp) & |
| 73 |
!$omp& reduction(default, +:r) if (parallel: i2) num_threads (nth) proc_bind(spread) copyin(t) !allocate (f) |
| 74 |
do i = 1, 64 |
| 75 |
ll = ll + 1 |
| 76 |
end do |
| 77 |
|
| 78 |
!$omp parallel master taskloop simd & |
| 79 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) grainsize (g) collapse(1) & |
| 80 |
!$omp& untied if(taskloop: i1) if(simd: i2) final(fi) mergeable priority (pp) & |
| 81 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) nontemporal(ntm) & |
| 82 |
!$omp& if (parallel: i2) num_threads (nth) proc_bind(spread) copyin(t) & |
| 83 |
!$omp& order(concurrent) !allocate (f) |
| 84 |
do i = 1, 64 |
| 85 |
ll = ll + 1 |
| 86 |
end do |
| 87 |
|
| 88 |
!$omp taskgroup task_reduction (+:r2) !allocate (r2) |
| 89 |
!$omp master taskloop & |
| 90 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) & |
| 91 |
!$omp& collapse(1) untied if(i1) final(fi) mergeable priority (pp) & |
| 92 |
!$omp& reduction(default, +:r) in_reduction(+:r2) |
| 93 |
do i = 1, 64 |
| 94 |
ll = ll + 1 |
| 95 |
end do |
| 96 |
!$omp end taskgroup |
| 97 |
|
| 98 |
!$omp taskgroup task_reduction (+:r2) !allocate (r2) |
| 99 |
!$omp master taskloop simd & |
| 100 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) & |
| 101 |
!$omp& collapse(1) untied if(i1) final(fi) mergeable priority (pp) & |
| 102 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) in_reduction(+:r2) nontemporal(ntm) & |
| 103 |
!$omp& order(concurrent) !allocate (f) |
| 104 |
do i = 1, 64 |
| 105 |
ll = ll + 1 |
| 106 |
end do |
| 107 |
!$omp end taskgroup |
| 108 |
|
| 109 |
!$omp parallel master taskloop & |
| 110 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) & |
| 111 |
!$omp& collapse(1) untied if(i1) final(fi) mergeable priority (pp) & |
| 112 |
!$omp& reduction(default, +:r) num_threads (nth) proc_bind(spread) copyin(t) !allocate (f) |
| 113 |
do i = 1, 64 |
| 114 |
ll = ll + 1 |
| 115 |
end do |
| 116 |
|
| 117 |
!$omp parallel master taskloop simd & |
| 118 |
!$omp& private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) & |
| 119 |
!$omp& collapse(1) untied if(i1) final(fi) mergeable priority (pp) & |
| 120 |
!$omp& safelen(8) simdlen(4) linear(ll: 1) aligned(q: 32) reduction(default, +:r) & |
| 121 |
!$omp& nontemporal(ntm) num_threads (nth) proc_bind(spread) copyin(t) & |
| 122 |
!$omp& order(concurrent) !allocate (f) |
| 123 |
do i = 1, 64 |
| 124 |
ll = ll + 1 |
| 125 |
end do |
| 126 |
end |