Commit c425e66b by Tobias Burnus Committed by Tobias Burnus

libgomp/testsuite – use 'stop'

	libgomp/
	* testsuite/libgomp.fortran/: Replace 'STOP' by 'stop'.

From-SVN: r277609
parent 3c56d8d8
2019-10-30 Tobias Burnus <tobias@codesourcery.com> 2019-10-30 Tobias Burnus <tobias@codesourcery.com>
* testsuite/libgomp.fortran/aligned1.f03: Replace 'STOP' by 'stop'.
* testsuite/libgomp.fortran/alloc-comp-1.f90: Ditto.
* testsuite/libgomp.fortran/alloc-comp-2.f90: Ditto.
* testsuite/libgomp.fortran/alloc-comp-3.f90: Ditto.
* testsuite/libgomp.fortran/allocatable1.f90: Ditto.
* testsuite/libgomp.fortran/allocatable10.f90: Ditto.
* testsuite/libgomp.fortran/allocatable11.f90: Ditto.
* testsuite/libgomp.fortran/allocatable12.f90: Ditto.
* testsuite/libgomp.fortran/allocatable2.f90: Ditto.
* testsuite/libgomp.fortran/allocatable3.f90: Ditto.
* testsuite/libgomp.fortran/allocatable4.f90: Ditto.
* testsuite/libgomp.fortran/allocatable5.f90: Ditto.
* testsuite/libgomp.fortran/allocatable6.f90: Ditto.
* testsuite/libgomp.fortran/allocatable7.f90: Ditto.
* testsuite/libgomp.fortran/allocatable8.f90: Ditto.
* testsuite/libgomp.fortran/allocatable9.f90: Ditto.
* testsuite/libgomp.fortran/associate1.f90: Ditto.
* testsuite/libgomp.fortran/associate2.f90: Ditto.
* testsuite/libgomp.fortran/associate3.f90: Ditto.
* testsuite/libgomp.fortran/async_io_4.f90: Ditto.
* testsuite/libgomp.fortran/async_io_5.f90: Ditto.
* testsuite/libgomp.fortran/async_io_6.f90: Ditto.
* testsuite/libgomp.fortran/async_io_7.f90: Ditto.
* testsuite/libgomp.fortran/cancel-do-1.f90: Ditto.
* testsuite/libgomp.fortran/cancel-do-2.f90: Ditto.
* testsuite/libgomp.fortran/cancel-parallel-1.f90: Ditto.
* testsuite/libgomp.fortran/cancel-sections-1.f90: Ditto.
* testsuite/libgomp.fortran/cancel-taskgroup-2.f90: Ditto.
* testsuite/libgomp.fortran/character1.f90: Ditto.
* testsuite/libgomp.fortran/character2.f90: Ditto.
* testsuite/libgomp.fortran/collapse1.f90: Ditto.
* testsuite/libgomp.fortran/collapse2.f90: Ditto.
* testsuite/libgomp.fortran/collapse3.f90: Ditto.
* testsuite/libgomp.fortran/collapse4.f90: Ditto.
* testsuite/libgomp.fortran/crayptr1.f90: Ditto.
* testsuite/libgomp.fortran/crayptr2.f90: Ditto.
* testsuite/libgomp.fortran/crayptr3.f90: Ditto.
* testsuite/libgomp.fortran/declare-simd-1.f90: Ditto.
* testsuite/libgomp.fortran/declare-simd-3.f90: Ditto.
* testsuite/libgomp.fortran/declare-target-2.f90: Ditto.
* testsuite/libgomp.fortran/depend-1.f90: Ditto.
* testsuite/libgomp.fortran/depend-2.f90: Ditto.
* testsuite/libgomp.fortran/depend-3.f90: Ditto.
* testsuite/libgomp.fortran/do1.f90: Ditto.
* testsuite/libgomp.fortran/do2.f90: Ditto.
* testsuite/libgomp.fortran/do_concurrent_5.f90: Ditto.
* testsuite/libgomp.fortran/doacross1.f90: Ditto.
* testsuite/libgomp.fortran/doacross2.f90: Ditto.
* testsuite/libgomp.fortran/doacross3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/array_sections-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/array_sections-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/async_target-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/async_target-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/declare_target-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/declare_target-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/declare_target-5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/device-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/device-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/device-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-6.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-7.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/simd-8.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target-5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-6.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_data-7.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_update-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/target_update-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/task_dep-1.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/task_dep-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/task_dep-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/task_dep-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/task_dep-5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/teams-2.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/teams-3.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/teams-4.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/teams-5.f90: Ditto.
* testsuite/libgomp.fortran/examples-4/teams-6.f90: Ditto.
* testsuite/libgomp.fortran/lastprivate1.f90: Ditto.
* testsuite/libgomp.fortran/lastprivate2.f90: Ditto.
* testsuite/libgomp.fortran/lib1.f90: Ditto.
* testsuite/libgomp.fortran/lib4.f90: Ditto.
* testsuite/libgomp.fortran/lock-1.f90: Ditto.
* testsuite/libgomp.fortran/lock-2.f90: Ditto.
* testsuite/libgomp.fortran/nested1.f90: Ditto.
* testsuite/libgomp.fortran/nestedfn1.f90: Ditto.
* testsuite/libgomp.fortran/nestedfn2.f90: Ditto.
* testsuite/libgomp.fortran/nestedfn3.f90: Ditto.
* testsuite/libgomp.fortran/nestedfn4.f90: Ditto.
* testsuite/libgomp.fortran/nestedfn5.f90: Ditto.
* testsuite/libgomp.fortran/omp_atomic1.f90: Ditto.
* testsuite/libgomp.fortran/omp_atomic2.f90: Ditto.
* testsuite/libgomp.fortran/omp_atomic3.f90: Ditto.
* testsuite/libgomp.fortran/omp_atomic4.f90: Ditto.
* testsuite/libgomp.fortran/omp_atomic5.f90: Ditto.
* testsuite/libgomp.fortran/omp_cond1.f: Ditto.
* testsuite/libgomp.fortran/omp_cond2.f: Ditto.
* testsuite/libgomp.fortran/omp_cond3.F90: Ditto.
* testsuite/libgomp.fortran/omp_cond4.F90: Ditto.
* testsuite/libgomp.fortran/omp_parse1.f90: Ditto.
* testsuite/libgomp.fortran/omp_parse2.f90: Ditto.
* testsuite/libgomp.fortran/omp_parse3.f90: Ditto.
* testsuite/libgomp.fortran/omp_parse4.f90: Ditto.
* testsuite/libgomp.fortran/openmp_version-1.f: Ditto.
* testsuite/libgomp.fortran/openmp_version-2.f90: Ditto.
* testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: Ditto.
* testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: Ditto.
* testsuite/libgomp.fortran/pointer1.f90: Ditto.
* testsuite/libgomp.fortran/pointer2.f90: Ditto.
* testsuite/libgomp.fortran/pr25219.f90: Ditto.
* testsuite/libgomp.fortran/pr27395-1.f90: Ditto.
* testsuite/libgomp.fortran/pr27395-2.f90: Ditto.
* testsuite/libgomp.fortran/pr27416-1.f90: Ditto.
* testsuite/libgomp.fortran/pr27916-1.f90: Ditto.
* testsuite/libgomp.fortran/pr27916-2.f90: Ditto.
* testsuite/libgomp.fortran/pr28390.f: Ditto.
* testsuite/libgomp.fortran/pr29629.f90: Ditto.
* testsuite/libgomp.fortran/pr32550.f90: Ditto.
* testsuite/libgomp.fortran/pr33880.f90: Ditto.
* testsuite/libgomp.fortran/pr34020.f90: Ditto.
* testsuite/libgomp.fortran/pr35130.f90: Ditto.
* testsuite/libgomp.fortran/pr42162.f90: Ditto.
* testsuite/libgomp.fortran/pr46753.f90: Ditto.
* testsuite/libgomp.fortran/pr48894.f90: Ditto.
* testsuite/libgomp.fortran/pr49792-1.f90: Ditto.
* testsuite/libgomp.fortran/pr49792-2.f90: Ditto.
* testsuite/libgomp.fortran/pr63938-1.f90: Ditto.
* testsuite/libgomp.fortran/pr63938-2.f90: Ditto.
* testsuite/libgomp.fortran/pr65597.f90: Ditto.
* testsuite/libgomp.fortran/pr66199-1.f90: Ditto.
* testsuite/libgomp.fortran/pr71014.f90: Ditto.
* testsuite/libgomp.fortran/pr81304.f90: Ditto.
* testsuite/libgomp.fortran/pr81841.f90: Ditto.
* testsuite/libgomp.fortran/pr84418-1.f90: Ditto.
* testsuite/libgomp.fortran/pr84418-2.f90: Ditto.
* testsuite/libgomp.fortran/procptr1.f90: Ditto.
* testsuite/libgomp.fortran/recursion1.f90: Ditto.
* testsuite/libgomp.fortran/reduction1.f90: Ditto.
* testsuite/libgomp.fortran/reduction2.f90: Ditto.
* testsuite/libgomp.fortran/reduction3.f90: Ditto.
* testsuite/libgomp.fortran/reduction4.f90: Ditto.
* testsuite/libgomp.fortran/reduction5.f90: Ditto.
* testsuite/libgomp.fortran/reduction6.f90: Ditto.
* testsuite/libgomp.fortran/reference1.f90: Ditto.
* testsuite/libgomp.fortran/reference2.f90: Ditto.
* testsuite/libgomp.fortran/retval1.f90: Ditto.
* testsuite/libgomp.fortran/retval2.f90: Ditto.
* testsuite/libgomp.fortran/sharing1.f90: Ditto.
* testsuite/libgomp.fortran/sharing2.f90: Ditto.
* testsuite/libgomp.fortran/simd1.f90: Ditto.
* testsuite/libgomp.fortran/simd2.f90: Ditto.
* testsuite/libgomp.fortran/simd3.f90: Ditto.
* testsuite/libgomp.fortran/simd4.f90: Ditto.
* testsuite/libgomp.fortran/simd5.f90: Ditto.
* testsuite/libgomp.fortran/simd6.f90: Ditto.
* testsuite/libgomp.fortran/simd7.f90: Ditto.
* testsuite/libgomp.fortran/stack.f90: Ditto.
* testsuite/libgomp.fortran/strassen.f90: Ditto.
* testsuite/libgomp.fortran/tabs1.f90: Ditto.
* testsuite/libgomp.fortran/tabs2.f: Ditto.
* testsuite/libgomp.fortran/target1.f90: Ditto.
* testsuite/libgomp.fortran/target2.f90: Ditto.
* testsuite/libgomp.fortran/target3.f90: Ditto.
* testsuite/libgomp.fortran/target4.f90: Ditto.
* testsuite/libgomp.fortran/target5.f90: Ditto.
* testsuite/libgomp.fortran/target6.f90: Ditto.
* testsuite/libgomp.fortran/target7.f90: Ditto.
* testsuite/libgomp.fortran/target8.f90: Ditto.
* testsuite/libgomp.fortran/task1.f90: Ditto.
* testsuite/libgomp.fortran/task2.f90: Ditto.
* testsuite/libgomp.fortran/task3.f90: Ditto.
* testsuite/libgomp.fortran/task4.f90: Ditto.
* testsuite/libgomp.fortran/taskgroup1.f90: Ditto.
* testsuite/libgomp.fortran/taskloop1.f90: Ditto.
* testsuite/libgomp.fortran/taskloop2.f90: Ditto.
* testsuite/libgomp.fortran/taskloop3.f90: Ditto.
* testsuite/libgomp.fortran/taskloop4.f90: Ditto.
* testsuite/libgomp.fortran/threadprivate1.f90: Ditto.
* testsuite/libgomp.fortran/threadprivate2.f90: Ditto.
* testsuite/libgomp.fortran/threadprivate3.f90: Ditto.
* testsuite/libgomp.fortran/threadprivate4.f90: Ditto.
* testsuite/libgomp.fortran/udr1.f90: Ditto.
* testsuite/libgomp.fortran/udr10.f90: Ditto.
* testsuite/libgomp.fortran/udr11.f90: Ditto.
* testsuite/libgomp.fortran/udr12.f90: Ditto.
* testsuite/libgomp.fortran/udr13.f90: Ditto.
* testsuite/libgomp.fortran/udr14.f90: Ditto.
* testsuite/libgomp.fortran/udr15.f90: Ditto.
* testsuite/libgomp.fortran/udr2.f90: Ditto.
* testsuite/libgomp.fortran/udr3.f90: Ditto.
* testsuite/libgomp.fortran/udr4.f90: Ditto.
* testsuite/libgomp.fortran/udr5.f90: Ditto.
* testsuite/libgomp.fortran/udr6.f90: Ditto.
* testsuite/libgomp.fortran/udr7.f90: Ditto.
* testsuite/libgomp.fortran/udr8.f90: Ditto.
* testsuite/libgomp.fortran/udr9.f90: Ditto.
* testsuite/libgomp.fortran/vla1.f90: Ditto.
* testsuite/libgomp.fortran/vla2.f90: Ditto.
* testsuite/libgomp.fortran/vla3.f90: Ditto.
* testsuite/libgomp.fortran/vla4.f90: Ditto.
* testsuite/libgomp.fortran/vla5.f90: Ditto.
* testsuite/libgomp.fortran/vla6.f90: Ditto.
* testsuite/libgomp.fortran/vla7.f90: Ditto.
* testsuite/libgomp.fortran/vla8.f90: Ditto.
* testsuite/libgomp.fortran/workshare1.f90: Ditto.
* testsuite/libgomp.fortran/workshare2.f90: Ditto.
2019-10-30 Tobias Burnus <tobias@codesourcery.com>
* testsuite/libgomp.fortran/target-simd.f90: Use stop not abort. * testsuite/libgomp.fortran/target-simd.f90: Use stop not abort.
* testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90:
Ditto; add 'dg-do run' for torture testing. Ditto; add 'dg-do run' for torture testing.
......
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
end do end do
call foo (p, q, c_loc (r(1)), s) call foo (p, q, c_loc (r(1)), s)
do i = 1, 1024 do i = 1, 1024
if (p(i) /= i * i + 3 * i + 2) STOP 1 if (p(i) /= i * i + 3 * i + 2) stop 1
p(i) = i p(i) = i
end do end do
call bar (p, q, c_loc (r(1)), s) call bar (p, q, c_loc (r(1)), s)
do i = 1, 1024 do i = 1, 1024
if (p(i) /= i * i + 3 * i + 2) STOP 2 if (p(i) /= i * i + 3 * i + 2) stop 2
end do end do
! Attempt to create 64-byte aligned allocatable ! Attempt to create 64-byte aligned allocatable
do i = 1, 64 do i = 1, 64
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
end do end do
call baz (p, c) call baz (p, c)
do i = 1, 1024 do i = 1, 1024
if (p(i) /= i * i + 5 * i + 2) STOP 3 if (p(i) /= i * i + 5 * i + 2) stop 3
end do end do
end if end if
end end
......
...@@ -22,19 +22,19 @@ contains ...@@ -22,19 +22,19 @@ contains
type (dl), intent (in) :: obj type (dl), intent (in) :: obj
integer, intent (in) :: val, cl1, cu1, cl2, cu2 integer, intent (in) :: val, cl1, cu1, cl2, cu2
logical, intent (in) :: c, f logical, intent (in) :: c, f
if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) STOP 1 if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) stop 1
if (c) then if (c) then
if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) STOP 2 if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) stop 2
if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) STOP 3 if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) stop 3
end if end if
if (val /= 0) then if (val /= 0) then
if (obj%a /= val .or. obj%b /= val) STOP 4 if (obj%a /= val .or. obj%b /= val) stop 4
if (obj%d /= val .or. obj%e /= val) STOP 5 if (obj%d /= val .or. obj%e /= val) stop 5
if (c) then if (c) then
if (any (obj%c /= val)) STOP 6 if (any (obj%c /= val)) stop 6
end if end if
if (f) then if (f) then
if (obj%f /= val) STOP 7 if (obj%f /= val) stop 7
end if end if
end if end if
end subroutine ver_dl end subroutine ver_dl
...@@ -43,9 +43,9 @@ contains ...@@ -43,9 +43,9 @@ contains
integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2 integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2
logical, intent (in) :: h, k, c, f logical, intent (in) :: h, k, c, f
integer :: i, j integer :: i, j
if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) STOP 8 if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) stop 8
if (h) then if (h) then
if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) STOP 9 if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) stop 9
do i = hl, hu do i = hl, hu
call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f) call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f)
end do end do
...@@ -57,7 +57,7 @@ contains ...@@ -57,7 +57,7 @@ contains
end do end do
if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f) if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f)
if (val /= 0) then if (val /= 0) then
if (obj%g /= val .or. obj%i /= val) STOP 10 if (obj%g /= val .or. obj%i /= val) stop 10
end if end if
end subroutine ver_dt end subroutine ver_dt
subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f) subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f)
......
...@@ -22,19 +22,19 @@ contains ...@@ -22,19 +22,19 @@ contains
type (dl), intent (in) :: obj type (dl), intent (in) :: obj
integer, intent (in) :: val, cl1, cu1, cl2, cu2 integer, intent (in) :: val, cl1, cu1, cl2, cu2
logical, intent (in) :: c, f logical, intent (in) :: c, f
if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) STOP 1 if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) stop 1
if (c) then if (c) then
if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) STOP 2 if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) stop 2
if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) STOP 3 if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) stop 3
end if end if
if (val /= 0) then if (val /= 0) then
if (obj%a /= val .or. obj%b /= val) STOP 4 if (obj%a /= val .or. obj%b /= val) stop 4
if (obj%d /= val .or. obj%e /= val) STOP 5 if (obj%d /= val .or. obj%e /= val) stop 5
if (c) then if (c) then
if (any (obj%c /= val)) STOP 6 if (any (obj%c /= val)) stop 6
end if end if
if (f) then if (f) then
if (obj%f /= val) STOP 7 if (obj%f /= val) stop 7
end if end if
end if end if
end subroutine ver_dl end subroutine ver_dl
...@@ -43,9 +43,9 @@ contains ...@@ -43,9 +43,9 @@ contains
integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2 integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2
logical, intent (in) :: h, k, c, f logical, intent (in) :: h, k, c, f
integer :: i, j integer :: i, j
if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) STOP 8 if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) stop 8
if (h) then if (h) then
if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) STOP 9 if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) stop 9
do i = hl, hu do i = hl, hu
call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f) call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f)
end do end do
...@@ -57,7 +57,7 @@ contains ...@@ -57,7 +57,7 @@ contains
end do end do
if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f) if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f)
if (val /= 0) then if (val /= 0) then
if (obj%g /= val .or. obj%i /= val) STOP 10 if (obj%g /= val .or. obj%i /= val) stop 10
end if end if
end subroutine ver_dt end subroutine ver_dt
subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f) subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f)
...@@ -122,20 +122,20 @@ contains ...@@ -122,20 +122,20 @@ contains
logical, parameter :: T = .true. logical, parameter :: T = .true.
logical :: l logical :: l
!$omp parallel private (x, y, z) !$omp parallel private (x, y, z)
if (allocated (x) .or. allocated (y) .or. allocated (z)) STOP 11 if (allocated (x) .or. allocated (y) .or. allocated (z)) stop 11
!$omp end parallel !$omp end parallel
!$omp parallel firstprivate (x, y, z) !$omp parallel firstprivate (x, y, z)
if (allocated (x) .or. allocated (y) .or. allocated (z)) STOP 12 if (allocated (x) .or. allocated (y) .or. allocated (z)) stop 12
!$omp end parallel !$omp end parallel
l = F l = F
!$omp parallel sections lastprivate (x, y, z) firstprivate (l) !$omp parallel sections lastprivate (x, y, z) firstprivate (l)
!$omp section !$omp section
if (.not. l) then if (.not. l) then
if (allocated (x) .or. allocated (y) .or. allocated (z)) STOP 13 if (allocated (x) .or. allocated (y) .or. allocated (z)) stop 13
end if end if
!$omp section !$omp section
if (.not. l) then if (.not. l) then
if (allocated (x) .or. allocated (y) .or. allocated (z)) STOP 14 if (allocated (x) .or. allocated (y) .or. allocated (z)) stop 14
end if end if
allocate (x, y, z(-3:-3,2:3)) allocate (x, y, z(-3:-3,2:3))
call alloc_dt (x, 5, F, 0, 0, T, T, -1, -1, -1, -1, T) call alloc_dt (x, 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
...@@ -148,10 +148,10 @@ contains ...@@ -148,10 +148,10 @@ contains
call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F) call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
!$omp section !$omp section
!$omp end parallel sections !$omp end parallel sections
if (.not.allocated (x) .or. .not.allocated (y)) STOP 15 if (.not.allocated (x) .or. .not.allocated (y)) stop 15
if (.not.allocated (z)) STOP 16 if (.not.allocated (z)) stop 16
if (lbound (z, 1) /= -3 .or. ubound (z, 1) /= -3) STOP 17 if (lbound (z, 1) /= -3 .or. ubound (z, 1) /= -3) stop 17
if (lbound (z, 2) /= 2 .or. ubound (z, 2) /= 3) STOP 18 if (lbound (z, 2) /= 2 .or. ubound (z, 2) /= 3) stop 18
call ver_dt (x, 5, F, 0, 0, T, T, -1, -1, -1, -1, T) call ver_dt (x, 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
call ver_dt (y, 23, T, 0, 1, T, T, 2, 2, 2, 2, F) call ver_dt (y, 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T) call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
......
...@@ -22,19 +22,19 @@ contains ...@@ -22,19 +22,19 @@ contains
type (dl), intent (in) :: obj type (dl), intent (in) :: obj
integer, intent (in) :: val, cl1, cu1, cl2, cu2 integer, intent (in) :: val, cl1, cu1, cl2, cu2
logical, intent (in) :: c, f logical, intent (in) :: c, f
if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) STOP 1 if ((c .neqv. allocated (obj%c)) .or. (f .neqv. allocated (obj%f))) stop 1
if (c) then if (c) then
if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) STOP 2 if (lbound (obj%c, 1) /= cl1 .or. ubound (obj%c, 1) /= cu1) stop 2
if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) STOP 3 if (lbound (obj%c, 2) /= cl2 .or. ubound (obj%c, 2) /= cu2) stop 3
end if end if
if (val /= 0) then if (val /= 0) then
if (obj%a /= val .or. obj%b /= val) STOP 4 if (obj%a /= val .or. obj%b /= val) stop 4
if (obj%d /= val .or. obj%e /= val) STOP 5 if (obj%d /= val .or. obj%e /= val) stop 5
if (c) then if (c) then
if (any (obj%c /= val)) STOP 6 if (any (obj%c /= val)) stop 6
end if end if
if (f) then if (f) then
if (obj%f /= val) STOP 7 if (obj%f /= val) stop 7
end if end if
end if end if
end subroutine ver_dl end subroutine ver_dl
...@@ -43,9 +43,9 @@ contains ...@@ -43,9 +43,9 @@ contains
integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2 integer, intent (in) :: val, hl, hu, cl1, cu1, cl2, cu2
logical, intent (in) :: h, k, c, f logical, intent (in) :: h, k, c, f
integer :: i, j integer :: i, j
if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) STOP 8 if ((h .neqv. allocated (obj%h)) .or. (k .neqv. allocated (obj%k))) stop 8
if (h) then if (h) then
if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) STOP 9 if (lbound (obj%h, 1) /= hl .or. ubound (obj%h, 1) /= hu) stop 9
do i = hl, hu do i = hl, hu
call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f) call ver_dl (obj%h(i), val, c, cl1, cu1, cl2, cu2, f)
end do end do
...@@ -57,7 +57,7 @@ contains ...@@ -57,7 +57,7 @@ contains
end do end do
if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f) if (k) call ver_dl (obj%k, val, c, cl1, cu1, cl2, cu2, f)
if (val /= 0) then if (val /= 0) then
if (obj%g /= val .or. obj%i /= val) STOP 10 if (obj%g /= val .or. obj%i /= val) stop 10
end if end if
end subroutine ver_dt end subroutine ver_dt
subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f) subroutine alloc_dl (obj, val, c, cl1, cu1, cl2, cu2, f)
...@@ -124,27 +124,27 @@ contains ...@@ -124,27 +124,27 @@ contains
logical, parameter :: F = .false. logical, parameter :: F = .false.
logical, parameter :: T = .true. logical, parameter :: T = .true.
logical :: l logical :: l
if (lbound (x, 1) /= 2 .or. ubound (x, 1) /= 4) STOP 11 if (lbound (x, 1) /= 2 .or. ubound (x, 1) /= 4) stop 11
if (lbound (y, 1) /= 3 .or. ubound (y, 1) /= 4) STOP 12 if (lbound (y, 1) /= 3 .or. ubound (y, 1) /= 4) stop 12
call ver_dt (x(2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F) call ver_dt (x(2), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
call ver_dt (x(n), 0, F, 0, 0, F, F, 0, 0, 0, 0, F) call ver_dt (x(n), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
call ver_dt (y(3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F) call ver_dt (y(3), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
call ver_dt (y(4), 0, F, 0, 0, F, F, 0, 0, 0, 0, F) call ver_dt (y(4), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
!$omp parallel private (z) !$omp parallel private (z)
if (allocated (z)) STOP 13 if (allocated (z)) stop 13
!$omp end parallel !$omp end parallel
!$omp parallel firstprivate (z) !$omp parallel firstprivate (z)
if (allocated (z)) STOP 14 if (allocated (z)) stop 14
!$omp end parallel !$omp end parallel
l = F l = F
!$omp parallel sections lastprivate (z) firstprivate (l) !$omp parallel sections lastprivate (z) firstprivate (l)
!$omp section !$omp section
if (.not. l) then if (.not. l) then
if (allocated (z)) STOP 15 if (allocated (z)) stop 15
end if end if
!$omp section !$omp section
if (.not. l) then if (.not. l) then
if (allocated (z)) STOP 16 if (allocated (z)) stop 16
end if end if
allocate (z(-3:-3,2:3)) allocate (z(-3:-3,2:3))
call alloc_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T) call alloc_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
...@@ -153,9 +153,9 @@ contains ...@@ -153,9 +153,9 @@ contains
call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F) call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
!$omp section !$omp section
!$omp end parallel sections !$omp end parallel sections
if (.not.allocated (z)) STOP 17 if (.not.allocated (z)) stop 17
if (lbound (z, 1) /= -3 .or. ubound (z, 1) /= -3) STOP 18 if (lbound (z, 1) /= -3 .or. ubound (z, 1) /= -3) stop 18
if (lbound (z, 2) /= 2 .or. ubound (z, 2) /= 3) STOP 19 if (lbound (z, 2) /= 2 .or. ubound (z, 2) /= 3) stop 19
call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T) call ver_dt (z(-3,2), 5, F, 0, 0, T, T, -1, -1, -1, -1, T)
call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F) call ver_dt (z(-3,3), 23, T, 0, 1, T, T, 2, 2, 2, 2, F)
call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F) call ver_dt (x(n - 1), 0, F, 0, 0, F, F, 0, 0, 0, 0, F)
...@@ -203,8 +203,8 @@ contains ...@@ -203,8 +203,8 @@ contains
call alloc_dt (z(-3,2), 5, T, 1, 2, F, T, 2, 3, -2, -2, F) call alloc_dt (z(-3,2), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
call alloc_dt (z(-3,3), 15, F, 0, 0, T, T, 2, 2, 2, 2, T) call alloc_dt (z(-3,3), 15, F, 0, 0, T, T, 2, 2, 2, 2, T)
!$omp parallel firstprivate (x, y, z) !$omp parallel firstprivate (x, y, z)
if (lbound (x, 1) /= 2 .or. ubound (x, 1) /= 4) STOP 20 if (lbound (x, 1) /= 2 .or. ubound (x, 1) /= 4) stop 20
if (lbound (y, 1) /= 3 .or. ubound (y, 1) /= 4) STOP 21 if (lbound (y, 1) /= 3 .or. ubound (y, 1) /= 4) stop 21
call ver_dt (x(n - 1), 5, T, 1, 2, F, T, 2, 3, -2, -2, F) call ver_dt (x(n - 1), 5, T, 1, 2, F, T, 2, 3, -2, -2, F)
call alloc_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T) call alloc_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
call ver_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T) call ver_dt (x(n - 1), 4, T, -3, -1, T, T, -1, -1, 2, 3, T)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
logical :: k, l logical :: k, l
b(:, :) = 16 b(:, :) = 16
l = .false. l = .false.
if (allocated (a)) STOP 1 if (allocated (a)) stop 1
!$omp parallel private (a, b) reduction (.or.:l) !$omp parallel private (a, b) reduction (.or.:l)
l = l.or.allocated (a) l = l.or.allocated (a)
allocate (a(3, 6)) allocate (a(3, 6))
...@@ -18,18 +18,18 @@ ...@@ -18,18 +18,18 @@
deallocate (a) deallocate (a)
l = l.or.allocated (a) l = l.or.allocated (a)
!$omp end parallel !$omp end parallel
if (allocated (a).or.l) STOP 2 if (allocated (a).or.l) stop 2
allocate (a(6, 3)) allocate (a(6, 3))
a(:, :) = 3 a(:, :) = 3
if (.not.allocated (a)) STOP 3 if (.not.allocated (a)) stop 3
l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3 l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3
if (l) STOP 4 if (l) stop 4
!$omp parallel private (a, b) reduction (.or.:l) !$omp parallel private (a, b) reduction (.or.:l)
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
a(3, 2) = 1 a(3, 2) = 1
b(3, 2) = 1 b(3, 2) = 1
!$omp end parallel !$omp end parallel
if (l.or..not.allocated (a)) STOP 5 if (l.or..not.allocated (a)) stop 5
!$omp parallel firstprivate (a, b) reduction (.or.:l) !$omp parallel firstprivate (a, b) reduction (.or.:l)
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3 l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
a(:, :) = omp_get_thread_num () a(:, :) = omp_get_thread_num ()
b(:, :) = omp_get_thread_num () b(:, :) = omp_get_thread_num ()
!$omp end parallel !$omp end parallel
if (any (a.ne.3).or.any (b.ne.16).or.l) STOP 6 if (any (a.ne.3).or.any (b.ne.16).or.l) stop 6
k = .true. k = .true.
!$omp parallel do firstprivate (a, b, k) lastprivate (a, b) & !$omp parallel do firstprivate (a, b, k) lastprivate (a, b) &
!$omp & reduction (.or.:l) !$omp & reduction (.or.:l)
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
a(:, :) = i + 2 a(:, :) = i + 2
b(:, :) = i b(:, :) = i
end do end do
if (any (a.ne.38).or.any (b.ne.36).or.l) STOP 7 if (any (a.ne.38).or.any (b.ne.36).or.l) stop 7
deallocate (a) deallocate (a)
if (allocated (a)) STOP 8 if (allocated (a)) stop 8
allocate (a (0:1, 0:3)) allocate (a (0:1, 0:3))
a(:, :) = 0 a(:, :) = 0
!$omp parallel do reduction (+:a) reduction (.or.:l) & !$omp parallel do reduction (+:a) reduction (.or.:l) &
...@@ -72,10 +72,10 @@ ...@@ -72,10 +72,10 @@
a(modulo (i, 2), i / 2) = a(modulo (i, 2), i / 2) + i a(modulo (i, 2), i / 2) = a(modulo (i, 2), i / 2) + i
a(i / 4, modulo (i, 4)) = a(i / 4, modulo (i, 4)) + i a(i / 4, modulo (i, 4)) = a(i / 4, modulo (i, 4)) + i
end do end do
if (l) STOP 9 if (l) stop 9
do i = 0, 1 do i = 0, 1
do j = 0, 3 do j = 0, 3
if (a(i, j) .ne. (5*i + 3*j)) STOP 10 if (a(i, j) .ne. (5*i + 3*j)) stop 10
end do end do
end do end do
end end
...@@ -4,109 +4,109 @@ ...@@ -4,109 +4,109 @@
integer :: i integer :: i
!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) & !$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) &
!$omp & initializer (omp_priv = 0) !$omp & initializer (omp_priv = 0)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 1 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 1
allocate (a, b(6:9), c(3, 8:9)) allocate (a, b(6:9), c(3, 8:9))
a = 0 a = 0
b = 0 b = 0
c = 0 c = 0
if (.not.allocated (a)) STOP 2 if (.not.allocated (a)) stop 2
if (.not.allocated (b) .or. size (b) /= 4) STOP 3 if (.not.allocated (b) .or. size (b) /= 4) stop 3
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 4 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 4
if (.not.allocated (c) .or. size (c) /= 6) STOP 5 if (.not.allocated (c) .or. size (c) /= 6) stop 5
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 6 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 6
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 7 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 7
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 8 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 8
!$omp parallel do reduction (+:a, b, c) !$omp parallel do reduction (+:a, b, c)
do i = 1, 10 do i = 1, 10
if (.not.allocated (a)) STOP 9 if (.not.allocated (a)) stop 9
if (.not.allocated (b) .or. size (b) /= 4) STOP 10 if (.not.allocated (b) .or. size (b) /= 4) stop 10
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 11 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 11
if (.not.allocated (c) .or. size (c) /= 6) STOP 12 if (.not.allocated (c) .or. size (c) /= 6) stop 12
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 13 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 13
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 14 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 14
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 15 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 15
a = a + i a = a + i
b = b + 2 * i b = b + 2 * i
c = c + 3 * i c = c + 3 * i
end do end do
if (.not.allocated (a)) STOP 16 if (.not.allocated (a)) stop 16
if (.not.allocated (b) .or. size (b) /= 4) STOP 17 if (.not.allocated (b) .or. size (b) /= 4) stop 17
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 18 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 18
if (.not.allocated (c) .or. size (c) /= 6) STOP 19 if (.not.allocated (c) .or. size (c) /= 6) stop 19
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 20 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 20
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 21 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 21
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 22 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 22
if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) STOP 23 if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) stop 23
a = 0 a = 0
b = 0 b = 0
c = 0 c = 0
!$omp parallel do reduction (foo : a, b, c) !$omp parallel do reduction (foo : a, b, c)
do i = 1, 10 do i = 1, 10
if (.not.allocated (a)) STOP 24 if (.not.allocated (a)) stop 24
if (.not.allocated (b) .or. size (b) /= 4) STOP 25 if (.not.allocated (b) .or. size (b) /= 4) stop 25
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 26 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 26
if (.not.allocated (c) .or. size (c) /= 6) STOP 27 if (.not.allocated (c) .or. size (c) /= 6) stop 27
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 28 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 28
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 29 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 29
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 30 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 30
a = a + i a = a + i
b = b + 2 * i b = b + 2 * i
c = c + 3 * i c = c + 3 * i
end do end do
if (.not.allocated (a)) STOP 31 if (.not.allocated (a)) stop 31
if (.not.allocated (b) .or. size (b) /= 4) STOP 32 if (.not.allocated (b) .or. size (b) /= 4) stop 32
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 33 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 33
if (.not.allocated (c) .or. size (c) /= 6) STOP 34 if (.not.allocated (c) .or. size (c) /= 6) stop 34
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 35 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 35
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 36 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 36
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 37 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 37
if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) STOP 38 if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) stop 38
a = 0 a = 0
b = 0 b = 0
c = 0 c = 0
!$omp simd reduction (+:a, b, c) !$omp simd reduction (+:a, b, c)
do i = 1, 10 do i = 1, 10
if (.not.allocated (a)) STOP 39 if (.not.allocated (a)) stop 39
if (.not.allocated (b) .or. size (b) /= 4) STOP 40 if (.not.allocated (b) .or. size (b) /= 4) stop 40
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 41 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 41
if (.not.allocated (c) .or. size (c) /= 6) STOP 42 if (.not.allocated (c) .or. size (c) /= 6) stop 42
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 43 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 43
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 44 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 44
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 45 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 45
a = a + i a = a + i
b = b + 2 * i b = b + 2 * i
c = c + 3 * i c = c + 3 * i
end do end do
if (.not.allocated (a)) STOP 46 if (.not.allocated (a)) stop 46
if (.not.allocated (b) .or. size (b) /= 4) STOP 47 if (.not.allocated (b) .or. size (b) /= 4) stop 47
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 48 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 48
if (.not.allocated (c) .or. size (c) /= 6) STOP 49 if (.not.allocated (c) .or. size (c) /= 6) stop 49
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 50 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 50
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 51 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 51
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 52 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 52
if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) STOP 53 if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) stop 53
a = 0 a = 0
b = 0 b = 0
c = 0 c = 0
!$omp simd reduction (foo : a, b, c) !$omp simd reduction (foo : a, b, c)
do i = 1, 10 do i = 1, 10
if (.not.allocated (a)) STOP 54 if (.not.allocated (a)) stop 54
if (.not.allocated (b) .or. size (b) /= 4) STOP 55 if (.not.allocated (b) .or. size (b) /= 4) stop 55
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 56 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 56
if (.not.allocated (c) .or. size (c) /= 6) STOP 57 if (.not.allocated (c) .or. size (c) /= 6) stop 57
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 58 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 58
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 59 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 59
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 60 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 60
a = a + i a = a + i
b = b + 2 * i b = b + 2 * i
c = c + 3 * i c = c + 3 * i
end do end do
if (.not.allocated (a)) STOP 61 if (.not.allocated (a)) stop 61
if (.not.allocated (b) .or. size (b) /= 4) STOP 62 if (.not.allocated (b) .or. size (b) /= 4) stop 62
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 63 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 63
if (.not.allocated (c) .or. size (c) /= 6) STOP 64 if (.not.allocated (c) .or. size (c) /= 6) stop 64
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 65 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 65
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 66 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 66
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 67 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 67
if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) STOP 68 if (a /= 55 .or. any (b /= 110) .or. any (c /= 165)) stop 68
end end
...@@ -5,68 +5,68 @@ ...@@ -5,68 +5,68 @@
integer, allocatable, save :: a, b(:), c(:,:) integer, allocatable, save :: a, b(:), c(:,:)
integer :: p integer :: p
!$omp threadprivate (a, b, c) !$omp threadprivate (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 1 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 1
call omp_set_dynamic (.false.) call omp_set_dynamic (.false.)
call omp_set_num_threads (4) call omp_set_num_threads (4)
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 2 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 2
!$omp end parallel !$omp end parallel
allocate (a, b(6:9), c(3, 8:9)) allocate (a, b(6:9), c(3, 8:9))
a = 4 a = 4
b = 5 b = 5
c = 6 c = 6
if (.not.allocated (a)) STOP 3 if (.not.allocated (a)) stop 3
if (.not.allocated (b) .or. size (b) /= 4) STOP 4 if (.not.allocated (b) .or. size (b) /= 4) stop 4
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 5 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 5
if (.not.allocated (c) .or. size (c) /= 6) STOP 6 if (.not.allocated (c) .or. size (c) /= 6) stop 6
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 7 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 7
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 8 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 8
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 9 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 9
!$omp parallel num_threads (4) copyin (a, b, c) private (p) !$omp parallel num_threads (4) copyin (a, b, c) private (p)
p = omp_get_thread_num () p = omp_get_thread_num ()
if (.not.allocated (a)) STOP 10 if (.not.allocated (a)) stop 10
if (.not.allocated (b) .or. size (b) /= 4) STOP 11 if (.not.allocated (b) .or. size (b) /= 4) stop 11
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 12 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 12
if (.not.allocated (c) .or. size (c) /= 6) STOP 13 if (.not.allocated (c) .or. size (c) /= 6) stop 13
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 14 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 14
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 15 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 15
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 16 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 16
if (a /= 4 .or. any (b /= 5) .or. any (c /= 6)) STOP 17 if (a /= 4 .or. any (b /= 5) .or. any (c /= 6)) stop 17
deallocate (a, b, c) deallocate (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 18 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 18
allocate (a, b(p:9), c(3, p:7)) allocate (a, b(p:9), c(3, p:7))
a = p a = p
b = p b = p
c = p c = p
if (.not.allocated (a)) STOP 19 if (.not.allocated (a)) stop 19
if (.not.allocated (b) .or. size (b) /= (10 - p)) STOP 20 if (.not.allocated (b) .or. size (b) /= (10 - p)) stop 20
if (lbound (b, 1) /= p .or. ubound (b, 1) /= 9) STOP 21 if (lbound (b, 1) /= p .or. ubound (b, 1) /= 9) stop 21
if (.not.allocated (c) .or. size (c) /= (3 * (8 - p))) STOP 22 if (.not.allocated (c) .or. size (c) /= (3 * (8 - p))) stop 22
if (size (c, 1) /= 3 .or. size (c, 2) /= (8 - p)) STOP 23 if (size (c, 1) /= 3 .or. size (c, 2) /= (8 - p)) stop 23
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 24 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 24
if (lbound (c, 2) /= p .or. ubound (c, 2) /= 7) STOP 25 if (lbound (c, 2) /= p .or. ubound (c, 2) /= 7) stop 25
if (a /= p .or. any (b /= p) .or. any (c /= p)) STOP 26 if (a /= p .or. any (b /= p) .or. any (c /= p)) stop 26
!$omp end parallel !$omp end parallel
!$omp parallel num_threads (4) copyin (a, b, c) !$omp parallel num_threads (4) copyin (a, b, c)
if (.not.allocated (a)) STOP 27 if (.not.allocated (a)) stop 27
if (.not.allocated (b) .or. size (b) /= 10) STOP 28 if (.not.allocated (b) .or. size (b) /= 10) stop 28
if (lbound (b, 1) /= 0 .or. ubound (b, 1) /= 9) STOP 29 if (lbound (b, 1) /= 0 .or. ubound (b, 1) /= 9) stop 29
if (.not.allocated (c) .or. size (c) /= 24) STOP 30 if (.not.allocated (c) .or. size (c) /= 24) stop 30
if (size (c, 1) /= 3 .or. size (c, 2) /= 8) STOP 31 if (size (c, 1) /= 3 .or. size (c, 2) /= 8) stop 31
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 32 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 32
if (lbound (c, 2) /= 0 .or. ubound (c, 2) /= 7) STOP 33 if (lbound (c, 2) /= 0 .or. ubound (c, 2) /= 7) stop 33
if (a /= 0 .or. any (b /= 0) .or. any (c /= 0)) STOP 34 if (a /= 0 .or. any (b /= 0) .or. any (c /= 0)) stop 34
!$omp end parallel !$omp end parallel
deallocate (a, b, c) deallocate (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 35 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 35
!$omp parallel num_threads (4) copyin (a, b, c) !$omp parallel num_threads (4) copyin (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 36 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 36
!$omp end parallel !$omp end parallel
end end
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
integer, allocatable :: a, b(:), c(:,:) integer, allocatable :: a, b(:), c(:,:)
logical :: l logical :: l
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 1 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 1
!$omp parallel private (a, b, c, l) !$omp parallel private (a, b, c, l)
l = .false. l = .false.
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 2 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 2
!$omp single !$omp single
allocate (a, b(6:9), c(3, 8:9)) allocate (a, b(6:9), c(3, 8:9))
...@@ -15,60 +15,60 @@ ...@@ -15,60 +15,60 @@
c = 6 c = 6
!$omp end single copyprivate (a, b, c) !$omp end single copyprivate (a, b, c)
if (.not.allocated (a)) STOP 3 if (.not.allocated (a)) stop 3
if (.not.allocated (b) .or. size (b) /= 4) STOP 4 if (.not.allocated (b) .or. size (b) /= 4) stop 4
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 5 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 5
if (.not.allocated (c) .or. size (c) /= 6) STOP 6 if (.not.allocated (c) .or. size (c) /= 6) stop 6
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 7 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 7
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 8 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 8
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 9 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 9
if (a /= 4 .or. any (b /= 5) .or. any (c /= 6)) STOP 10 if (a /= 4 .or. any (b /= 5) .or. any (c /= 6)) stop 10
!$omp single !$omp single
deallocate (a, b, c) deallocate (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 11 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 11
allocate (a, b(0:4), c(3, 2:7)) allocate (a, b(0:4), c(3, 2:7))
a = 1 a = 1
b = 2 b = 2
c = 3 c = 3
!$omp end single copyprivate (a, b, c) !$omp end single copyprivate (a, b, c)
if (.not.allocated (a)) STOP 12 if (.not.allocated (a)) stop 12
if (.not.allocated (b) .or. size (b) /= 5) STOP 13 if (.not.allocated (b) .or. size (b) /= 5) stop 13
if (lbound (b, 1) /= 0 .or. ubound (b, 1) /= 4) STOP 14 if (lbound (b, 1) /= 0 .or. ubound (b, 1) /= 4) stop 14
if (.not.allocated (c) .or. size (c) /= 18) STOP 15 if (.not.allocated (c) .or. size (c) /= 18) stop 15
if (size (c, 1) /= 3 .or. size (c, 2) /= 6) STOP 16 if (size (c, 1) /= 3 .or. size (c, 2) /= 6) stop 16
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 17 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 17
if (lbound (c, 2) /= 2 .or. ubound (c, 2) /= 7) STOP 18 if (lbound (c, 2) /= 2 .or. ubound (c, 2) /= 7) stop 18
if (a /= 1 .or. any (b /= 2) .or. any (c /= 3)) STOP 19 if (a /= 1 .or. any (b /= 2) .or. any (c /= 3)) stop 19
!$omp single !$omp single
l = .true. l = .true.
deallocate (a, b, c) deallocate (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 20 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 20
allocate (a, b(2:6), c(3:5, 3:8)) allocate (a, b(2:6), c(3:5, 3:8))
a = 7 a = 7
b = 8 b = 8
c = 9 c = 9
!$omp end single copyprivate (a, b, c) !$omp end single copyprivate (a, b, c)
if (.not.allocated (a)) STOP 21 if (.not.allocated (a)) stop 21
if (.not.allocated (b) .or. size (b) /= 5) STOP 22 if (.not.allocated (b) .or. size (b) /= 5) stop 22
if (l) then if (l) then
if (lbound (b, 1) /= 2 .or. ubound (b, 1) /= 6) STOP 23 if (lbound (b, 1) /= 2 .or. ubound (b, 1) /= 6) stop 23
else else
if (lbound (b, 1) /= 0 .or. ubound (b, 1) /= 4) STOP 24 if (lbound (b, 1) /= 0 .or. ubound (b, 1) /= 4) stop 24
end if end if
if (.not.allocated (c) .or. size (c) /= 18) STOP 25 if (.not.allocated (c) .or. size (c) /= 18) stop 25
if (size (c, 1) /= 3 .or. size (c, 2) /= 6) STOP 26 if (size (c, 1) /= 3 .or. size (c, 2) /= 6) stop 26
if (l) then if (l) then
if (lbound (c, 1) /= 3 .or. ubound (c, 1) /= 5) STOP 27 if (lbound (c, 1) /= 3 .or. ubound (c, 1) /= 5) stop 27
if (lbound (c, 2) /= 3 .or. ubound (c, 2) /= 8) STOP 28 if (lbound (c, 2) /= 3 .or. ubound (c, 2) /= 8) stop 28
else else
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 29 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 29
if (lbound (c, 2) /= 2 .or. ubound (c, 2) /= 7) STOP 30 if (lbound (c, 2) /= 2 .or. ubound (c, 2) /= 7) stop 30
end if end if
if (a /= 7 .or. any (b /= 8) .or. any (c /= 9)) STOP 31 if (a /= 7 .or. any (b /= 8) .or. any (c /= 9)) stop 31
!$omp end parallel !$omp end parallel
end end
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
integer :: n integer :: n
logical :: l logical :: l
!$omp threadprivate (a) !$omp threadprivate (a)
if (allocated (a)) STOP 1 if (allocated (a)) stop 1
call omp_set_dynamic (.false.) call omp_set_dynamic (.false.)
l = .false. l = .false.
!$omp parallel num_threads (4) reduction(.or.:l) !$omp parallel num_threads (4) reduction(.or.:l)
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
l = l.or.size(a).ne.12.or.size(a,1).ne.3.or.size(a,2).ne.4 l = l.or.size(a).ne.12.or.size(a,1).ne.3.or.size(a,2).ne.4
!$omp end parallel !$omp end parallel
if (l.or.any(a.ne.6)) STOP 1 if (l.or.any(a.ne.6)) stop 1
!$omp parallel num_threads (4) copyin (a) reduction(.or.:l) private (b) !$omp parallel num_threads (4) copyin (a) reduction(.or.:l) private (b)
l = l.or.allocated (b) l = l.or.allocated (b)
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
deallocate (b) deallocate (b)
l = l.or.allocated (b) l = l.or.allocated (b)
!$omp end parallel !$omp end parallel
if (n.lt.0 .or. n.ge.4) STOP 2 if (n.lt.0 .or. n.ge.4) stop 2
if (l.or.any(a.ne.(n + 36))) STOP 3 if (l.or.any(a.ne.(n + 36))) stop 3
!$omp parallel num_threads (4) reduction(.or.:l) !$omp parallel num_threads (4) reduction(.or.:l)
deallocate (a) deallocate (a)
l = l.or.allocated (a) l = l.or.allocated (a)
!$omp end parallel !$omp end parallel
if (l.or.allocated (a)) STOP 4 if (l.or.allocated (a)) stop 4
end end
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
integer :: i integer :: i
logical :: l logical :: l
l = .false. l = .false.
if (allocated (a)) STOP 1 if (allocated (a)) stop 1
!$omp parallel private (a) reduction (.or.:l) !$omp parallel private (a) reduction (.or.:l)
allocate (a (-7:-5)) allocate (a (-7:-5))
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
l = l.or.any (a.ne.0) l = l.or.any (a.ne.0)
deallocate (a) deallocate (a)
!$omp end parallel !$omp end parallel
if (l.or.allocated (a)) STOP 2 if (l.or.allocated (a)) stop 2
end end
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
logical :: k, l logical :: k, l
b(:, :) = 16 b(:, :) = 16
l = .false. l = .false.
if (allocated (a)) STOP 1 if (allocated (a)) stop 1
!$omp task private (a, b) shared (l) !$omp task private (a, b) shared (l)
l = l.or.allocated (a) l = l.or.allocated (a)
allocate (a(3, 6)) allocate (a(3, 6))
...@@ -18,19 +18,19 @@ ...@@ -18,19 +18,19 @@
l = l.or.allocated (a) l = l.or.allocated (a)
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
if (allocated (a).or.l) STOP 2 if (allocated (a).or.l) stop 2
allocate (a(6, 3)) allocate (a(6, 3))
a(:, :) = 3 a(:, :) = 3
if (.not.allocated (a)) STOP 3 if (.not.allocated (a)) stop 3
l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3 l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3
if (l) STOP 4 if (l) stop 4
!$omp task private (a, b) shared (l) !$omp task private (a, b) shared (l)
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
a(3, 2) = 1 a(3, 2) = 1
b(3, 2) = 1 b(3, 2) = 1
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
if (l.or..not.allocated (a)) STOP 5 if (l.or..not.allocated (a)) stop 5
!$omp task firstprivate (a, b) shared (l) !$omp task firstprivate (a, b) shared (l)
l = l.or..not.allocated (a) l = l.or..not.allocated (a)
l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3 l = l.or.size(a).ne.18.or.size(a,1).ne.6.or.size(a,2).ne.3
...@@ -43,5 +43,5 @@ ...@@ -43,5 +43,5 @@
b(:, :) = 8 b(:, :) = 8
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
if (any (a.ne.3).or.any (b.ne.16).or.l) STOP 6 if (any (a.ne.3).or.any (b.ne.16).or.l) stop 6
end end
...@@ -12,6 +12,6 @@ program pr42866 ...@@ -12,6 +12,6 @@ program pr42866
a = a + 2 a = a + 2
!$omp end sections !$omp end sections
!$omp end parallel !$omp end parallel
if (any (a.ne.3)) STOP 1 if (any (a.ne.3)) stop 1
deallocate (a) deallocate (a)
end end
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
else if (i .gt. 1 .and. i .lt. 9) then else if (i .gt. 1 .and. i .lt. 9) then
j = 7 j = 7
end if end if
if (c(i) .ne. j) STOP 1 if (c(i) .ne. j) stop 1
j = 179 - modulo (i, 11) j = 179 - modulo (i, 11)
if (i .gt. 1 .and. i .lt. 9) j = i if (i .gt. 1 .and. i .lt. 9) j = i
if (d(i) .ne. j) STOP 2 if (d(i) .ne. j) stop 2
end do end do
deallocate (a, b, c, d) deallocate (a, b, c, d)
end end
......
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
deallocate (a) deallocate (a)
l = l .or. allocated (a) l = l .or. allocated (a)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end end
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
integer, save, allocatable :: a(:, :) integer, save, allocatable :: a(:, :)
logical :: l logical :: l
!$omp threadprivate (a) !$omp threadprivate (a)
if (allocated (a)) STOP 1 if (allocated (a)) stop 1
l = .false. l = .false.
!$omp parallel copyin (a) num_threads (4) reduction(.or.:l) !$omp parallel copyin (a) num_threads (4) reduction(.or.:l)
l = l.or.allocated (a) l = l.or.allocated (a)
!$omp end parallel !$omp end parallel
if (l.or.allocated (a)) STOP 2 if (l.or.allocated (a)) stop 2
end end
...@@ -2,155 +2,155 @@ ...@@ -2,155 +2,155 @@
integer, allocatable :: a, b(:), c(:,:) integer, allocatable :: a, b(:), c(:,:)
logical :: l logical :: l
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 1 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 1
!$omp parallel private (a, b, c) !$omp parallel private (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 2 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 2
allocate (a, b(-7:-1), c(2:3, 3:5)) allocate (a, b(-7:-1), c(2:3, 3:5))
if (.not.allocated (a)) STOP 3 if (.not.allocated (a)) stop 3
if (.not.allocated (b) .or. size (b) /= 7) STOP 4 if (.not.allocated (b) .or. size (b) /= 7) stop 4
if (lbound (b, 1) /= -7 .or. ubound (b, 1) /= -1) STOP 5 if (lbound (b, 1) /= -7 .or. ubound (b, 1) /= -1) stop 5
if (.not.allocated (c) .or. size (c) /= 6) STOP 6 if (.not.allocated (c) .or. size (c) /= 6) stop 6
if (size (c, 1) /= 2 .or. size (c, 2) /= 3) STOP 7 if (size (c, 1) /= 2 .or. size (c, 2) /= 3) stop 7
if (lbound (c, 1) /= 2 .or. ubound (c, 1) /= 3) STOP 8 if (lbound (c, 1) /= 2 .or. ubound (c, 1) /= 3) stop 8
if (lbound (c, 2) /= 3 .or. ubound (c, 2) /= 5) STOP 9 if (lbound (c, 2) /= 3 .or. ubound (c, 2) /= 5) stop 9
a = 4 a = 4
b = 3 b = 3
c = 2 c = 2
!$omp end parallel !$omp end parallel
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 10 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 10
!$omp parallel firstprivate (a, b, c) !$omp parallel firstprivate (a, b, c)
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 11 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 11
allocate (a, b(-7:-1), c(2:3, 3:5)) allocate (a, b(-7:-1), c(2:3, 3:5))
if (.not.allocated (a)) STOP 12 if (.not.allocated (a)) stop 12
if (.not.allocated (b) .or. size (b) /= 7) STOP 13 if (.not.allocated (b) .or. size (b) /= 7) stop 13
if (lbound (b, 1) /= -7 .or. ubound (b, 1) /= -1) STOP 14 if (lbound (b, 1) /= -7 .or. ubound (b, 1) /= -1) stop 14
if (.not.allocated (c) .or. size (c) /= 6) STOP 15 if (.not.allocated (c) .or. size (c) /= 6) stop 15
if (size (c, 1) /= 2 .or. size (c, 2) /= 3) STOP 16 if (size (c, 1) /= 2 .or. size (c, 2) /= 3) stop 16
if (lbound (c, 1) /= 2 .or. ubound (c, 1) /= 3) STOP 17 if (lbound (c, 1) /= 2 .or. ubound (c, 1) /= 3) stop 17
if (lbound (c, 2) /= 3 .or. ubound (c, 2) /= 5) STOP 18 if (lbound (c, 2) /= 3 .or. ubound (c, 2) /= 5) stop 18
a = 4 a = 4
b = 3 b = 3
c = 2 c = 2
!$omp end parallel !$omp end parallel
if (allocated (a) .or. allocated (b) .or. allocated (c)) STOP 19 if (allocated (a) .or. allocated (b) .or. allocated (c)) stop 19
allocate (a, b(6:9), c(3, 8:9)) allocate (a, b(6:9), c(3, 8:9))
a = 2 a = 2
b = 4 b = 4
c = 5 c = 5
if (.not.allocated (a)) STOP 20 if (.not.allocated (a)) stop 20
if (.not.allocated (b) .or. size (b) /= 4) STOP 21 if (.not.allocated (b) .or. size (b) /= 4) stop 21
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 22 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 22
if (.not.allocated (c) .or. size (c) /= 6) STOP 23 if (.not.allocated (c) .or. size (c) /= 6) stop 23
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 24 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 24
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 25 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 25
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 26 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 26
!$omp parallel firstprivate (a, b, c) !$omp parallel firstprivate (a, b, c)
if (.not.allocated (a)) STOP 27 if (.not.allocated (a)) stop 27
if (.not.allocated (b) .or. size (b) /= 4) STOP 28 if (.not.allocated (b) .or. size (b) /= 4) stop 28
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 29 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 29
if (.not.allocated (c) .or. size (c) /= 6) STOP 30 if (.not.allocated (c) .or. size (c) /= 6) stop 30
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 31 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 31
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 32 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 32
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 33 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 33
if (a /= 2 .or. any (b .ne. 4) .or. any (c .ne. 5)) STOP 34 if (a /= 2 .or. any (b .ne. 4) .or. any (c .ne. 5)) stop 34
deallocate (a) deallocate (a)
if (allocated (a)) STOP 35 if (allocated (a)) stop 35
allocate (a) allocate (a)
a = 8 a = 8
b = (/ 1, 2, 3 /) b = (/ 1, 2, 3 /)
c = reshape ((/ 1, 2, 3, 4, 5, 6, 7, 8 /), (/ 2, 4 /)) c = reshape ((/ 1, 2, 3, 4, 5, 6, 7, 8 /), (/ 2, 4 /))
if (.not.allocated (a)) STOP 36 if (.not.allocated (a)) stop 36
if (.not.allocated (b) .or. size (b) /= 3) STOP 37 if (.not.allocated (b) .or. size (b) /= 3) stop 37
if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 3) STOP 38 if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 3) stop 38
if (.not.allocated (c) .or. size (c) /= 8) STOP 39 if (.not.allocated (c) .or. size (c) /= 8) stop 39
if (size (c, 1) /= 2 .or. size (c, 2) /= 4) STOP 40 if (size (c, 1) /= 2 .or. size (c, 2) /= 4) stop 40
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 2) STOP 41 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 2) stop 41
if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 4) STOP 42 if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 4) stop 42
if (a /= 8 .or. b(2) /= 2 .or. c(1, 2) /= 3) STOP 43 if (a /= 8 .or. b(2) /= 2 .or. c(1, 2) /= 3) stop 43
!$omp end parallel !$omp end parallel
if (.not.allocated (a)) STOP 44 if (.not.allocated (a)) stop 44
if (.not.allocated (b) .or. size (b) /= 4) STOP 45 if (.not.allocated (b) .or. size (b) /= 4) stop 45
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 46 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 46
if (.not.allocated (c) .or. size (c) /= 6) STOP 47 if (.not.allocated (c) .or. size (c) /= 6) stop 47
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 48 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 48
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 49 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 49
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 50 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 50
if (a /= 2 .or. any (b .ne. 4) .or. any (c .ne. 5)) STOP 51 if (a /= 2 .or. any (b .ne. 4) .or. any (c .ne. 5)) stop 51
l = .false. l = .false.
!$omp parallel sections lastprivate (a, b, c) firstprivate (l) !$omp parallel sections lastprivate (a, b, c) firstprivate (l)
!$omp section !$omp section
if (.not.allocated (a)) STOP 52 if (.not.allocated (a)) stop 52
if (l) then if (l) then
if (.not.allocated (b) .or. size (b) /= 6) STOP 53 if (.not.allocated (b) .or. size (b) /= 6) stop 53
if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 6) STOP 54 if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 6) stop 54
if (.not.allocated (c) .or. size (c) /= 8) STOP 55 if (.not.allocated (c) .or. size (c) /= 8) stop 55
if (size (c, 1) /= 4 .or. size (c, 2) /= 2) STOP 56 if (size (c, 1) /= 4 .or. size (c, 2) /= 2) stop 56
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 4) STOP 57 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 4) stop 57
if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 2) STOP 58 if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 2) stop 58
if (a /= 12 .or. b(2) /= 8 .or. c(1, 2) /= 5) STOP 59 if (a /= 12 .or. b(2) /= 8 .or. c(1, 2) /= 5) stop 59
else else
if (.not.allocated (b) .or. size (b) /= 4) STOP 60 if (.not.allocated (b) .or. size (b) /= 4) stop 60
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 61 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 61
if (.not.allocated (c) .or. size (c) /= 6) STOP 62 if (.not.allocated (c) .or. size (c) /= 6) stop 62
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 63 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 63
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 64 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 64
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 65 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 65
end if end if
l = .true. l = .true.
deallocate (a) deallocate (a)
if (allocated (a)) STOP 66 if (allocated (a)) stop 66
allocate (a) allocate (a)
a = 8 a = 8
b = (/ 1, 2, 3 /) b = (/ 1, 2, 3 /)
c = reshape ((/ 1, 2, 3, 4, 5, 6, 7, 8 /), (/ 2, 4 /)) c = reshape ((/ 1, 2, 3, 4, 5, 6, 7, 8 /), (/ 2, 4 /))
if (.not.allocated (a)) STOP 67 if (.not.allocated (a)) stop 67
if (.not.allocated (b) .or. size (b) /= 3) STOP 68 if (.not.allocated (b) .or. size (b) /= 3) stop 68
if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 3) STOP 69 if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 3) stop 69
if (.not.allocated (c) .or. size (c) /= 8) STOP 70 if (.not.allocated (c) .or. size (c) /= 8) stop 70
if (size (c, 1) /= 2 .or. size (c, 2) /= 4) STOP 71 if (size (c, 1) /= 2 .or. size (c, 2) /= 4) stop 71
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 2) STOP 72 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 2) stop 72
if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 4) STOP 73 if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 4) stop 73
if (a /= 8 .or. b(2) /= 2 .or. c(1, 2) /= 3) STOP 74 if (a /= 8 .or. b(2) /= 2 .or. c(1, 2) /= 3) stop 74
!$omp section !$omp section
if (.not.allocated (a)) STOP 75 if (.not.allocated (a)) stop 75
if (l) then if (l) then
if (.not.allocated (b) .or. size (b) /= 3) STOP 76 if (.not.allocated (b) .or. size (b) /= 3) stop 76
if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 3) STOP 77 if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 3) stop 77
if (.not.allocated (c) .or. size (c) /= 8) STOP 78 if (.not.allocated (c) .or. size (c) /= 8) stop 78
if (size (c, 1) /= 2 .or. size (c, 2) /= 4) STOP 79 if (size (c, 1) /= 2 .or. size (c, 2) /= 4) stop 79
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 2) STOP 80 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 2) stop 80
if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 4) STOP 81 if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 4) stop 81
if (a /= 8 .or. b(2) /= 2 .or. c(1, 2) /= 3) STOP 82 if (a /= 8 .or. b(2) /= 2 .or. c(1, 2) /= 3) stop 82
else else
if (.not.allocated (b) .or. size (b) /= 4) STOP 83 if (.not.allocated (b) .or. size (b) /= 4) stop 83
if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) STOP 84 if (lbound (b, 1) /= 6 .or. ubound (b, 1) /= 9) stop 84
if (.not.allocated (c) .or. size (c) /= 6) STOP 85 if (.not.allocated (c) .or. size (c) /= 6) stop 85
if (size (c, 1) /= 3 .or. size (c, 2) /= 2) STOP 86 if (size (c, 1) /= 3 .or. size (c, 2) /= 2) stop 86
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) STOP 87 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 3) stop 87
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) STOP 88 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 9) stop 88
end if end if
l = .true. l = .true.
deallocate (a) deallocate (a)
if (allocated (a)) STOP 89 if (allocated (a)) stop 89
allocate (a) allocate (a)
a = 12 a = 12
b = (/ 9, 8, 7, 6, 5, 4 /) b = (/ 9, 8, 7, 6, 5, 4 /)
c = reshape ((/ 1, 2, 3, 4, 5, 6, 7, 8 /), (/ 4, 2 /)) c = reshape ((/ 1, 2, 3, 4, 5, 6, 7, 8 /), (/ 4, 2 /))
if (.not.allocated (a)) STOP 90 if (.not.allocated (a)) stop 90
if (.not.allocated (b) .or. size (b) /= 6) STOP 91 if (.not.allocated (b) .or. size (b) /= 6) stop 91
if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 6) STOP 92 if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 6) stop 92
if (.not.allocated (c) .or. size (c) /= 8) STOP 93 if (.not.allocated (c) .or. size (c) /= 8) stop 93
if (size (c, 1) /= 4 .or. size (c, 2) /= 2) STOP 94 if (size (c, 1) /= 4 .or. size (c, 2) /= 2) stop 94
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 4) STOP 95 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 4) stop 95
if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 2) STOP 96 if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 2) stop 96
if (a /= 12 .or. b(2) /= 8 .or. c(1, 2) /= 5) STOP 97 if (a /= 12 .or. b(2) /= 8 .or. c(1, 2) /= 5) stop 97
!$omp end parallel sections !$omp end parallel sections
if (.not.allocated (a)) STOP 98 if (.not.allocated (a)) stop 98
if (.not.allocated (b) .or. size (b) /= 6) STOP 99 if (.not.allocated (b) .or. size (b) /= 6) stop 99
if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 6) STOP 100 if (lbound (b, 1) /= 1 .or. ubound (b, 1) /= 6) stop 100
if (.not.allocated (c) .or. size (c) /= 8) STOP 101 if (.not.allocated (c) .or. size (c) /= 8) stop 101
if (size (c, 1) /= 4 .or. size (c, 2) /= 2) STOP 102 if (size (c, 1) /= 4 .or. size (c, 2) /= 2) stop 102
if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 4) STOP 103 if (lbound (c, 1) /= 1 .or. ubound (c, 1) /= 4) stop 103
if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 2) STOP 104 if (lbound (c, 2) /= 1 .or. ubound (c, 2) /= 2) stop 104
if (a /= 12 .or. b(2) /= 8 .or. c(1, 2) /= 5) STOP 105 if (a /= 12 .or. b(2) /= 8 .or. c(1, 2) /= 5) stop 105
end end
...@@ -12,12 +12,12 @@ program associate1 ...@@ -12,12 +12,12 @@ program associate1
!$omp parallel private(v, a) default(none) !$omp parallel private(v, a) default(none)
v = -1 v = -1
a = 2.5 a = 2.5
if (v /= -1 .or. u /= 15) STOP 1 if (v /= -1 .or. u /= 15) stop 1
if (a(2,1) /= 2.5 .or. b /= 3.5) STOP 2 if (a(2,1) /= 2.5 .or. b /= 3.5) stop 2
associate(u => v, b => a(2, 1)) associate(u => v, b => a(2, 1))
if (u /= -1 .or. b /= 2.5) STOP 3 if (u /= -1 .or. b /= 2.5) stop 3
end associate end associate
if (u /= 15 .or. b /= 3.5) STOP 4 if (u /= 15 .or. b /= 3.5) stop 4
!$omp end parallel !$omp end parallel
end associate end associate
end program end program
...@@ -20,12 +20,12 @@ program associate2 ...@@ -20,12 +20,12 @@ program associate2
!$omp parallel private(v, a) default(none) !$omp parallel private(v, a) default(none)
v = -1 v = -1
forall (k = 1:3, l = 1:3) a(k, l)%a(:,:) = 2.5 forall (k = 1:3, l = 1:3) a(k, l)%a(:,:) = 2.5
if (v(3) /= -1 .or. u(3) /= 15) STOP 1 if (v(3) /= -1 .or. u(3) /= 15) stop 1
if (a(2,1)%a(1,2) /= 2.5 .or. b(1,2) /= 3.5) STOP 2 if (a(2,1)%a(1,2) /= 2.5 .or. b(1,2) /= 3.5) stop 2
associate(u => v, b => a(2, 1)%a) associate(u => v, b => a(2, 1)%a)
if (u(3) /= -1 .or. b(1,2) /= 2.5) STOP 3 if (u(3) /= -1 .or. b(1,2) /= 2.5) stop 3
end associate end associate
if (u(3) /= 15 .or. b(1,2) /= 3.5) STOP 4 if (u(3) /= 15 .or. b(1,2) /= 3.5) stop 4
!$omp end parallel !$omp end parallel
end associate end associate
forall (k = 1:3, l = 1:3) a(k, l)%c(:,:)%i = 7 forall (k = 1:3, l = 1:3) a(k, l)%c(:,:)%i = 7
...@@ -35,12 +35,12 @@ program associate2 ...@@ -35,12 +35,12 @@ program associate2
associate(d => a(i, j)%c(2,:)%i) associate(d => a(i, j)%c(2,:)%i)
!$omp parallel private(a) default(none) !$omp parallel private(a) default(none)
forall (k = 1:3, l = 1:3) a(k, l)%c(:,:)%i = 15 forall (k = 1:3, l = 1:3) a(k, l)%c(:,:)%i = 15
if (a(1,2)%c(2,1)%i /= 15 .or. d(1) /= 9) STOP 5 if (a(1,2)%c(2,1)%i /= 15 .or. d(1) /= 9) stop 5
if (a(1,2)%c(2,2)%i /= 15 .or. d(2) /= 7) STOP 6 if (a(1,2)%c(2,2)%i /= 15 .or. d(2) /= 7) stop 6
associate(d => a(2,1)%c(2,:)%i) associate(d => a(2,1)%c(2,:)%i)
if (d(1) /= 15 .or. d(2) /= 15) STOP 7 if (d(1) /= 15 .or. d(2) /= 15) stop 7
end associate end associate
if (d(1) /= 9 .or. d(2) /= 7) STOP 8 if (d(1) /= 9 .or. d(2) /= 7) stop 8
!$omp end parallel !$omp end parallel
end associate end associate
end program end program
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
if (j.eq.1) k = 7 if (j.eq.1) k = 7
end do end do
end associate end associate
if (any (v%f(:).ne.21.) .or. i.ne.7) STOP 1 if (any (v%f(:).ne.21.) .or. i.ne.7) stop 1
end end
...@@ -17,13 +17,13 @@ program main ...@@ -17,13 +17,13 @@ program main
i = 41 i = 41
read (20,*, asynchronous="yes") i read (20,*, asynchronous="yes") i
wait (20) wait (20)
if (i .ne. 1) STOP 1 if (i .ne. 1) stop 1
write (*,*) ' ' write (*,*) ' '
backspace (20) backspace (20)
i = 42 i = 42
read (20,*, asynchronous="yes") i read (20,*, asynchronous="yes") i
close (20) close (20)
if (i .ne. 1) STOP 2 if (i .ne. 1) stop 2
! PR libfortran/20125 ! PR libfortran/20125
open (20, status='scratch', asynchronous="yes") open (20, status='scratch', asynchronous="yes")
...@@ -31,14 +31,14 @@ program main ...@@ -31,14 +31,14 @@ program main
backspace (20) backspace (20)
read (20,*, asynchronous="yes") i read (20,*, asynchronous="yes") i
wait (20) wait (20)
if (i .ne. 7) STOP 3 if (i .ne. 7) stop 3
close (20) close (20)
open (20, status='scratch', form='unformatted') open (20, status='scratch', form='unformatted')
write (20) 8 write (20) 8
backspace (20) backspace (20)
read (20) i read (20) i
if (i .ne. 8) STOP 4 if (i .ne. 8) stop 4
close (20) close (20)
! PR libfortran/20471 ! PR libfortran/20471
...@@ -52,7 +52,7 @@ program main ...@@ -52,7 +52,7 @@ program main
read (3) (y(n),n=1,10) read (3) (y(n),n=1,10)
do n = 1, 10 do n = 1, 10
if (abs(x(n)-y(n)) > 0.00001) STOP 5 if (abs(x(n)-y(n)) > 0.00001) stop 5
end do end do
close (3) close (3)
...@@ -69,7 +69,7 @@ program main ...@@ -69,7 +69,7 @@ program main
nr = nr + 1 nr = nr + 1
goto 20 goto 20
30 continue 30 continue
if (nr .ne. 5) STOP 6 if (nr .ne. 5) stop 6
do i = 1, nr+1 do i = 1, nr+1
backspace (3) backspace (3)
...@@ -77,14 +77,14 @@ program main ...@@ -77,14 +77,14 @@ program main
do i = 1, nr do i = 1, nr
read(3,end=70,err=90) n, (x(n),n=1,10) read(3,end=70,err=90) n, (x(n),n=1,10)
if (abs(x(1) - i) .gt. 0.001) STOP 7 if (abs(x(1) - i) .gt. 0.001) stop 7
end do end do
close (3) close (3)
stop stop
70 continue 70 continue
STOP 8 stop 8
90 continue 90 continue
STOP 9 stop 9
end program end program
...@@ -20,20 +20,20 @@ close(99) ...@@ -20,20 +20,20 @@ close(99)
! Test character kind ! Test character kind
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) cvar read (99,*, iostat=stat) cvar
if (stat /= 0 .or. cvar /= "1") STOP 1 if (stat /= 0 .or. cvar /= "1") stop 1
read (99,*, iostat=stat) cvar read (99,*, iostat=stat) cvar
if (stat /= 0 .or. cvar /= "2") STOP 2 if (stat /= 0 .or. cvar /= "2") stop 2
read (99,*, iostat=stat) cvar ! << FAILS: stat /= 0 read (99,*, iostat=stat) cvar ! << FAILS: stat /= 0
if (stat /= 0 .or. cvar /= "3") STOP 3 ! << aborts here if (stat /= 0 .or. cvar /= "3") stop 3 ! << aborts here
! Test real kind ! Test real kind
rewind(99) rewind(99)
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0 .or. var /= 1.0) STOP 4 if (stat /= 0 .or. var /= 1.0) stop 4
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0 .or. var /= 2.0) STOP 5 if (stat /= 0 .or. var /= 2.0) stop 5
read (99,*, iostat=stat) var ! << FAILS: stat /= 0 read (99,*, iostat=stat) var ! << FAILS: stat /= 0
if (stat /= 0 .or. var /= 3.0) STOP 6 if (stat /= 0 .or. var /= 3.0) stop 6
close(99, status="delete") close(99, status="delete")
! Test real kind with exponents ! Test real kind with exponents
...@@ -45,11 +45,11 @@ close(99) ...@@ -45,11 +45,11 @@ close(99)
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 7 if (stat /= 0) stop 7
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 8 if (stat /= 0) stop 8
read (99,*) var ! << FAILS: stat /= 0 read (99,*) var ! << FAILS: stat /= 0
if (stat /= 0) STOP 9 if (stat /= 0) stop 9
close(99, status="delete") close(99, status="delete")
! Test logical kind ! Test logical kind
...@@ -61,11 +61,11 @@ close(99) ...@@ -61,11 +61,11 @@ close(99)
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) lvar read (99,*, iostat=stat) lvar
if (stat /= 0 .or. (.not.lvar)) STOP 10 if (stat /= 0 .or. (.not.lvar)) stop 10
read (99,*, iostat=stat) lvar read (99,*, iostat=stat) lvar
if (stat /= 0 .or. lvar) STOP 11 if (stat /= 0 .or. lvar) stop 11
read (99,*) lvar ! << FAILS: stat /= 0 read (99,*) lvar ! << FAILS: stat /= 0
if (stat /= 0 .or. (.not.lvar)) STOP 12 if (stat /= 0 .or. (.not.lvar)) stop 12
close(99, status="delete") close(99, status="delete")
! Test combinations of Inf and Nan ! Test combinations of Inf and Nan
...@@ -77,11 +77,11 @@ close(99) ...@@ -77,11 +77,11 @@ close(99)
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 13 if (stat /= 0) stop 13
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 14 if (stat /= 0) stop 14
read (99,*) var ! << FAILS: stat /= 0 read (99,*) var ! << FAILS: stat /= 0
if (stat /= 0) STOP 1! << aborts here if (stat /= 0) stop 1! << aborts here
close(99, status="delete") close(99, status="delete")
open(99, file="test.dat", access="stream", form="unformatted", status="new") open(99, file="test.dat", access="stream", form="unformatted", status="new")
...@@ -92,11 +92,11 @@ close(99) ...@@ -92,11 +92,11 @@ close(99)
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 15 if (stat /= 0) stop 15
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 16 if (stat /= 0) stop 16
read (99,*) var ! << FAILS: stat /= 0 read (99,*) var ! << FAILS: stat /= 0
if (stat /= 0) STOP 2! << aborts here if (stat /= 0) stop 2! << aborts here
close(99, status="delete") close(99, status="delete")
open(99, file="test.dat", access="stream", form="unformatted", status="new") open(99, file="test.dat", access="stream", form="unformatted", status="new")
...@@ -107,11 +107,11 @@ close(99) ...@@ -107,11 +107,11 @@ close(99)
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 17 if (stat /= 0) stop 17
read (99,*, iostat=stat) var read (99,*, iostat=stat) var
if (stat /= 0) STOP 18 if (stat /= 0) stop 18
read (99,*) var ! << FAILS: stat /= 0 read (99,*) var ! << FAILS: stat /= 0
if (stat /= 0) STOP 3! << aborts here if (stat /= 0) stop 3! << aborts here
close(99, status="delete") close(99, status="delete")
! Test complex kind ! Test complex kind
...@@ -123,10 +123,10 @@ close(99) ...@@ -123,10 +123,10 @@ close(99)
open(99, file="test.dat") open(99, file="test.dat")
read (99,*, iostat=stat) cval read (99,*, iostat=stat) cval
if (stat /= 0 .or. cval /= cmplx(1,2)) STOP 19 if (stat /= 0 .or. cval /= cmplx(1,2)) stop 19
read (99,*, iostat=stat) cval read (99,*, iostat=stat) cval
if (stat /= 0 .or. cval /= cmplx(2,3)) STOP 20 if (stat /= 0 .or. cval /= cmplx(2,3)) stop 20
read (99,*, iostat=stat) cval ! << FAILS: stat /= 0, value is okay read (99,*, iostat=stat) cval ! << FAILS: stat /= 0, value is okay
if (stat /= 0 .or. cval /= cmplx(4,5)) STOP 21 if (stat /= 0 .or. cval /= cmplx(4,5)) stop 21
close(99, status="delete") close(99, status="delete")
end end
...@@ -17,12 +17,12 @@ program flush_1 ...@@ -17,12 +17,12 @@ program flush_1
write (10, *) 42 write (10, *) 42
flush(unit=10, iostat=ios) flush(unit=10, iostat=ios)
if (ios /= 0) STOP 1 if (ios /= 0) stop 1
write (10, *) 42 write (10, *) 42
flush (unit=10, err=20) flush (unit=10, err=20)
goto 30 goto 30
20 STOP 2 20 stop 2
30 continue 30 continue
call flush(10) call flush(10)
......
...@@ -16,7 +16,7 @@ program newunit_1 ...@@ -16,7 +16,7 @@ program newunit_1
rewind(myunit) rewind(myunit)
rewind(myunit2) rewind(myunit2)
read(myunit2,'(a)') str read(myunit2,'(a)') str
if (str.ne." abcdefghijklmnop") STOP 1 if (str.ne." abcdefghijklmnop") stop 1
close(myunit) close(myunit)
close(myunit2, status="delete") close(myunit2, status="delete")
end program newunit_1 end program newunit_1
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
!$omp do !$omp do
do i = 0, 999 do i = 0, 999
!$omp cancel do !$omp cancel do
if (omp_get_cancellation ()) STOP 1 if (omp_get_cancellation ()) stop 1
enddo enddo
!$omp endparallel !$omp endparallel
end end
...@@ -22,7 +22,7 @@ contains ...@@ -22,7 +22,7 @@ contains
!$omp do !$omp do
do i = 0, 999 do i = 0, 999
!$omp cancel do if (x(1)) !$omp cancel do if (x(1))
STOP 1 stop 1
end do end do
!$omp do !$omp do
do i = 0, 999 do i = 0, 999
...@@ -47,7 +47,7 @@ contains ...@@ -47,7 +47,7 @@ contains
end do end do
!$omp end do !$omp end do
!$omp end parallel !$omp end parallel
if (v.ne.3000.or.w.ne.0) STOP 2 if (v.ne.3000.or.w.ne.0) stop 2
!$omp parallel num_threads (32) shared (v, w) !$omp parallel num_threads (32) shared (v, w)
! None of these cancel directives should actually cancel anything, ! None of these cancel directives should actually cancel anything,
! but the compiler shouldn't know that and thus should use cancellable ! but the compiler shouldn't know that and thus should use cancellable
...@@ -56,7 +56,7 @@ contains ...@@ -56,7 +56,7 @@ contains
!$omp do !$omp do
do i = 0, 999 do i = 0, 999
!$omp cancel do if (x(1)) !$omp cancel do if (x(1))
STOP 3 stop 3
end do end do
!$omp cancel parallel if (omp_get_thread_num ().eq.2.and.x(5)) !$omp cancel parallel if (omp_get_thread_num ().eq.2.and.x(5))
!$omp do !$omp do
...@@ -85,6 +85,6 @@ contains ...@@ -85,6 +85,6 @@ contains
!$omp end do !$omp end do
!$omp cancel parallel if (omp_get_thread_num ().eq.5.and.x(5)) !$omp cancel parallel if (omp_get_thread_num ().eq.5.and.x(5))
!$omp end parallel !$omp end parallel
if (v.ne.6000.or.w.ne.0) STOP 4 if (v.ne.6000.or.w.ne.0) stop 4
end subroutine end subroutine
end end
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
!$omp parallel num_threads(32) !$omp parallel num_threads(32)
!$omp cancel parallel !$omp cancel parallel
if (omp_get_cancellation ()) STOP 1 if (omp_get_cancellation ()) stop 1
!$omp end parallel !$omp end parallel
end end
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
!$omp parallel num_threads(32) !$omp parallel num_threads(32)
!$omp sections !$omp sections
!$omp cancel sections !$omp cancel sections
STOP 1 stop 1
!$omp section !$omp section
!$omp cancel sections !$omp cancel sections
STOP 2 stop 2
!$omp section !$omp section
!$omp cancel sections !$omp cancel sections
STOP 3 stop 3
!$omp section !$omp section
!$omp cancel sections !$omp cancel sections
STOP 4 stop 4
!$omp end sections !$omp end sections
!$omp end parallel !$omp end parallel
end if end if
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
!$omp taskgroup !$omp taskgroup
!$omp task !$omp task
!$omp cancel taskgroup !$omp cancel taskgroup
STOP 1 stop 1
!$omp endtask !$omp endtask
!$omp endtaskgroup !$omp endtaskgroup
!$omp endparallel !$omp endparallel
......
...@@ -67,6 +67,6 @@ contains ...@@ -67,6 +67,6 @@ contains
l = l .or. f .ne. 'YY' .or. p .ne. 'm3' .or. r .ne. 'M3' l = l .or. f .ne. 'YY' .or. p .ne. 'm3' .or. r .ne. 'M3'
end if end if
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine test end subroutine test
end end
...@@ -56,6 +56,6 @@ contains ...@@ -56,6 +56,6 @@ contains
l = l .or. t .ne. '456' l = l .or. t .ne. '456'
end if end if
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine test end subroutine test
end end
...@@ -22,5 +22,5 @@ program collapse1 ...@@ -22,5 +22,5 @@ program collapse1
end do end do
end do end do
!$omp end parallel do !$omp end parallel do
if (l) STOP 1 if (l) stop 1
end program collapse1 end program collapse1
...@@ -25,7 +25,7 @@ firstdo: do i = 1, 3 ...@@ -25,7 +25,7 @@ firstdo: do i = 1, 3
end do end do
end do firstdo end do firstdo
!$omp end parallel do !$omp end parallel do
if (l) STOP 1 if (l) stop 1
end subroutine test1 end subroutine test1
subroutine test2 subroutine test2
...@@ -38,7 +38,7 @@ firstdo: do i = 1, 3 ...@@ -38,7 +38,7 @@ firstdo: do i = 1, 3
enddo enddo
enddo dokk enddo dokk
115 continue 115 continue
if (any(a(1:3,1:3,1:3).ne.1)) STOP 2 if (any(a(1:3,1:3,1:3).ne.1)) stop 2
!$omp do collapse(3) !$omp do collapse(3)
dol: do 120 l=1,3 dol: do 120 l=1,3
...@@ -48,7 +48,7 @@ firstdo: do i = 1, 3 ...@@ -48,7 +48,7 @@ firstdo: do i = 1, 3
enddo enddo
enddo doll enddo doll
120 end do dol 120 end do dol
if (any(a(1:3,1:3,1:3).ne.2)) STOP 3 if (any(a(1:3,1:3,1:3).ne.2)) stop 3
end subroutine test2 end subroutine test2
end program collapse2 end program collapse2
...@@ -24,8 +24,8 @@ contains ...@@ -24,8 +24,8 @@ contains
end do end do
end do end do
end do end do
if (i.ne.7.or.j.ne.5.or.k.ne.19) STOP 1 if (i.ne.7.or.j.ne.5.or.k.ne.19) stop 1
if (m.ne.(600+40+18)) STOP 2 if (m.ne.(600+40+18)) stop 2
do i = 1, 7 do i = 1, 7
do j = -3, 5 do j = -3, 5
do k = 12, 19 do k = 12, 19
...@@ -56,8 +56,8 @@ contains ...@@ -56,8 +56,8 @@ contains
end do end do
end do end do
end do end do
if (i.ne.7.or.j.ne.5.or.k.ne.19) STOP 3 if (i.ne.7.or.j.ne.5.or.k.ne.19) stop 3
if (m.ne.(600+40+18)) STOP 4 if (m.ne.(600+40+18)) stop 4
do i = 1, 7 do i = 1, 7
do j = -3, 5 do j = -3, 5
do k = 12, 19 do k = 12, 19
...@@ -88,8 +88,8 @@ contains ...@@ -88,8 +88,8 @@ contains
end do end do
end do end do
end do end do
if (i.ne.7.or.j.ne.5.or.k.ne.19) STOP 5 if (i.ne.7.or.j.ne.5.or.k.ne.19) stop 5
if (m.ne.(600+40+18)) STOP 6 if (m.ne.(600+40+18)) stop 6
do i = 1, 7 do i = 1, 7
do j = -3, 5 do j = -3, 5
do k = 12, 19 do k = 12, 19
...@@ -120,8 +120,8 @@ contains ...@@ -120,8 +120,8 @@ contains
end do end do
end do end do
end do end do
if (i.ne.7.or.j.ne.5.or.k.ne.19) STOP 7 if (i.ne.7.or.j.ne.5.or.k.ne.19) stop 7
if (m.ne.(600+40+18)) STOP 8 if (m.ne.(600+40+18)) stop 8
do i = 1, 7 do i = 1, 7
do j = -3, 5 do j = -3, 5
do k = 12, 19 do k = 12, 19
...@@ -153,8 +153,8 @@ contains ...@@ -153,8 +153,8 @@ contains
end do end do
end do end do
end do end do
if (i.ne.7.or.j.ne.5.or.k.ne.19) STOP 9 if (i.ne.7.or.j.ne.5.or.k.ne.19) stop 9
if (m.ne.(600+40+18)) STOP 10 if (m.ne.(600+40+18)) stop 10
do i = 1, 7 do i = 1, 7
do j = -3, 5 do j = -3, 5
do k = 12, 19 do k = 12, 19
...@@ -186,8 +186,8 @@ contains ...@@ -186,8 +186,8 @@ contains
end do end do
end do end do
end do end do
if (i.ne.7.or.j.ne.5.or.k.ne.19) STOP 11 if (i.ne.7.or.j.ne.5.or.k.ne.19) stop 11
if (m.ne.(600+40+18)) STOP 12 if (m.ne.(600+40+18)) stop 12
do i = 1, 7 do i = 1, 7
do j = -3, 5 do j = -3, 5
do k = 12, 19 do k = 12, 19
......
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
end do end do
end do end do
end do end do
if (i .ne. 18 .or. j .ne. 7 .or. k .ne. 6) STOP 1 if (i .ne. 18 .or. j .ne. 7 .or. k .ne. 6) stop 1
end end
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
l = l .or. p .ne. 3 l = l .or. p .ne. 3
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
l = .false. l = .false.
!$omp parallel num_threads (2) reduction (.or.:l) default (private) !$omp parallel num_threads (2) reduction (.or.:l) default (private)
...@@ -41,6 +41,6 @@ ...@@ -41,6 +41,6 @@
l = l .or. p .ne. 3 * omp_get_thread_num () + 5 l = l .or. p .ne. 3 * omp_get_thread_num () + 5
!$omp end parallel !$omp end parallel
if (l) STOP 2 if (l) stop 2
end end
...@@ -27,5 +27,5 @@ ...@@ -27,5 +27,5 @@
l = l .or. (p .ne. d + 1) l = l .or. (p .ne. d + 1)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end end
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
l = l .or. (p .ne. (2 + omp_get_thread_num ())) l = l .or. (p .ne. (2 + omp_get_thread_num ()))
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
l = .false. l = .false.
ip = loc (a) ip = loc (a)
...@@ -31,6 +31,6 @@ ...@@ -31,6 +31,6 @@
l = l .or. (p .ne. (2 + i)) l = l .or. (p .ne. (2 + i))
end do end do
if (l) STOP 2 if (l) stop 2
if (p .ne. 3) STOP 3 if (p .ne. 3) stop 3
end end
...@@ -61,7 +61,7 @@ end module declare_simd_1_mod ...@@ -61,7 +61,7 @@ end module declare_simd_1_mod
do i = 1, 128 do i = 1, 128
b(i) = bar (a(i), 2 * i, b(i)) b(i) = bar (a(i), 2 * i, b(i))
end do end do
if (any (b.ne.d)) STOP 1 if (any (b.ne.d)) stop 1
!$omp simd !$omp simd
do i = 1, 128 do i = 1, 128
b(i) = i * 2.0 b(i) = i * 2.0
...@@ -71,7 +71,7 @@ end module declare_simd_1_mod ...@@ -71,7 +71,7 @@ end module declare_simd_1_mod
b(i) = baz (7.0_8, 2, b(i)) b(i) = baz (7.0_8, 2, b(i))
end do end do
do i = 1, 128 do i = 1, 128
if (b(i).ne.(7.0 + 4.0 * i)) STOP 2 if (b(i).ne.(7.0 + 4.0 * i)) stop 2
end do end do
contains contains
function baz (x, y, z) function baz (x, y, z)
......
...@@ -17,6 +17,6 @@ subroutine bar ...@@ -17,6 +17,6 @@ subroutine bar
b(i) = foo (7.0_8, 5 * i, b(i)) b(i) = foo (7.0_8, 5 * i, b(i))
end do end do
do i = 1, 128 do i = 1, 128
if (b(i).ne.(7.0 + 10.0 * i * i)) STOP 1 if (b(i).ne.(7.0 + 10.0 * i * i)) stop 1
end do end do
end subroutine bar end subroutine bar
...@@ -14,5 +14,5 @@ subroutine foo ...@@ -14,5 +14,5 @@ subroutine foo
!$omp end target !$omp end target
!$omp target update from(var_x) !$omp target update from(var_x)
if (var_x /= 20) STOP 1 if (var_x /= 20) stop 1
end subroutine foo end subroutine foo
...@@ -21,7 +21,7 @@ contains ...@@ -21,7 +21,7 @@ contains
x = 2 x = 2
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 1 if (x.ne.2) stop 1
!$omp end task !$omp end task
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
...@@ -36,7 +36,7 @@ contains ...@@ -36,7 +36,7 @@ contains
x = 2 x = 2
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 2 if (x.ne.2) stop 2
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
!$omp end single !$omp end single
...@@ -52,7 +52,7 @@ contains ...@@ -52,7 +52,7 @@ contains
x = 2 x = 2
!$omp endtask !$omp endtask
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 3 if (x.ne.2) stop 3
!$omp endtask !$omp endtask
!$omp endsingle !$omp endsingle
!$omp endparallel !$omp endparallel
...@@ -67,7 +67,7 @@ contains ...@@ -67,7 +67,7 @@ contains
x = 2 x = 2
!$omp end task !$omp end task
!$omp task depend(in: x) !$omp task depend(in: x)
if (x.ne.1) STOP 4 if (x.ne.1) stop 4
!$omp end task !$omp end task
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
...@@ -79,7 +79,7 @@ contains ...@@ -79,7 +79,7 @@ contains
!$omp parallel !$omp parallel
!$omp single !$omp single
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x.ne.1) STOP 5 if (x.ne.1) stop 5
!$omp end task !$omp end task
!$omp task shared(x) depend(out: x) !$omp task shared(x) depend(out: x)
x = 2 x = 2
...@@ -95,7 +95,7 @@ contains ...@@ -95,7 +95,7 @@ contains
x = 1 x = 1
!$omp taskgroup !$omp taskgroup
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x.ne.1) STOP 6 if (x.ne.1) stop 6
!$omp end task !$omp end task
!$omp task shared(x) depend(out: x) !$omp task shared(x) depend(out: x)
x = 2 x = 2
...@@ -111,7 +111,7 @@ contains ...@@ -111,7 +111,7 @@ contains
x = 1 x = 1
!$omp single !$omp single
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x.ne.1) STOP 7 if (x.ne.1) stop 7
!$omp end task !$omp end task
!$omp task shared(x) depend(out: x) !$omp task shared(x) depend(out: x)
x = 2 x = 2
...@@ -132,7 +132,7 @@ contains ...@@ -132,7 +132,7 @@ contains
x = 2 x = 2
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
if (x.ne.2) STOP 8 if (x.ne.2) stop 8
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
end subroutine outdep end subroutine outdep
...@@ -146,13 +146,13 @@ contains ...@@ -146,13 +146,13 @@ contains
x = 2 x = 2
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 9 if (x.ne.2) stop 9
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 10 if (x.ne.2) stop 10
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 11 if (x.ne.2) stop 11
!$omp end task !$omp end task
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
...@@ -167,13 +167,13 @@ contains ...@@ -167,13 +167,13 @@ contains
x = 2; x = 2;
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 12 if (x.ne.2) stop 12
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 13 if (x.ne.2) stop 13
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 14 if (x.ne.2) stop 14
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
!$omp end single !$omp end single
...@@ -189,13 +189,13 @@ contains ...@@ -189,13 +189,13 @@ contains
x = 2 x = 2
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 15 if (x.ne.2) stop 15
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 16 if (x.ne.2) stop 16
!$omp end task !$omp end task
!$omp task shared (x) depend(in: x) !$omp task shared (x) depend(in: x)
if (x.ne.2) STOP 17 if (x.ne.2) stop 17
!$omp end task !$omp end task
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
!$omp single !$omp single
!$omp taskgroup !$omp taskgroup
!$omp task depend(in: x(:, :)) !$omp task depend(in: x(:, :))
if (y.ne.1) STOP 1 if (y.ne.1) stop 1
!$omp end task !$omp end task
!$omp task depend(out: x(:, :)) !$omp task depend(out: x(:, :))
y = 2 y = 2
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
!$omp end taskgroup !$omp end taskgroup
!$omp taskgroup !$omp taskgroup
!$omp task depend(in: x(4, 7)) !$omp task depend(in: x(4, 7))
if (y.ne.2) STOP 2 if (y.ne.2) stop 2
!$omp end task !$omp end task
!$omp task depend(out: x(4:4, 7:7)) !$omp task depend(out: x(4:4, 7:7))
y = 3 y = 3
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
!$omp end taskgroup !$omp end taskgroup
!$omp taskgroup !$omp taskgroup
!$omp task depend(in: x(4:, 8:)) !$omp task depend(in: x(4:, 8:))
if (y.ne.3) STOP 3 if (y.ne.3) stop 3
!$omp end task !$omp end task
!$omp task depend(out: x(4:6, 8:12)) !$omp task depend(out: x(4:6, 8:12))
y = 4 y = 4
...@@ -30,5 +30,5 @@ ...@@ -30,5 +30,5 @@
!$omp end taskgroup !$omp end taskgroup
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
if (y.ne.4) STOP 4 if (y.ne.4) stop 4
end end
...@@ -13,7 +13,7 @@ contains ...@@ -13,7 +13,7 @@ contains
!$omp single !$omp single
!$omp taskgroup !$omp taskgroup
!$omp task depend(in: x) !$omp task depend(in: x)
if (y.ne.1) STOP 1 if (y.ne.1) stop 1
!$omp end task !$omp end task
!$omp task depend(out: x(1:2, 1:3)) !$omp task depend(out: x(1:2, 1:3))
y = 2 y = 2
...@@ -21,7 +21,7 @@ contains ...@@ -21,7 +21,7 @@ contains
!$omp end taskgroup !$omp end taskgroup
!$omp taskgroup !$omp taskgroup
!$omp task depend(in: z) !$omp task depend(in: z)
if (y.ne.2) STOP 2 if (y.ne.2) stop 2
!$omp end task !$omp end task
!$omp task depend(out: z(-2:3, 2:4)) !$omp task depend(out: z(-2:3, 2:4))
y = 3 y = 3
...@@ -29,7 +29,7 @@ contains ...@@ -29,7 +29,7 @@ contains
!$omp end taskgroup !$omp end taskgroup
!$omp taskgroup !$omp taskgroup
!$omp task depend(in: x) !$omp task depend(in: x)
if (y.ne.3) STOP 3 if (y.ne.3) stop 3
!$omp end task !$omp end task
!$omp task depend(out: x(1:, 1:)) !$omp task depend(out: x(1:, 1:))
y = 4 y = 4
...@@ -37,6 +37,6 @@ contains ...@@ -37,6 +37,6 @@ contains
!$omp end taskgroup !$omp end taskgroup
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
if (y.ne.4) STOP 4 if (y.ne.4) stop 4
end subroutine end subroutine
end end
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b)) STOP 1 if (any (a .ne. b)) stop 1
a = -1 a = -1
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b)) STOP 2 if (any (a .ne. b)) stop 2
a = -1 a = -1
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b)) STOP 3 if (any (a .ne. b)) stop 3
a = -1 a = -1
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b)) STOP 4 if (any (a .ne. b)) stop 4
a = -1 a = -1
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
...@@ -175,5 +175,5 @@ ...@@ -175,5 +175,5 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b)) STOP 5 if (any (a .ne. b)) stop 5
end end
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b) .or. k) STOP 1 if (any (a .ne. b) .or. k) stop 1
a = -1 a = -1
k = .false. k = .false.
j = 8 j = 8
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b) .or. k) STOP 2 if (any (a .ne. b) .or. k) stop 2
a = -1 a = -1
k = .false. k = .false.
j = 8 j = 8
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b) .or. k) STOP 3 if (any (a .ne. b) .or. k) stop 3
a = -1 a = -1
k = .false. k = .false.
j = 8 j = 8
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b) .or. k) STOP 4 if (any (a .ne. b) .or. k) stop 4
a = -1 a = -1
k = .false. k = .false.
j = 8 j = 8
...@@ -362,5 +362,5 @@ ...@@ -362,5 +362,5 @@
!$omp end parallel !$omp end parallel
if (any (a .ne. b) .or. k) STOP 5 if (any (a .ne. b) .or. k) stop 5
end end
...@@ -33,7 +33,7 @@ program main ...@@ -33,7 +33,7 @@ program main
do concurrent (i = 1:nsplit) do concurrent (i = 1:nsplit)
pi(i) = sum(compute( low(i), high(i) )) pi(i) = sum(compute( low(i), high(i) ))
end do end do
if (abs (sum(pi) - atan(1.0d0)) > 1e-5) STOP 1 if (abs (sum(pi) - atan(1.0d0)) > 1e-5) stop 1
contains contains
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
if (i.gt.1) then if (i.gt.1) then
!$omp atomic read !$omp atomic read
l = a(i - 1) l = a(i - 1)
if (l.lt.2) STOP 1 if (l.lt.2) stop 1
end if end if
!$omp atomic write !$omp atomic write
a(i) = 2 a(i) = 2
if (i.lt.N) then if (i.lt.N) then
!$omp atomic read !$omp atomic read
l = a(i + 1) l = a(i + 1)
if (l.eq.3) STOP 2 if (l.eq.3) stop 2
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -43,19 +43,19 @@ ...@@ -43,19 +43,19 @@
if (j.gt.2.and.k.gt.2) then if (j.gt.2.and.k.gt.2) then
!$omp atomic read !$omp atomic read
l = b(i,j-2,k-1) l = b(i,j-2,k-1)
if (l.lt.2) STOP 3 if (l.lt.2) stop 3
end if end if
!$omp atomic write !$omp atomic write
b(i,j,k) = 2 b(i,j,k) = 2
if (i.gt.4.and.j.gt.2.and.k.lt.4) then if (i.gt.4.and.j.gt.2.and.k.lt.4) then
!$omp atomic read !$omp atomic read
l = b(i-2,j-2, k+1) l = b(i-2,j-2, k+1)
if (l.lt.2) STOP 4 if (l.lt.2) stop 4
end if end if
if (i.gt.5.and.j.le.N/16-3.and.k.eq.4) then if (i.gt.5.and.j.le.N/16-3.and.k.eq.4) then
!$omp atomic read !$omp atomic read
l = b( i - 3, j+2, k-2) l = b( i - 3, j+2, k-2)
if (l.lt.2) STOP 5 if (l.lt.2) stop 5
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -94,19 +94,19 @@ ...@@ -94,19 +94,19 @@
if (k.le.5) then if (k.le.5) then
!$omp atomic read !$omp atomic read
l = c(i, j, k + 2) l = c(i, j, k + 2)
if (l.lt.2) STOP 6 if (l.lt.2) stop 6
end if end if
!$omp atomic write !$omp atomic write
c(i, j, k) = 2 c(i, j, k) = 2
if (i.ge.3.and.j.lt.8.and.k.ge.5) then if (i.ge.3.and.j.lt.8.and.k.ge.5) then
!$omp atomic read !$omp atomic read
l = c(i - 2, j + 1, k - 4) l = c(i - 2, j + 1, k - 4)
if (l.lt.2) STOP 7 if (l.lt.2) stop 7
end if end if
if (i.ge.2.and.j.ge.5.and.k.ge.3) then if (i.ge.2.and.j.ge.5.and.k.ge.3) then
!$omp atomic read !$omp atomic read
l = c(i - 1, j - 2, k - 2) l = c(i - 1, j - 2, k - 2)
if (l.lt.2) STOP 8 if (l.lt.2) stop 8
end if end if
!$omp ordered depend ( source ) !$omp ordered depend ( source )
!$omp atomic write !$omp atomic write
...@@ -137,13 +137,13 @@ ...@@ -137,13 +137,13 @@
do l = 0, d + 1 do l = 0, d + 1
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i-2,j+2,k-2,l) !$omp ordered depend(sink: i-2,j+2,k-2,l)
if (e.eq.0) STOP 9 if (e.eq.0) stop 9
end do end do
end do end do
end do end do
end do end do
!$omp single !$omp single
if (i.ne.1.or.j.ne.-1.or.k.ne.0) STOP 10 if (i.ne.1.or.j.ne.-1.or.k.ne.0) stop 10
i = 8; j = 9; k = 10 i = 8; j = 9; k = 10
!$omp end single !$omp end single
!$omp do ordered(4) collapse(2) lastprivate (i, j, k, m) !$omp do ordered(4) collapse(2) lastprivate (i, j, k, m)
...@@ -153,13 +153,13 @@ ...@@ -153,13 +153,13 @@
do m = 0, d-1 do m = 0, d-1
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i - 2, j + 2, k - 2, m) !$omp ordered depend(sink: i - 2, j + 2, k - 2, m)
STOP 11 stop 11
end do end do
end do end do
end do end do
end do end do
!$omp single !$omp single
if (i.ne.1.or.j.ne.-1.or.k.ne.2.or.m.ne.0) STOP 12 if (i.ne.1.or.j.ne.-1.or.k.ne.2.or.m.ne.0) stop 12
!$omp end single !$omp end single
!$omp do collapse(2) ordered(4) lastprivate (i,j,k) !$omp do collapse(2) ordered(4) lastprivate (i,j,k)
do i = 0, d do i = 0, d
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
do l = 0, d + 3 do l = 0, d + 3
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i-2,j+2,k-2,l) !$omp ordered depend(sink: i-2,j+2,k-2,l)
if (e.eq.0) STOP 13 if (e.eq.0) stop 13
end do end do
end do end do
end do end do
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
!$omp end do nowait !$omp end do nowait
!$omp do !$omp do
do i = 1, N do i = 1, N
if (a(i) .ne. 3) STOP 14 if (a(i) .ne. 3) stop 14
end do end do
!$omp end do nowait !$omp end do nowait
!$omp do collapse(2) private(k) !$omp do collapse(2) private(k)
...@@ -184,9 +184,9 @@ ...@@ -184,9 +184,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 4 do k = 1, 4
if (i.ge.3.and.i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.2) then if (i.ge.3.and.i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.2) then
if (b(i,j,k).ne.3) STOP 15 if (b(i,j,k).ne.3) stop 15
else else
if (b(i,j,k).ne.0) STOP 16 if (b(i,j,k).ne.0) stop 16
end if end if
end do end do
end do end do
...@@ -197,9 +197,9 @@ ...@@ -197,9 +197,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 4 do k = 1, 4
if (j.ge.3.and.iand(k,1).ne.0) then if (j.ge.3.and.iand(k,1).ne.0) then
if (c(i,j,k).ne.3) STOP 17 if (c(i,j,k).ne.3) stop 17
else else
if (c(i,j,k).ne.0) STOP 18 if (c(i,j,k).ne.0) stop 18
end if end if
end do end do
end do end do
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
if (i.gt.2) then if (i.gt.2) then
!$omp atomic read !$omp atomic read
l = a(i - 1) l = a(i - 1)
if (l.lt.2) STOP 1 if (l.lt.2) stop 1
end if end if
!$omp atomic write !$omp atomic write
a(i) = 2 a(i) = 2
if (i.lt.N) then if (i.lt.N) then
!$omp atomic read !$omp atomic read
l = a(i + 1) l = a(i + 1)
if (l.eq.3) STOP 2 if (l.eq.3) stop 2
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -46,19 +46,19 @@ ...@@ -46,19 +46,19 @@
if (j.gt.2.and.k.gt.2) then if (j.gt.2.and.k.gt.2) then
!$omp atomic read !$omp atomic read
l = b(i,j-2,k-1) l = b(i,j-2,k-1)
if (l.lt.2) STOP 3 if (l.lt.2) stop 3
end if end if
!$omp atomic write !$omp atomic write
b(i,j,k) = 2 b(i,j,k) = 2
if (i.gt.5.and.j.gt.2.and.k.lt.4) then if (i.gt.5.and.j.gt.2.and.k.lt.4) then
!$omp atomic read !$omp atomic read
l = b(i-2,j-2, k+1) l = b(i-2,j-2, k+1)
if (l.lt.2) STOP 4 if (l.lt.2) stop 4
end if end if
if (i.gt.6.and.j.le.N/16-3.and.k.eq.4) then if (i.gt.6.and.j.le.N/16-3.and.k.eq.4) then
!$omp atomic read !$omp atomic read
l = b( i - 3, j+2, k-2) l = b( i - 3, j+2, k-2)
if (l.lt.2) STOP 5 if (l.lt.2) stop 5
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -97,19 +97,19 @@ ...@@ -97,19 +97,19 @@
if (k.le.5) then if (k.le.5) then
!$omp atomic read !$omp atomic read
l = c(i, j, k + 2) l = c(i, j, k + 2)
if (l.lt.2) STOP 6 if (l.lt.2) stop 6
end if end if
!$omp atomic write !$omp atomic write
c(i, j, k) = 2 c(i, j, k) = 2
if (i.ge.5.and.j.lt.8.and.k.ge.5) then if (i.ge.5.and.j.lt.8.and.k.ge.5) then
!$omp atomic read !$omp atomic read
l = c(i - 2, j + 1, k - 4) l = c(i - 2, j + 1, k - 4)
if (l.lt.2) STOP 7 if (l.lt.2) stop 7
end if end if
if (i.ge.4.and.j.ge.5.and.k.ge.3) then if (i.ge.4.and.j.ge.5.and.k.ge.3) then
!$omp atomic read !$omp atomic read
l = c(i - 1, j - 2, k - 2) l = c(i - 1, j - 2, k - 2)
if (l.lt.2) STOP 8 if (l.lt.2) stop 8
end if end if
!$omp ordered depend ( source ) !$omp ordered depend ( source )
!$omp atomic write !$omp atomic write
...@@ -145,19 +145,19 @@ ...@@ -145,19 +145,19 @@
if (k.gt.2.and.i.gt.4) then if (k.gt.2.and.i.gt.4) then
!$omp atomic read !$omp atomic read
l = g(j,k-2,i-1) l = g(j,k-2,i-1)
if (l.lt.2) STOP 9 if (l.lt.2) stop 9
end if end if
!$omp atomic write !$omp atomic write
g(j,k,i) = 2 g(j,k,i) = 2
if (j.gt.2.and.k.gt.2.and.i.lt.6) then if (j.gt.2.and.k.gt.2.and.i.lt.6) then
!$omp atomic read !$omp atomic read
l = g(j-2,k-2, i+1) l = g(j-2,k-2, i+1)
if (l.lt.2) STOP 10 if (l.lt.2) stop 10
end if end if
if (j.gt.3.and.k.le.N/16-3.and.i.eq.6) then if (j.gt.3.and.k.le.N/16-3.and.i.eq.6) then
!$omp atomic read !$omp atomic read
l = g( j - 3, k+2, i-2) l = g( j - 3, k+2, i-2)
if (l.lt.2) STOP 11 if (l.lt.2) stop 11
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -173,13 +173,13 @@ ...@@ -173,13 +173,13 @@
do l = 0, d + 1 do l = 0, d + 1
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i-2,j+2,k-2,l) !$omp ordered depend(sink: i-2,j+2,k-2,l)
if (e.eq.0) STOP 12 if (e.eq.0) stop 12
end do end do
end do end do
end do end do
end do end do
!$omp single !$omp single
if (i.ne.3.or.j.ne.-1.or.k.ne.0) STOP 13 if (i.ne.3.or.j.ne.-1.or.k.ne.0) stop 13
i = 8; j = 9; k = 10 i = 8; j = 9; k = 10
!$omp end single !$omp end single
!$omp do ordered(4) collapse(2) lastprivate (i, j, k, m) !$omp do ordered(4) collapse(2) lastprivate (i, j, k, m)
...@@ -189,13 +189,13 @@ ...@@ -189,13 +189,13 @@
do m = 0, d-1 do m = 0, d-1
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i - 2, j + 2, k - 2, m) !$omp ordered depend(sink: i - 2, j + 2, k - 2, m)
STOP 14 stop 14
end do end do
end do end do
end do end do
end do end do
!$omp single !$omp single
if (i.ne.3.or.j.ne.-1.or.k.ne.2.or.m.ne.0) STOP 15 if (i.ne.3.or.j.ne.-1.or.k.ne.2.or.m.ne.0) stop 15
!$omp end single !$omp end single
!$omp do collapse(2) ordered(4) lastprivate (i,j,k) !$omp do collapse(2) ordered(4) lastprivate (i,j,k)
do i = 2, f + 2 do i = 2, f + 2
...@@ -204,18 +204,18 @@ ...@@ -204,18 +204,18 @@
do l = 0, d + 3 do l = 0, d + 3
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i-2,j+2,k-2,l) !$omp ordered depend(sink: i-2,j+2,k-2,l)
if (e.eq.0) STOP 16 if (e.eq.0) stop 16
end do end do
end do end do
end do end do
end do end do
!$omp end do nowait !$omp end do nowait
!$omp single !$omp single
if (a(1) .ne. 0) STOP 17 if (a(1) .ne. 0) stop 17
!$omp end single nowait !$omp end single nowait
!$omp do !$omp do
do i = 2, N do i = 2, N
if (a(i) .ne. 3) STOP 18 if (a(i) .ne. 3) stop 18
end do end do
!$omp end do nowait !$omp end do nowait
!$omp do collapse(2) private(k) !$omp do collapse(2) private(k)
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 4 do k = 1, 4
if (i.ge.4.and.i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.2) then if (i.ge.4.and.i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.2) then
if (b(i,j,k).ne.3) STOP 19 if (b(i,j,k).ne.3) stop 19
else else
if (b(i,j,k).ne.0) STOP 20 if (b(i,j,k).ne.0) stop 20
end if end if
end do end do
end do end do
...@@ -236,9 +236,9 @@ ...@@ -236,9 +236,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 4 do k = 1, 4
if (i.ge.3.and.j.ge.3.and.iand(k,1).ne.0) then if (i.ge.3.and.j.ge.3.and.iand(k,1).ne.0) then
if (c(i,j,k).ne.3) STOP 21 if (c(i,j,k).ne.3) stop 21
else else
if (c(i,j,k).ne.0) STOP 22 if (c(i,j,k).ne.0) stop 22
end if end if
end do end do
end do end do
...@@ -249,9 +249,9 @@ ...@@ -249,9 +249,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 6 do k = 1, 6
if (i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.4) then if (i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.4) then
if (g(i,j,k).ne.3) STOP 23 if (g(i,j,k).ne.3) stop 23
else else
if (g(i,j,k).ne.0) STOP 24 if (g(i,j,k).ne.0) stop 24
end if end if
end do end do
end do end do
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
if (i.gt.2) then if (i.gt.2) then
!$omp atomic read !$omp atomic read
l = a(i - 1) l = a(i - 1)
if (l.lt.2) STOP 1 if (l.lt.2) stop 1
end if end if
!$omp atomic write !$omp atomic write
a(i) = 2 a(i) = 2
if (i.lt.N) then if (i.lt.N) then
!$omp atomic read !$omp atomic read
l = a(i + 1) l = a(i + 1)
if (l.eq.3) STOP 2 if (l.eq.3) stop 2
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -46,19 +46,19 @@ ...@@ -46,19 +46,19 @@
if (j.gt.2.and.k.gt.2) then if (j.gt.2.and.k.gt.2) then
!$omp atomic read !$omp atomic read
l = b(i,j-2,k-1) l = b(i,j-2,k-1)
if (l.lt.2) STOP 3 if (l.lt.2) stop 3
end if end if
!$omp atomic write !$omp atomic write
b(i,j,k) = 2 b(i,j,k) = 2
if (i.gt.5.and.j.gt.2.and.k.lt.4) then if (i.gt.5.and.j.gt.2.and.k.lt.4) then
!$omp atomic read !$omp atomic read
l = b(i-2,j-2, k+1) l = b(i-2,j-2, k+1)
if (l.lt.2) STOP 4 if (l.lt.2) stop 4
end if end if
if (i.gt.6.and.j.le.N/16-3.and.k.eq.4) then if (i.gt.6.and.j.le.N/16-3.and.k.eq.4) then
!$omp atomic read !$omp atomic read
l = b( i - 3, j+2, k-2) l = b( i - 3, j+2, k-2)
if (l.lt.2) STOP 5 if (l.lt.2) stop 5
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -97,19 +97,19 @@ ...@@ -97,19 +97,19 @@
if (k.le.5) then if (k.le.5) then
!$omp atomic read !$omp atomic read
l = c(i, j, k + 2) l = c(i, j, k + 2)
if (l.lt.2) STOP 6 if (l.lt.2) stop 6
end if end if
!$omp atomic write !$omp atomic write
c(i, j, k) = 2 c(i, j, k) = 2
if (i.ge.5.and.j.lt.8.and.k.ge.5) then if (i.ge.5.and.j.lt.8.and.k.ge.5) then
!$omp atomic read !$omp atomic read
l = c(i - 2, j + 1, k - 4) l = c(i - 2, j + 1, k - 4)
if (l.lt.2) STOP 7 if (l.lt.2) stop 7
end if end if
if (i.ge.4.and.j.ge.5.and.k.ge.3) then if (i.ge.4.and.j.ge.5.and.k.ge.3) then
!$omp atomic read !$omp atomic read
l = c(i - 1, j - 2, k - 2) l = c(i - 1, j - 2, k - 2)
if (l.lt.2) STOP 8 if (l.lt.2) stop 8
end if end if
!$omp ordered depend ( source ) !$omp ordered depend ( source )
!$omp atomic write !$omp atomic write
...@@ -145,19 +145,19 @@ ...@@ -145,19 +145,19 @@
if (k.gt.2.and.i.gt.4) then if (k.gt.2.and.i.gt.4) then
!$omp atomic read !$omp atomic read
l = g(j,k-2,i-1) l = g(j,k-2,i-1)
if (l.lt.2) STOP 9 if (l.lt.2) stop 9
end if end if
!$omp atomic write !$omp atomic write
g(j,k,i) = 2 g(j,k,i) = 2
if (j.gt.2.and.k.gt.2.and.i.lt.6) then if (j.gt.2.and.k.gt.2.and.i.lt.6) then
!$omp atomic read !$omp atomic read
l = g(j-2,k-2, i+1) l = g(j-2,k-2, i+1)
if (l.lt.2) STOP 10 if (l.lt.2) stop 10
end if end if
if (j.gt.3.and.k.le.N/16-3.and.i.eq.6) then if (j.gt.3.and.k.le.N/16-3.and.i.eq.6) then
!$omp atomic read !$omp atomic read
l = g( j - 3, k+2, i-2) l = g( j - 3, k+2, i-2)
if (l.lt.2) STOP 11 if (l.lt.2) stop 11
end if end if
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp atomic write !$omp atomic write
...@@ -173,13 +173,13 @@ ...@@ -173,13 +173,13 @@
do l = 0, d + 1, 1 + d do l = 0, d + 1, 1 + d
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i-2,j+2,k-2,l) !$omp ordered depend(sink: i-2,j+2,k-2,l)
if (e.eq.0) STOP 12 if (e.eq.0) stop 12
end do end do
end do end do
end do end do
end do end do
!$omp single !$omp single
if (i.ne.3.or.j.ne.-1.or.k.ne.0) STOP 13 if (i.ne.3.or.j.ne.-1.or.k.ne.0) stop 13
i = 8; j = 9; k = 10 i = 8; j = 9; k = 10
!$omp end single !$omp end single
!$omp do ordered(4) collapse(2) lastprivate (i, j, k, m) !$omp do ordered(4) collapse(2) lastprivate (i, j, k, m)
...@@ -189,13 +189,13 @@ ...@@ -189,13 +189,13 @@
do m = 0, d-1, d+1 do m = 0, d-1, d+1
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i - 2, j + 2, k - 2, m) !$omp ordered depend(sink: i - 2, j + 2, k - 2, m)
STOP 14 stop 14
end do end do
end do end do
end do end do
end do end do
!$omp single !$omp single
if (i.ne.3.or.j.ne.-1.or.k.ne.2.or.m.ne.0) STOP 15 if (i.ne.3.or.j.ne.-1.or.k.ne.2.or.m.ne.0) stop 15
!$omp end single !$omp end single
!$omp do collapse(2) ordered(4) lastprivate (i,j,k) !$omp do collapse(2) ordered(4) lastprivate (i,j,k)
do i = 2, f + 2, 1 + f do i = 2, f + 2, 1 + f
...@@ -204,18 +204,18 @@ ...@@ -204,18 +204,18 @@
do l = 0, d + 3, d + 1 do l = 0, d + 3, d + 1
!$omp ordered depend(source) !$omp ordered depend(source)
!$omp ordered depend(sink: i-2,j+2,k-2,l) !$omp ordered depend(sink: i-2,j+2,k-2,l)
if (e.eq.0) STOP 16 if (e.eq.0) stop 16
end do end do
end do end do
end do end do
end do end do
!$omp end do nowait !$omp end do nowait
!$omp single !$omp single
if (a(1) .ne. 0) STOP 17 if (a(1) .ne. 0) stop 17
!$omp end single nowait !$omp end single nowait
!$omp do !$omp do
do i = 2, N do i = 2, N
if (a(i) .ne. 3) STOP 18 if (a(i) .ne. 3) stop 18
end do end do
!$omp end do nowait !$omp end do nowait
!$omp do collapse(2) private(k) !$omp do collapse(2) private(k)
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 4 do k = 1, 4
if (i.ge.4.and.i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.2) then if (i.ge.4.and.i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.2) then
if (b(i,j,k).ne.3) STOP 19 if (b(i,j,k).ne.3) stop 19
else else
if (b(i,j,k).ne.0) STOP 20 if (b(i,j,k).ne.0) stop 20
end if end if
end do end do
end do end do
...@@ -236,9 +236,9 @@ ...@@ -236,9 +236,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 4 do k = 1, 4
if (i.ge.3.and.j.ge.3.and.iand(k,1).ne.0) then if (i.ge.3.and.j.ge.3.and.iand(k,1).ne.0) then
if (c(i,j,k).ne.3) STOP 21 if (c(i,j,k).ne.3) stop 21
else else
if (c(i,j,k).ne.0) STOP 22 if (c(i,j,k).ne.0) stop 22
end if end if
end do end do
end do end do
...@@ -249,9 +249,9 @@ ...@@ -249,9 +249,9 @@
do j = 1, 8 do j = 1, 8
do k = 1, 6 do k = 1, 6
if (i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.4) then if (i.lt.N/16.and.iand(j,1).ne.0.and.k.ge.4) then
if (g(i,j,k).ne.3) STOP 23 if (g(i,j,k).ne.3) stop 23
else else
if (g(i,j,k).ne.0) STOP 24 if (g(i,j,k).ne.0) stop 24
end if end if
end do end do
end do end do
......
...@@ -12,6 +12,6 @@ contains ...@@ -12,6 +12,6 @@ contains
p(9) = 777 p(9) = 777
!$omp end target !$omp end target
!$omp end target data !$omp end target data
if (A(3) /= 777 .or. A(9) /= 777) STOP 1 if (A(3) /= 777 .or. A(9) /= 777) stop 1
end subroutine end subroutine
end end
...@@ -13,6 +13,6 @@ contains ...@@ -13,6 +13,6 @@ contains
A(9) = 999 A(9) = 999
!$omp end target !$omp end target
!$omp end target data !$omp end target data
if (A(3) /= 777 .or. A(9) /= 999) STOP 1 if (A(3) /= 777 .or. A(9) /= 999) stop 1
end subroutine end subroutine
end end
...@@ -27,7 +27,7 @@ subroutine check () ...@@ -27,7 +27,7 @@ subroutine check ()
else else
err = (Y(i) - Z(i)) / Z(i) err = (Y(i) - Z(i)) / Z(i)
end if end if
if (err > EPS .or. err < -EPS) STOP 1 if (err > EPS .or. err < -EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -17,7 +17,7 @@ subroutine check (p, N) ...@@ -17,7 +17,7 @@ subroutine check (p, N)
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
...@@ -30,14 +30,14 @@ subroutine vec_mult (p, N) ...@@ -30,14 +30,14 @@ subroutine vec_mult (p, N)
!$omp target data map(to: v1, v2, N) map(from: p) !$omp target data map(to: v1, v2, N) map(from: p)
!$omp task shared(v1, v2, p) depend(out: v1, v2) !$omp task shared(v1, v2, p) depend(out: v1, v2)
!$omp target map(to: v1, v2, N) !$omp target map(to: v1, v2, N)
if (omp_is_initial_device ()) STOP 2 if (omp_is_initial_device ()) stop 2
allocate (v1(N), v2(N)) allocate (v1(N), v2(N))
call init (v1, v2, N) call init (v1, v2, N)
!$omp end target !$omp end target
!$omp end task !$omp end task
!$omp task shared(v1, v2, p) depend(in: v1, v2) !$omp task shared(v1, v2, p) depend(in: v1, v2)
!$omp target map(to: v1, v2, N) map(from: p) !$omp target map(to: v1, v2, N) map(from: p)
if (omp_is_initial_device ()) STOP 3 if (omp_is_initial_device ()) stop 3
!$omp parallel do !$omp parallel do
do i = 1, N do i = 1, N
p(i) = v1(i) * v2(i) p(i) = v1(i) * v2(i)
......
...@@ -26,8 +26,8 @@ end module ...@@ -26,8 +26,8 @@ end module
program e_53_1 program e_53_1
use e_53_1_mod, only : fib, fib_wrapper use e_53_1_mod, only : fib, fib_wrapper
if (fib (15) /= fib_wrapper (15)) STOP 1 if (fib (15) /= fib_wrapper (15)) stop 1
! Reduced from 25 to 23, otherwise execution runs out of thread stack on ! Reduced from 25 to 23, otherwise execution runs out of thread stack on
! Nvidia Titan V. ! Nvidia Titan V.
if (fib (23) /= fib_wrapper (23)) STOP 2 if (fib (23) /= fib_wrapper (23)) stop 2
end program end program
...@@ -8,7 +8,7 @@ program e_53_2 ...@@ -8,7 +8,7 @@ program e_53_2
! Nvidia Titan V. ! Nvidia Titan V.
x = fib (23) x = fib (23)
!$omp end target !$omp end target
if (x /= fib (23)) STOP 1 if (x /= fib (23)) stop 1
end program end program
integer recursive function fib (n) result (f) integer recursive function fib (n) result (f)
......
...@@ -21,7 +21,7 @@ subroutine check (p, N) ...@@ -21,7 +21,7 @@ subroutine check (p, N)
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -53,7 +53,7 @@ subroutine check (a, b) ...@@ -53,7 +53,7 @@ subroutine check (a, b)
else else
err = (a - b) / b err = (a - b) / b
end if end if
if (err > EPS .or. err < -EPS) STOP 1 if (err > EPS .or. err < -EPS) stop 1
end subroutine end subroutine
program e_53_4 program e_53_4
......
...@@ -68,7 +68,7 @@ subroutine check (a, b) ...@@ -68,7 +68,7 @@ subroutine check (a, b)
else else
err = (a - b) / b err = (a - b) / b
end if end if
if (err > EPS .or. err < -EPS) STOP 1 if (err > EPS .or. err < -EPS) stop 1
end subroutine end subroutine
program e_53_5 program e_53_5
......
...@@ -20,7 +20,7 @@ program e_57_1 ...@@ -20,7 +20,7 @@ program e_57_1
!$omp end target !$omp end target
!$omp end target data !$omp end target data
if (b /= 100 .or. .not. c .or. d) STOP 1 if (b /= 100 .or. .not. c .or. d) stop 1
a = a + 200 a = a + 200
b = 0 b = 0
...@@ -36,7 +36,7 @@ program e_57_1 ...@@ -36,7 +36,7 @@ program e_57_1
!$omp end target !$omp end target
!$omp end target data !$omp end target data
if (b /= 0 .or. c .or. d) STOP 2 if (b /= 0 .or. c .or. d) stop 2
a = a + 200 a = a + 200
b = 0 b = 0
...@@ -52,5 +52,5 @@ program e_57_1 ...@@ -52,5 +52,5 @@ program e_57_1
!$omp end target !$omp end target
!$omp end target data !$omp end target data
if (b /= 100 .or. .not. c .or. d) STOP 3 if (b /= 100 .or. .not. c .or. d) stop 3
end program end program
...@@ -15,10 +15,10 @@ program e_57_2 ...@@ -15,10 +15,10 @@ program e_57_2
end do end do
do i = 1, num do i = 1, num
if (offload(i)) STOP 1 if (offload(i)) stop 1
end do end do
do i = num+1, N do i = num+1, N
if (.not. offload(i)) STOP 2 if (.not. offload(i)) stop 2
end do end do
end program end program
...@@ -11,11 +11,11 @@ program e_57_3 ...@@ -11,11 +11,11 @@ program e_57_3
!$omp target map(from: res) !$omp target map(from: res)
res = omp_is_initial_device () res = omp_is_initial_device ()
!$omp end target !$omp end target
if (res) STOP 1 if (res) stop 1
call omp_set_default_device (omp_get_num_devices ()) call omp_set_default_device (omp_get_num_devices ())
!$omp target map(from: res) !$omp target map(from: res)
res = omp_is_initial_device () res = omp_is_initial_device ()
!$omp end target !$omp end target
if (.not. res) STOP 2 if (.not. res) stop 2
end program end program
...@@ -28,7 +28,7 @@ contains ...@@ -28,7 +28,7 @@ contains
double precision :: diff, a(*), b(*) double precision :: diff, a(*), b(*)
do i = 1, n do i = 1, n
diff = a(i) - b(i) diff = a(i) - b(i)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -49,7 +49,7 @@ contains ...@@ -49,7 +49,7 @@ contains
double precision :: diff, a(*), b(*) double precision :: diff, a(*), b(*)
do i = 1, n do i = 1, n
diff = a(i) - b(i) diff = a(i) - b(i)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
end module end module
......
...@@ -57,6 +57,6 @@ program SIMD3 ...@@ -57,6 +57,6 @@ program SIMD3
diff = sum - sum_ref diff = sum - sum_ref
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end program end program
...@@ -47,7 +47,7 @@ contains ...@@ -47,7 +47,7 @@ contains
real :: diff, a(*), b(*) real :: diff, a(*), b(*)
do i = 1, n do i = 1, n
diff = a(i) - b(i) diff = a(i) - b(i)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -56,7 +56,7 @@ contains ...@@ -56,7 +56,7 @@ contains
do j = 1, n do j = 1, n
do i = 1, n do i = 1, n
diff = a(i,j) - b(i,j) diff = a(i,j) - b(i,j)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end do end do
end subroutine end subroutine
......
...@@ -109,14 +109,14 @@ contains ...@@ -109,14 +109,14 @@ contains
real :: diff, a(*), b(*) real :: diff, a(*), b(*)
do i = 1, n do i = 1, n
diff = a(i) - b(i) diff = a(i) - b(i)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
subroutine checkint (a, b, n) subroutine checkint (a, b, n)
integer :: i, n, a(*), b(*) integer :: i, n, a(*), b(*)
do i = 1, n do i = 1, n
if (a(i) .ne. b(i)) STOP 2 if (a(i) .ne. b(i)) stop 2
end do end do
end subroutine end subroutine
......
...@@ -23,7 +23,7 @@ program fibonacci ...@@ -23,7 +23,7 @@ program fibonacci
call fib_ref (a_ref, N) call fib_ref (a_ref, N)
do i = 0, N-1 do i = 0, N-1
if (a(i) .ne. a_ref(i)) STOP 1 if (a(i) .ne. a_ref(i)) stop 1
end do end do
end program end program
......
...@@ -47,6 +47,6 @@ program simd_8f ...@@ -47,6 +47,6 @@ program simd_8f
diff = pri - 8237.25 diff = pri - 8237.25
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end program end program
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real, pointer, dimension(:) :: p real, pointer, dimension(:) :: p
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -19,7 +19,7 @@ contains ...@@ -19,7 +19,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
...@@ -29,7 +29,7 @@ contains ...@@ -29,7 +29,7 @@ contains
real :: p(N), v1(N), v2(N) real :: p(N), v1(N), v2(N)
call init (v1, v2, N) call init (v1, v2, N)
!$omp target if(N > THRESHOLD1) map(to: v1,v2) map(from: p) !$omp target if(N > THRESHOLD1) map(to: v1,v2) map(from: p)
if (omp_is_initial_device ()) STOP 2 if (omp_is_initial_device ()) stop 2
!$omp parallel do if(N > THRESHOLD2) !$omp parallel do if(N > THRESHOLD2)
do i = 1, N do i = 1, N
p(i) = v1(i) * v2(i) p(i) = v1(i) * v2(i)
......
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -26,7 +26,7 @@ contains ...@@ -26,7 +26,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - 2 * (i + 2.0) * (i - 3.0) diff = p(i) - 2 * (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -19,7 +19,7 @@ contains ...@@ -19,7 +19,7 @@ contains
do k = 1, cols do k = 1, cols
do i = 1, rows do i = 1, rows
diff = P(i,k) - Q(i,k) diff = P(i,k) - Q(i,k)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end do end do
end subroutine end subroutine
......
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -17,7 +17,7 @@ contains ...@@ -17,7 +17,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -28,7 +28,7 @@ contains ...@@ -28,7 +28,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - 2 * (i + 2.0) * (i - 3.0) diff = p(i) - 2 * (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
...@@ -39,7 +39,7 @@ contains ...@@ -39,7 +39,7 @@ contains
call init (v1, v2, N) call init (v1, v2, N)
!$omp target data if(N > THRESHOLD) map(from: p) !$omp target data if(N > THRESHOLD) map(from: p)
!$omp target if(N > THRESHOLD) map(to: v1, v2) !$omp target if(N > THRESHOLD) map(to: v1, v2)
if (omp_is_initial_device ()) STOP 2 if (omp_is_initial_device ()) stop 2
!$omp parallel do !$omp parallel do
do i = 1, N do i = 1, N
p(i) = v1(i) * v2(i) p(i) = v1(i) * v2(i)
...@@ -47,7 +47,7 @@ contains ...@@ -47,7 +47,7 @@ contains
!$omp end target !$omp end target
call init_again (v1, v2, N) call init_again (v1, v2, N)
!$omp target if(N > THRESHOLD) map(to: v1, v2) !$omp target if(N > THRESHOLD) map(to: v1, v2)
if (omp_is_initial_device ()) STOP 3 if (omp_is_initial_device ()) stop 3
!$omp parallel do !$omp parallel do
do i = 1, N do i = 1, N
p(i) = p(i) + v1(i) * v2(i) p(i) = p(i) + v1(i) * v2(i)
......
...@@ -19,7 +19,7 @@ contains ...@@ -19,7 +19,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
...@@ -30,7 +30,7 @@ contains ...@@ -30,7 +30,7 @@ contains
call init (v1, v2, N) call init (v1, v2, N)
!$omp target data if(N > THRESHOLD) map(to: v1, v2) map(from: p) !$omp target data if(N > THRESHOLD) map(to: v1, v2) map(from: p)
!$omp target !$omp target
if (omp_is_initial_device ()) STOP 2 if (omp_is_initial_device ()) stop 2
!$omp parallel do !$omp parallel do
do i = 1, N do i = 1, N
p(i) = v1(i) * v2(i) p(i) = v1(i) * v2(i)
......
...@@ -26,7 +26,7 @@ contains ...@@ -26,7 +26,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - 2 * (i + 2.0) * (i - 3.0) diff = p(i) - 2 * (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -26,7 +26,7 @@ contains ...@@ -26,7 +26,7 @@ contains
real :: diff, p(N) real :: diff, p(N)
do i = 1, N do i = 1, N
diff = p(i) - (i * i + (i + 2.0) * (i - 3.0)) diff = p(i) - (i * i + (i + 2.0) * (i - 3.0))
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -9,7 +9,7 @@ program example ...@@ -9,7 +9,7 @@ program example
x = 2 x = 2
!$omp end task !$omp end task
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x .ne. 2) STOP 1 if (x .ne. 2) stop 1
!$omp end task !$omp end task
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
......
...@@ -6,7 +6,7 @@ program example ...@@ -6,7 +6,7 @@ program example
!$omp parallel !$omp parallel
!$omp single !$omp single
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x .ne. 1) STOP 1 if (x .ne. 1) stop 1
!$omp end task !$omp end task
!$omp task shared(x) depend(out: x) !$omp task shared(x) depend(out: x)
x = 2 x = 2
......
...@@ -12,7 +12,7 @@ program example ...@@ -12,7 +12,7 @@ program example
x = 2 x = 2
!$omp end task !$omp end task
!$omp taskwait !$omp taskwait
if ((x .ne. 1) .and. (x .ne. 2)) STOP 1 if ((x .ne. 1) .and. (x .ne. 2)) stop 1
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
end program end program
...@@ -9,10 +9,10 @@ program example ...@@ -9,10 +9,10 @@ program example
x = 2 x = 2
!$omp end task !$omp end task
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x .ne. 2) STOP 1 if (x .ne. 2) stop 1
!$omp end task !$omp end task
!$omp task shared(x) depend(in: x) !$omp task shared(x) depend(in: x)
if (x .ne. 2) STOP 2 if (x .ne. 2) stop 2
!$omp end task !$omp end task
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
......
...@@ -51,7 +51,7 @@ contains ...@@ -51,7 +51,7 @@ contains
do j = 1, N do j = 1, N
diff = A(i, j) - B(i, j) diff = A(i, j) - B(i, j)
if (diff > EPS .or. -diff > EPS) then if (diff > EPS .or. -diff > EPS) then
STOP 1 stop 1
end if end if
end do end do
end do end do
......
...@@ -49,7 +49,7 @@ subroutine check (a, b) ...@@ -49,7 +49,7 @@ subroutine check (a, b)
else else
err = (a - b) / b err = (a - b) / b
end if end if
if (err > EPS .or. err < -EPS) STOP 1 if (err > EPS .or. err < -EPS) stop 1
end subroutine end subroutine
program e_54_1 program e_54_1
......
...@@ -42,7 +42,7 @@ subroutine check (a, b) ...@@ -42,7 +42,7 @@ subroutine check (a, b)
else else
err = (a - b) / b err = (a - b) / b
end if end if
if (err > EPS .or. err < -EPS) STOP 1 if (err > EPS .or. err < -EPS) stop 1
end subroutine end subroutine
program e_54_3 program e_54_3
......
...@@ -44,7 +44,7 @@ subroutine check (a, b) ...@@ -44,7 +44,7 @@ subroutine check (a, b)
else else
err = (a - b) / b err = (a - b) / b
end if end if
if (err > EPS .or. err < -EPS) STOP 1 if (err > EPS .or. err < -EPS) stop 1
end subroutine end subroutine
program e_54_4 program e_54_4
......
...@@ -18,7 +18,7 @@ contains ...@@ -18,7 +18,7 @@ contains
real :: diff real :: diff
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -18,7 +18,7 @@ contains ...@@ -18,7 +18,7 @@ contains
real :: diff real :: diff
do i = 1, N do i = 1, N
diff = p(i) - (i + 2.0) * (i - 3.0) diff = p(i) - (i + 2.0) * (i - 3.0)
if (diff > EPS .or. -diff > EPS) STOP 1 if (diff > EPS .or. -diff > EPS) stop 1
end do end do
end subroutine end subroutine
......
...@@ -5,15 +5,15 @@ program lastprivate ...@@ -5,15 +5,15 @@ program lastprivate
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call test1 call test1
!$omp end parallel !$omp end parallel
if (i .ne. 21) STOP 1 if (i .ne. 21) stop 1
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call test2 call test2
!$omp end parallel !$omp end parallel
if (i .ne. 64) STOP 2 if (i .ne. 64) stop 2
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call test3 call test3
!$omp end parallel !$omp end parallel
if (i .ne. 14) STOP 3 if (i .ne. 14) stop 3
call test4 call test4
call test5 call test5
call test6 call test6
...@@ -54,21 +54,21 @@ contains ...@@ -54,21 +54,21 @@ contains
!$omp parallel do lastprivate (j) num_threads (4) default (none) !$omp parallel do lastprivate (j) num_threads (4) default (none)
do j = 1, 20 do j = 1, 20
end do end do
if (j .ne. 21) STOP 4 if (j .ne. 21) stop 4
end subroutine test4 end subroutine test4
subroutine test5 subroutine test5
integer :: j integer :: j
!$omp parallel do lastprivate (j) num_threads (4) default (none) !$omp parallel do lastprivate (j) num_threads (4) default (none)
do j = 7, 61, 3 do j = 7, 61, 3
end do end do
if (j .ne. 64) STOP 5 if (j .ne. 64) stop 5
end subroutine test5 end subroutine test5
subroutine test6 subroutine test6
integer :: j integer :: j
!$omp parallel do lastprivate (j) num_threads (4) default (none) !$omp parallel do lastprivate (j) num_threads (4) default (none)
do j = -10, 11, ret3 () do j = -10, 11, ret3 ()
end do end do
if (j .ne. 14) STOP 6 if (j .ne. 14) stop 6
end subroutine test6 end subroutine test6
subroutine test7 subroutine test7
integer :: i integer :: i
...@@ -76,7 +76,7 @@ contains ...@@ -76,7 +76,7 @@ contains
!$omp parallel do lastprivate (i) num_threads (4) default (none) !$omp parallel do lastprivate (i) num_threads (4) default (none)
do i = 1, 20 do i = 1, 20
end do end do
if (i .ne. 21) STOP 7 if (i .ne. 21) stop 7
end subroutine test7 end subroutine test7
subroutine test8 subroutine test8
integer :: i integer :: i
...@@ -84,7 +84,7 @@ contains ...@@ -84,7 +84,7 @@ contains
!$omp parallel do lastprivate (i) num_threads (4) default (none) !$omp parallel do lastprivate (i) num_threads (4) default (none)
do i = 7, 61, 3 do i = 7, 61, 3
end do end do
if (i .ne. 64) STOP 8 if (i .ne. 64) stop 8
end subroutine test8 end subroutine test8
subroutine test9 subroutine test9
integer :: i integer :: i
...@@ -92,7 +92,7 @@ contains ...@@ -92,7 +92,7 @@ contains
!$omp parallel do lastprivate (i) num_threads (4) default (none) !$omp parallel do lastprivate (i) num_threads (4) default (none)
do i = -10, 11, ret3 () do i = -10, 11, ret3 ()
end do end do
if (i .ne. 14) STOP 9 if (i .ne. 14) stop 9
end subroutine test9 end subroutine test9
subroutine test10 subroutine test10
integer :: i integer :: i
...@@ -102,7 +102,7 @@ contains ...@@ -102,7 +102,7 @@ contains
do i = 1, 20 do i = 1, 20
end do end do
!$omp end parallel !$omp end parallel
if (i .ne. 21) STOP 10 if (i .ne. 21) stop 10
end subroutine test10 end subroutine test10
subroutine test11 subroutine test11
integer :: i integer :: i
...@@ -112,7 +112,7 @@ contains ...@@ -112,7 +112,7 @@ contains
do i = 7, 61, 3 do i = 7, 61, 3
end do end do
!$omp end parallel !$omp end parallel
if (i .ne. 64) STOP 11 if (i .ne. 64) stop 11
end subroutine test11 end subroutine test11
subroutine test12 subroutine test12
integer :: i integer :: i
...@@ -122,6 +122,6 @@ contains ...@@ -122,6 +122,6 @@ contains
do i = -10, 11, ret3 () do i = -10, 11, ret3 ()
end do end do
!$omp end parallel !$omp end parallel
if (i .ne. 14) STOP 12 if (i .ne. 14) stop 12
end subroutine test12 end subroutine test12
end program lastprivate end program lastprivate
...@@ -5,15 +5,15 @@ program lastprivate ...@@ -5,15 +5,15 @@ program lastprivate
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call test1 call test1
!$omp end parallel !$omp end parallel
if (i .ne. 21 .or. k .ne. 20) STOP 1 if (i .ne. 21 .or. k .ne. 20) stop 1
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call test2 call test2
!$omp end parallel !$omp end parallel
if (i .ne. 64 .or. k .ne. 61) STOP 2 if (i .ne. 64 .or. k .ne. 61) stop 2
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call test3 call test3
!$omp end parallel !$omp end parallel
if (i .ne. 14 .or. k .ne. 11) STOP 3 if (i .ne. 14 .or. k .ne. 11) stop 3
call test4 call test4
call test5 call test5
call test6 call test6
...@@ -58,7 +58,7 @@ contains ...@@ -58,7 +58,7 @@ contains
do j = 1, 20 do j = 1, 20
l = j l = j
end do end do
if (j .ne. 21 .or. l .ne. 20) STOP 4 if (j .ne. 21 .or. l .ne. 20) stop 4
end subroutine test4 end subroutine test4
subroutine test5 subroutine test5
integer :: j, l integer :: j, l
...@@ -67,7 +67,7 @@ contains ...@@ -67,7 +67,7 @@ contains
do j = 7, 61, 3 do j = 7, 61, 3
l = j l = j
end do end do
if (j .ne. 64 .or. l .ne. 61) STOP 5 if (j .ne. 64 .or. l .ne. 61) stop 5
end subroutine test5 end subroutine test5
subroutine test6 subroutine test6
integer :: j, l integer :: j, l
...@@ -75,7 +75,7 @@ contains ...@@ -75,7 +75,7 @@ contains
do j = -10, 11, ret3 () do j = -10, 11, ret3 ()
l = j l = j
end do end do
if (j .ne. 14 .or. l .ne. 11) STOP 6 if (j .ne. 14 .or. l .ne. 11) stop 6
end subroutine test6 end subroutine test6
subroutine test7 subroutine test7
integer :: i, k integer :: i, k
...@@ -84,7 +84,7 @@ contains ...@@ -84,7 +84,7 @@ contains
do i = 1, 20 do i = 1, 20
k = i k = i
end do end do
if (i .ne. 21 .or. k .ne. 20) STOP 7 if (i .ne. 21 .or. k .ne. 20) stop 7
end subroutine test7 end subroutine test7
subroutine test8 subroutine test8
integer :: i, k integer :: i, k
...@@ -93,7 +93,7 @@ contains ...@@ -93,7 +93,7 @@ contains
do i = 7, 61, 3 do i = 7, 61, 3
k = i k = i
end do end do
if (i .ne. 64 .or. k .ne. 61) STOP 8 if (i .ne. 64 .or. k .ne. 61) stop 8
end subroutine test8 end subroutine test8
subroutine test9 subroutine test9
integer :: i, k integer :: i, k
...@@ -103,7 +103,7 @@ contains ...@@ -103,7 +103,7 @@ contains
do i = -10, 11, ret3 () do i = -10, 11, ret3 ()
k = i k = i
end do end do
if (i .ne. 14 .or. k .ne. 11) STOP 9 if (i .ne. 14 .or. k .ne. 11) stop 9
end subroutine test9 end subroutine test9
subroutine test10 subroutine test10
integer :: i, k integer :: i, k
...@@ -114,7 +114,7 @@ contains ...@@ -114,7 +114,7 @@ contains
k = i k = i
end do end do
!$omp end parallel !$omp end parallel
if (i .ne. 21 .or. k .ne. 20) STOP 10 if (i .ne. 21 .or. k .ne. 20) stop 10
end subroutine test10 end subroutine test10
subroutine test11 subroutine test11
integer :: i, k integer :: i, k
...@@ -125,7 +125,7 @@ contains ...@@ -125,7 +125,7 @@ contains
k = i k = i
end do end do
!$omp end parallel !$omp end parallel
if (i .ne. 64 .or. k .ne. 61) STOP 11 if (i .ne. 64 .or. k .ne. 61) stop 11
end subroutine test11 end subroutine test11
subroutine test12 subroutine test12
integer :: i, k integer :: i, k
...@@ -137,6 +137,6 @@ contains ...@@ -137,6 +137,6 @@ contains
k = i k = i
end do end do
!$omp end parallel !$omp end parallel
if (i .ne. 14 .or. k .ne. 11) STOP 12 if (i .ne. 14 .or. k .ne. 11) stop 12
end subroutine test12 end subroutine test12
end program lastprivate end program lastprivate
...@@ -11,42 +11,42 @@ ...@@ -11,42 +11,42 @@
call omp_init_lock (lck) call omp_init_lock (lck)
call omp_set_lock (lck) call omp_set_lock (lck)
if (omp_test_lock (lck)) STOP 1 if (omp_test_lock (lck)) stop 1
call omp_unset_lock (lck) call omp_unset_lock (lck)
if (.not. omp_test_lock (lck)) STOP 2 if (.not. omp_test_lock (lck)) stop 2
if (omp_test_lock (lck)) STOP 3 if (omp_test_lock (lck)) stop 3
call omp_unset_lock (lck) call omp_unset_lock (lck)
call omp_destroy_lock (lck) call omp_destroy_lock (lck)
call omp_init_nest_lock (nlck) call omp_init_nest_lock (nlck)
if (omp_test_nest_lock (nlck) .ne. 1) STOP 4 if (omp_test_nest_lock (nlck) .ne. 1) stop 4
call omp_set_nest_lock (nlck) call omp_set_nest_lock (nlck)
if (omp_test_nest_lock (nlck) .ne. 3) STOP 5 if (omp_test_nest_lock (nlck) .ne. 3) stop 5
call omp_unset_nest_lock (nlck) call omp_unset_nest_lock (nlck)
call omp_unset_nest_lock (nlck) call omp_unset_nest_lock (nlck)
if (omp_test_nest_lock (nlck) .ne. 2) STOP 6 if (omp_test_nest_lock (nlck) .ne. 2) stop 6
call omp_unset_nest_lock (nlck) call omp_unset_nest_lock (nlck)
call omp_unset_nest_lock (nlck) call omp_unset_nest_lock (nlck)
call omp_destroy_nest_lock (nlck) call omp_destroy_nest_lock (nlck)
call omp_set_dynamic (.true.) call omp_set_dynamic (.true.)
if (.not. omp_get_dynamic ()) STOP 7 if (.not. omp_get_dynamic ()) stop 7
call omp_set_dynamic (.false.) call omp_set_dynamic (.false.)
if (omp_get_dynamic ()) STOP 8 if (omp_get_dynamic ()) stop 8
call omp_set_nested (.true.) call omp_set_nested (.true.)
if (.not. omp_get_nested ()) STOP 9 if (.not. omp_get_nested ()) stop 9
call omp_set_nested (.false.) call omp_set_nested (.false.)
if (omp_get_nested ()) STOP 10 if (omp_get_nested ()) stop 10
call omp_set_num_threads (5) call omp_set_num_threads (5)
if (omp_get_num_threads () .ne. 1) STOP 11 if (omp_get_num_threads () .ne. 1) stop 11
if (omp_get_max_threads () .ne. 5) STOP 12 if (omp_get_max_threads () .ne. 5) stop 12
if (omp_get_thread_num () .ne. 0) STOP 13 if (omp_get_thread_num () .ne. 0) stop 13
call omp_set_num_threads (3) call omp_set_num_threads (3)
if (omp_get_num_threads () .ne. 1) STOP 14 if (omp_get_num_threads () .ne. 1) stop 14
if (omp_get_max_threads () .ne. 3) STOP 15 if (omp_get_max_threads () .ne. 3) stop 15
if (omp_get_thread_num () .ne. 0) STOP 16 if (omp_get_thread_num () .ne. 0) stop 16
l = .false. l = .false.
!$omp parallel reduction (.or.:l) !$omp parallel reduction (.or.:l)
l = omp_get_num_threads () .ne. 3 l = omp_get_num_threads () .ne. 3
...@@ -56,22 +56,22 @@ ...@@ -56,22 +56,22 @@
l = l .or. (omp_get_thread_num () .ne. 0) l = l .or. (omp_get_thread_num () .ne. 0)
!$omp end master !$omp end master
!$omp end parallel !$omp end parallel
if (l) STOP 17 if (l) stop 17
if (omp_get_num_procs () .le. 0) STOP 18 if (omp_get_num_procs () .le. 0) stop 18
if (omp_in_parallel ()) STOP 19 if (omp_in_parallel ()) stop 19
!$omp parallel reduction (.or.:l) !$omp parallel reduction (.or.:l)
l = .not. omp_in_parallel () l = .not. omp_in_parallel ()
!$omp end parallel !$omp end parallel
!$omp parallel reduction (.or.:l) if (.true.) !$omp parallel reduction (.or.:l) if (.true.)
l = .not. omp_in_parallel () l = .not. omp_in_parallel ()
!$omp end parallel !$omp end parallel
if (l) STOP 20 if (l) stop 20
e = omp_get_wtime () e = omp_get_wtime ()
if (d .gt. e) STOP 21 if (d .gt. e) stop 21
d = omp_get_wtick () d = omp_get_wtick ()
! Negative precision is definitely wrong, ! Negative precision is definitely wrong,
! bigger than 1s clock resolution is also strange ! bigger than 1s clock resolution is also strange
if (d .le. 0 .or. d .gt. 1.) STOP 22 if (d .le. 0 .or. d .gt. 1.) stop 22
end end
...@@ -6,11 +6,11 @@ program lib4 ...@@ -6,11 +6,11 @@ program lib4
integer :: modifier integer :: modifier
call omp_set_schedule (omp_sched_static, 32) call omp_set_schedule (omp_sched_static, 32)
call omp_get_schedule (kind, modifier) call omp_get_schedule (kind, modifier)
if (kind.ne.omp_sched_static.or.modifier.ne.32) STOP 1 if (kind.ne.omp_sched_static.or.modifier.ne.32) stop 1
call omp_set_schedule (omp_sched_dynamic, 4) call omp_set_schedule (omp_sched_dynamic, 4)
call omp_get_schedule (kind, modifier) call omp_get_schedule (kind, modifier)
if (kind.ne.omp_sched_dynamic.or.modifier.ne.4) STOP 2 if (kind.ne.omp_sched_dynamic.or.modifier.ne.4) stop 2
if (omp_get_thread_limit ().lt.0) STOP 3 if (omp_get_thread_limit ().lt.0) stop 3
call omp_set_max_active_levels (6) call omp_set_max_active_levels (6)
if (omp_get_max_active_levels ().ne.6) STOP 4 if (omp_get_max_active_levels ().ne.6) stop 4
end program lib4 end program lib4
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
l = .false. l = .false.
call omp_init_nest_lock (lock) call omp_init_nest_lock (lock)
if (omp_test_nest_lock (lock) .ne. 1) STOP 1 if (omp_test_nest_lock (lock) .ne. 1) stop 1
if (omp_test_nest_lock (lock) .ne. 2) STOP 2 if (omp_test_nest_lock (lock) .ne. 2) stop 2
!$omp parallel if (.false.) reduction (.or.:l) !$omp parallel if (.false.) reduction (.or.:l)
! In OpenMP 2.5 this was supposed to return 3, ! In OpenMP 2.5 this was supposed to return 3,
! but in OpenMP 3.0 the parallel region has a different ! but in OpenMP 3.0 the parallel region has a different
! task and omp_*_lock_t are owned by tasks, not by threads. ! task and omp_*_lock_t are owned by tasks, not by threads.
if (omp_test_nest_lock (lock) .ne. 0) l = .true. if (omp_test_nest_lock (lock) .ne. 0) l = .true.
!$omp end parallel !$omp end parallel
if (l) STOP 3 if (l) stop 3
if (omp_test_nest_lock (lock) .ne. 3) STOP 4 if (omp_test_nest_lock (lock) .ne. 3) stop 4
call omp_unset_nest_lock (lock) call omp_unset_nest_lock (lock)
call omp_unset_nest_lock (lock) call omp_unset_nest_lock (lock)
call omp_unset_nest_lock (lock) call omp_unset_nest_lock (lock)
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
l = .false. l = .false.
call omp_init_nest_lock (lock) call omp_init_nest_lock (lock)
!$omp parallel num_threads (1) reduction (.or.:l) !$omp parallel num_threads (1) reduction (.or.:l)
if (omp_test_nest_lock (lock) .ne. 1) STOP 1 if (omp_test_nest_lock (lock) .ne. 1) stop 1
if (omp_test_nest_lock (lock) .ne. 2) STOP 2 if (omp_test_nest_lock (lock) .ne. 2) stop 2
!$omp task if (.false.) shared (lock, l) !$omp task if (.false.) shared (lock, l)
if (omp_test_nest_lock (lock) .ne. 0) l = .true. if (omp_test_nest_lock (lock) .ne. 0) l = .true.
!$omp end task !$omp end task
...@@ -19,6 +19,6 @@ ...@@ -19,6 +19,6 @@
call omp_unset_nest_lock (lock) call omp_unset_nest_lock (lock)
call omp_unset_nest_lock (lock) call omp_unset_nest_lock (lock)
!$omp end parallel !$omp end parallel
if (l) STOP 3 if (l) stop 3
call omp_destroy_nest_lock (lock) call omp_destroy_nest_lock (lock)
end end
...@@ -8,16 +8,16 @@ program nested1 ...@@ -8,16 +8,16 @@ program nested1
e3 = 0 e3 = 0
call omp_set_nested (.true.) call omp_set_nested (.true.)
call omp_set_dynamic (.false.) call omp_set_dynamic (.false.)
if (omp_in_parallel ()) STOP 1 if (omp_in_parallel ()) stop 1
if (omp_get_num_threads ().ne.1) STOP 2 if (omp_get_num_threads ().ne.1) stop 2
if (omp_get_level ().ne.0) STOP 3 if (omp_get_level ().ne.0) stop 3
if (omp_get_ancestor_thread_num (0).ne.0) STOP 4 if (omp_get_ancestor_thread_num (0).ne.0) stop 4
if (omp_get_ancestor_thread_num (-1).ne.-1) STOP 5 if (omp_get_ancestor_thread_num (-1).ne.-1) stop 5
if (omp_get_ancestor_thread_num (1).ne.-1) STOP 6 if (omp_get_ancestor_thread_num (1).ne.-1) stop 6
if (omp_get_team_size (0).ne.1) STOP 7 if (omp_get_team_size (0).ne.1) stop 7
if (omp_get_team_size (-1).ne.-1) STOP 8 if (omp_get_team_size (-1).ne.-1) stop 8
if (omp_get_team_size (1).ne.-1) STOP 9 if (omp_get_team_size (1).ne.-1) stop 9
if (omp_get_active_level ().ne.0) STOP 10 if (omp_get_active_level ().ne.0) stop 10
!$omp parallel num_threads (4) private (e, tn1) !$omp parallel num_threads (4) private (e, tn1)
e = 0 e = 0
tn1 = omp_get_thread_num () tn1 = omp_get_thread_num ()
...@@ -83,5 +83,5 @@ program nested1 ...@@ -83,5 +83,5 @@ program nested1
!$omp end parallel !$omp end parallel
!$omp end parallel !$omp end parallel
!$omp end parallel !$omp end parallel
if (e1.ne.0.or.e2.ne.0.or.e3.ne.0) STOP 11 if (e1.ne.0.or.e2.ne.0.or.e3.ne.0) stop 11
end program nested1 end program nested1
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
b = 2 b = 2
c = 3 c = 3
call foo call foo
if (a .ne. 7) STOP 1 if (a .ne. 7) stop 1
contains contains
subroutine foo subroutine foo
use omp_lib use omp_lib
...@@ -38,6 +38,6 @@ contains ...@@ -38,6 +38,6 @@ contains
if (a .ne. 7 .or. b .ne. 8 .or. c .ne. 9) l = .true. if (a .ne. 7 .or. b .ne. 8 .or. c .ne. 9) l = .true.
end if end if
!$omp end parallel !$omp end parallel
if (l) STOP 2 if (l) stop 2
end subroutine foo end subroutine foo
end end
...@@ -24,8 +24,8 @@ contains ...@@ -24,8 +24,8 @@ contains
subroutine test3 subroutine test3
integer :: i integer :: i
common /c/ i common /c/ i
if (i .lt. 0 .or. i .ge. 4) STOP 1 if (i .lt. 0 .or. i .ge. 4) stop 1
if (i + 10 .ne. vari) STOP 2 if (i + 10 .ne. vari) stop 2
end subroutine test3 end subroutine test3
subroutine test4 subroutine test4
use omp_lib use omp_lib
......
...@@ -5,7 +5,7 @@ program nestomp ...@@ -5,7 +5,7 @@ program nestomp
integer :: j integer :: j
j = 8 j = 8
call bar call bar
if (j.ne.10) STOP 1 if (j.ne.10) stop 1
contains contains
subroutine foo (i) subroutine foo (i)
integer :: i integer :: i
......
...@@ -7,19 +7,19 @@ program foo ...@@ -7,19 +7,19 @@ program foo
call test1 call test1
call test2 call test2
do i = 1, 10 do i = 1, 10
if (a(i) .ne. 10 * i) STOP 1 if (a(i) .ne. 10 * i) stop 1
end do end do
!$omp parallel do reduction (+:c) !$omp parallel do reduction (+:c)
do i = 1, 10 do i = 1, 10
c = c + a c = c + a
end do end do
do i = 1, 10 do i = 1, 10
if (c(i) .ne. 10 * a(i)) STOP 2 if (c(i) .ne. 10 * a(i)) stop 2
end do end do
!$omp parallel do lastprivate (j) !$omp parallel do lastprivate (j)
do j = 1, 10, k do j = 1, 10, k
end do end do
if (j .ne. 11) STOP 3 if (j .ne. 11) stop 3
contains contains
subroutine test1 subroutine test1
integer :: i integer :: i
...@@ -37,6 +37,6 @@ contains ...@@ -37,6 +37,6 @@ contains
!$omp parallel do lastprivate (j) !$omp parallel do lastprivate (j)
do j = 1, 10, k do j = 1, 10, k
end do end do
if (j .ne. 11) STOP 4 if (j .ne. 11) stop 4
end subroutine test2 end subroutine test2
end program foo end program foo
...@@ -30,7 +30,7 @@ contains ...@@ -30,7 +30,7 @@ contains
b = b + 1 b = b + 1
end do end do
!$omp end simd !$omp end simd
if (a /= 21 .or. b /= 12) STOP 1 if (a /= 21 .or. b /= 12) stop 1
!$omp simd aligned(f : c_sizeof (e(1))) !$omp simd aligned(f : c_sizeof (e(1)))
do b = 1, 64 do b = 1, 64
g(b) = f g(b) = f
...@@ -44,8 +44,8 @@ contains ...@@ -44,8 +44,8 @@ contains
d(2:2,4:5) = d(2:2,4:5) + 1 d(2:2,4:5) = d(2:2,4:5) + 1
!$omp end task !$omp end task
!$omp task depend(in : a, d(2:2,4:5)) !$omp task depend(in : a, d(2:2,4:5))
if (a /= 22) STOP 2 if (a /= 22) stop 2
if (any (d(2:2,4:5) /= 5)) STOP 3 if (any (d(2:2,4:5) /= 5)) stop 3
!$omp end task !$omp end task
!$omp end taskgroup !$omp end taskgroup
!$omp end single !$omp end single
...@@ -64,8 +64,8 @@ contains ...@@ -64,8 +64,8 @@ contains
d(2:3,4:4) = 9 d(2:3,4:4) = 9
!$omp end target !$omp end target
!$omp target update from (a, q, d(2:3,4:4), l) !$omp target update from (a, q, d(2:3,4:4), l)
if (a /= 6 .or. l .or. b /= 11 .or. any (q /= 8)) STOP 4 if (a /= 6 .or. l .or. b /= 11 .or. any (q /= 8)) stop 4
if (any (d(2:3,4:4) /= 9) .or. d(2,5) /= 5 .or. d(3,5) /= 4) STOP 5 if (any (d(2:3,4:4) /= 9) .or. d(2,5) /= 5 .or. d(3,5) /= 4) stop 5
a = 12 a = 12
b = 13 b = 13
q = 14 q = 14
...@@ -82,7 +82,7 @@ contains ...@@ -82,7 +82,7 @@ contains
m = 0 m = 0
n = 64 n = 64
o = 16 o = 16
if (l) STOP 6 if (l) stop 6
!$omp target teams distribute parallel do simd if (.not.l) device(a) & !$omp target teams distribute parallel do simd if (.not.l) device(a) &
!$omp & num_teams(b) dist_schedule(static, c) num_threads (h) & !$omp & num_teams(b) dist_schedule(static, c) num_threads (h) &
!$omp & reduction (+: m) safelen (n) schedule(static, o) & !$omp & reduction (+: m) safelen (n) schedule(static, o) &
...@@ -91,7 +91,7 @@ contains ...@@ -91,7 +91,7 @@ contains
m = m + 1 m = m + 1
end do end do
!$omp end target teams distribute parallel do simd !$omp end target teams distribute parallel do simd
if (m /= 64) STOP 7 if (m /= 64) stop 7
!$omp end target data !$omp end target data
end subroutine foo end subroutine foo
end subroutine bar end subroutine bar
...@@ -18,22 +18,22 @@ ...@@ -18,22 +18,22 @@
c = c * 2 c = c * 2
!$omp atomic !$omp atomic
d = 2 / d d = 2 / d
if (a .ne. 5 .or. b .ne. 2 .or. c .ne. 6 .or. d .ne. 0.5) STOP 1 if (a .ne. 5 .or. b .ne. 2 .or. c .ne. 6 .or. d .ne. 0.5) stop 1
d = 1.2 d = 1.2
!$omp atomic !$omp atomic
a = a + c + d a = a + c + d
!$omp atomic !$omp atomic
b = b - (a + c + d) b = b - (a + c + d)
if (a .ne. 12 .or. b .ne. -17) STOP 2 if (a .ne. 12 .or. b .ne. -17) stop 2
!$omp atomic !$omp atomic
a = c + d + a a = c + d + a
!$omp atomic !$omp atomic
b = a + c + d - b b = a + c + d - b
if (a .ne. 19 .or. b .ne. 43) STOP 3 if (a .ne. 19 .or. b .ne. 43) stop 3
!$omp atomic !$omp atomic
b = (a + c + d) - b b = (a + c + d) - b
a = 32 a = 32
!$omp atomic !$omp atomic
a = a / 3.4 a = a / 3.4
if (a .ne. 9 .or. b .ne. -16) STOP 4 if (a .ne. 9 .or. b .ne. -16) stop 4
end end
...@@ -13,28 +13,28 @@ ...@@ -13,28 +13,28 @@
n = 20 n = 20
call foo (r, d, n) call foo (r, d, n)
if (n .ne. 22) STOP 1 if (n .ne. 22) stop 1
if (any (r .ne. 33)) STOP 2 if (any (r .ne. 33)) stop 2
i = 1 i = 1
j = 18 j = 18
k = 23 k = 23
!$omp atomic !$omp atomic
i = min (i, j, k, n) i = min (i, j, k, n)
if (i .ne. 1) STOP 3 if (i .ne. 1) stop 3
!$omp atomic !$omp atomic
i = max (j, n, k, i) i = max (j, n, k, i)
if (i .ne. 23) STOP 4 if (i .ne. 23) stop 4
a = 1 a = 1
b = 18 b = 18
c = 23 c = 23
!$omp atomic !$omp atomic
a = min (a, b, c) a = min (a, b, c)
if (a .ne. 1) STOP 5 if (a .ne. 1) stop 5
!$omp atomic !$omp atomic
a = max (a, b, c) a = max (a, b, c)
if (a .ne. 23) STOP 6 if (a .ne. 23) stop 6
contains contains
function bar (i) function bar (i)
......
...@@ -36,23 +36,23 @@ ...@@ -36,23 +36,23 @@
c2 = c c2 = c
!$omp atomic read !$omp atomic read
d2 = d d2 = d
if (a2 .ne. 5 .or. b2 .ne. 2 .or. c2 .ne. 6 .or. d2 .ne. 0.5) STOP 1 if (a2 .ne. 5 .or. b2 .ne. 2 .or. c2 .ne. 6 .or. d2 .ne. 0.5) stop 1
!$omp atomic write !$omp atomic write
d = 1.2 d = 1.2
!$omp atomic !$omp atomic
a = a + c + d a = a + c + d
!$omp atomic !$omp atomic
b = b - (a + c + d) b = b - (a + c + d)
if (a .ne. 12 .or. b .ne. -17) STOP 2 if (a .ne. 12 .or. b .ne. -17) stop 2
!$omp atomic !$omp atomic
a = c + d + a a = c + d + a
!$omp atomic !$omp atomic
b = a + c + d - b b = a + c + d - b
if (a .ne. 19 .or. b .ne. 43) STOP 3 if (a .ne. 19 .or. b .ne. 43) stop 3
!$omp atomic !$omp atomic
b = (a + c + d) - b b = (a + c + d) - b
a = 32 a = 32
!$omp atomic !$omp atomic
a = a / 3.4 a = a / 3.4
if (a .ne. 9 .or. b .ne. -16) STOP 4 if (a .ne. 9 .or. b .ne. -16) stop 4
end end
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
d = d / 2.0 d = d / 2.0
d2 = d d2 = d
!$omp end atomic !$omp end atomic
if (a2 .ne. 1 .or. b2 .ne. -16 .or. c2 .ne. 3 .or. d2 .ne. 2) STOP 1 if (a2 .ne. 1 .or. b2 .ne. -16 .or. c2 .ne. 3 .or. d2 .ne. 2) stop 1
!$omp atomic read !$omp atomic read
a2 = a a2 = a
!$omp atomic read !$omp atomic read
c2 = c c2 = c
if (a2 .ne. 5 .or. b2 .ne. -16 .or. c2 .ne. 6 .or. d2 .ne. 2) STOP 2 if (a2 .ne. 5 .or. b2 .ne. -16 .or. c2 .ne. 6 .or. d2 .ne. 2) stop 2
end end
...@@ -30,30 +30,30 @@ ...@@ -30,30 +30,30 @@
d = d / 2.0 d = d / 2.0
d2 = d d2 = d
!$omp end atomic !$omp end atomic
if (a2 .ne. 1 .or. b2 .ne. -16 .or. c2 .ne. 3 .or. d2 .ne. 2) STOP 1 if (a2 .ne. 1 .or. b2 .ne. -16 .or. c2 .ne. 3 .or. d2 .ne. 2) stop 1
!$omp atomic read seq_cst !$omp atomic read seq_cst
a2 = a a2 = a
!$omp atomic seq_cst, read !$omp atomic seq_cst, read
c2 = c c2 = c
if (a2 .ne. 5 .or. b2 .ne. -16 .or. c2 .ne. 6 .or. d2 .ne. 2) STOP 2 if (a2 .ne. 5 .or. b2 .ne. -16 .or. c2 .ne. 6 .or. d2 .ne. 2) stop 2
a2 = 10 a2 = 10
if (a2 .ne. 10) STOP 3 if (a2 .ne. 10) stop 3
!$omp atomic capture !$omp atomic capture
a2 = a a2 = a
a = e(1) + e(6) + e(7) * 2 a = e(1) + e(6) + e(7) * 2
!$omp endatomic !$omp endatomic
if (a2 .ne. 5) STOP 4 if (a2 .ne. 5) stop 4
!$omp atomic read !$omp atomic read
a2 = a a2 = a
!$omp end atomic !$omp end atomic
if (a2 .ne. 28) STOP 5 if (a2 .ne. 28) stop 5
!$omp atomic capture seq_cst !$omp atomic capture seq_cst
b2 = b b2 = b
b = e(1) + e(7) + e(5) * 2 b = e(1) + e(7) + e(5) * 2
!$omp end atomic !$omp end atomic
if (b2 .ne. -16) STOP 6 if (b2 .ne. -16) stop 6
!$omp atomic seq_cst, read !$omp atomic seq_cst, read
b2 = b b2 = b
!$omp end atomic !$omp end atomic
if (b2 .ne. 24) STOP 7 if (b2 .ne. 24) stop 7
end end
C Test conditional compilation in fixed form if -fopenmp C Test conditional compilation in fixed form if -fopenmp
10 foo = 2 10 foo = 2
&56 &56
if (foo.ne.256) STOP 1 if (foo.ne.256) stop 1
bar = 26 bar = 26
!$2 0 ba !$2 0 ba
c$ +r = 42 c$ +r = 42
!$ bar = 62 !$ bar = 62
!$ bar = bar + 1 !$ bar = bar + 1
if (bar.ne.43) STOP 2 if (bar.ne.43) stop 2
baz = bar baz = bar
*$ 0baz = 5 *$ 0baz = 5
C$ +12! Comment C$ +12! Comment
...@@ -17,5 +17,5 @@ c$ !4 ...@@ -17,5 +17,5 @@ c$ !4
!$ X baz = 0 ! Not valid OpenMP conditional compilation lines !$ X baz = 0 ! Not valid OpenMP conditional compilation lines
! $ baz = 1 ! $ baz = 1
c$ 10&baz = 2 c$ 10&baz = 2
if (baz.ne.51242) STOP 3 if (baz.ne.51242) stop 3
end end
...@@ -2,13 +2,13 @@ c Test conditional compilation in fixed form if -fno-openmp ...@@ -2,13 +2,13 @@ c Test conditional compilation in fixed form if -fno-openmp
! { dg-options "-fno-openmp" } ! { dg-options "-fno-openmp" }
10 foo = 2 10 foo = 2
&56 &56
if (foo.ne.256) STOP 1 if (foo.ne.256) stop 1
bar = 26 bar = 26
!$2 0 ba !$2 0 ba
c$ +r = 42 c$ +r = 42
!$ bar = 62 !$ bar = 62
!$ bar = bar + 1 !$ bar = bar + 1
if (bar.ne.26) STOP 2 if (bar.ne.26) stop 2
baz = bar baz = bar
*$ 0baz = 5 *$ 0baz = 5
C$ +12! Comment C$ +12! Comment
...@@ -18,5 +18,5 @@ c$ !4 ...@@ -18,5 +18,5 @@ c$ !4
!$ X baz = 0 ! Not valid OpenMP conditional compilation lines !$ X baz = 0 ! Not valid OpenMP conditional compilation lines
! $ baz = 1 ! $ baz = 1
c$ 10&baz = 2 c$ 10&baz = 2
if (baz.ne.26) STOP 3 if (baz.ne.26) stop 3
end end
! Test conditional compilation in free form if -fopenmp ! Test conditional compilation in free form if -fopenmp
10 foo = 2& 10 foo = 2&
&56 &56
if (foo.ne.256) STOP 1 if (foo.ne.256) stop 1
bar = 26 bar = 26
!$ 20 ba& !$ 20 ba&
!$ &r = 4& !$ &r = 4&
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifdef _OPENMP #ifdef _OPENMP
bar = bar - 1 bar = bar - 1
#endif #endif
if (bar.ne.43) STOP 2 if (bar.ne.43) stop 2
baz = bar baz = bar
!$ 30 baz = 5& ! Comment !$ 30 baz = 5& ! Comment
!$12 & !$12 &
...@@ -19,5 +19,5 @@ bar = bar - 1 ...@@ -19,5 +19,5 @@ bar = bar - 1
!$X baz = 0 ! Not valid OpenMP conditional compilation lines !$X baz = 0 ! Not valid OpenMP conditional compilation lines
! $ baz = 1 ! $ baz = 1
baz = baz + 1 !$ baz = 2 baz = baz + 1 !$ baz = 2
if (baz.ne.515) STOP 3 if (baz.ne.515) stop 3
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
! { dg-options "-fno-openmp" } ! { dg-options "-fno-openmp" }
10 foo = 2& 10 foo = 2&
&56 &56
if (foo.ne.256) STOP 1 if (foo.ne.256) stop 1
bar = 26 bar = 26
!$ 20 ba& !$ 20 ba&
!$ &r = 4& !$ &r = 4&
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#ifdef _OPENMP #ifdef _OPENMP
bar = bar - 1 bar = bar - 1
#endif #endif
if (bar.ne.26) STOP 2 if (bar.ne.26) stop 2
baz = bar baz = bar
!$ 30 baz = 5& ! Comment !$ 30 baz = 5& ! Comment
!$12 & !$12 &
...@@ -20,5 +20,5 @@ bar = bar - 1 ...@@ -20,5 +20,5 @@ bar = bar - 1
!$X baz = 0 ! Not valid OpenMP conditional compilation lines !$X baz = 0 ! Not valid OpenMP conditional compilation lines
! $ baz = 1 ! $ baz = 1
baz = baz + 1 !$ baz = 2 baz = baz + 1 !$ baz = 2
if (baz.ne.27) STOP 3 if (baz.ne.27) stop 3
end end
...@@ -43,16 +43,16 @@ contains ...@@ -43,16 +43,16 @@ contains
d(b + 1) = c d(b + 1) = c
if (f .ne. g .or. f .ne. b) h = .true. if (f .ne. g .or. f .ne. b) h = .true.
!$omp endparallel !$omp endparallel
if (h) STOP 1 if (h) stop 1
if (a .ne. 6) STOP 2 if (a .ne. 6) stop 2
if (j .ne. 24) STOP 3 if (j .ne. 24) stop 3
if (d(1) .eq. -1) STOP 4 if (d(1) .eq. -1) stop 4
e = 1 e = 1
do g = 1, d(1) do g = 1, d(1)
if (d(g) .ne. d(1)) STOP 5 if (d(g) .ne. d(1)) stop 5
e = e * 2 e = e * 2
end do end do
if (e .ne. i) STOP 6 if (e .ne. i) stop 6
end subroutine test_parallel end subroutine test_parallel
subroutine test_do_orphan subroutine test_do_orphan
...@@ -79,7 +79,7 @@ contains ...@@ -79,7 +79,7 @@ contains
call test_do_orphan call test_do_orphan
!$omp do schedule (static) firstprivate (n) !$omp do schedule (static) firstprivate (n)
do 200 i = 1, j do 200 i = 1, j
if (i .eq. 1 .and. n .ne. 24) STOP 7 if (i .eq. 1 .and. n .ne. 24) stop 7
n = i n = i
200 d(n) = omp_get_thread_num () 200 d(n) = omp_get_thread_num ()
!$omp enddo nowait !$omp enddo nowait
...@@ -103,11 +103,11 @@ contains ...@@ -103,11 +103,11 @@ contains
end do end do
! Implied omp end do here ! Implied omp end do here
!$omp end parallel !$omp end parallel
if (.not. m) STOP 8 if (.not. m) stop 8
j = 0 j = 0
do i = 1, 64 do i = 1, 64
if (d(i) .lt. j .or. d(i) .ge. j + k) STOP 9 if (d(i) .lt. j .or. d(i) .ge. j + k) stop 9
if (i .eq. 16) j = 1024 if (i .eq. 16) j = 1024
if (i .eq. 32) j = 2048 if (i .eq. 32) j = 2048
if (i .eq. 48) j = 4096 if (i .eq. 48) j = 4096
...@@ -152,9 +152,9 @@ contains ...@@ -152,9 +152,9 @@ contains
n = 7 n = 7
!$omp endsections !$omp endsections
!$omp end parallel !$omp end parallel
if (j .ne. 271 .or. l .ne. 0) STOP 10 if (j .ne. 271 .or. l .ne. 0) stop 10
if (m .ne. 4 + 6 + 8 + 10) STOP 11 if (m .ne. 4 + 6 + 8 + 10) stop 11
if (n .ne. 7) STOP 12 if (n .ne. 7) stop 12
end subroutine test_sections end subroutine test_sections
subroutine test_single subroutine test_single
...@@ -182,6 +182,6 @@ contains ...@@ -182,6 +182,6 @@ contains
!$omp end single copyprivate (j) !$omp end single copyprivate (j)
if (i .ne. omp_get_thread_num () .or. j .ne. -2) m = .true. if (i .ne. omp_get_thread_num () .or. j .ne. -2) m = .true.
!$omp endparallel !$omp endparallel
if (m) STOP 13 if (m) stop 13
end subroutine test_single end subroutine test_single
end end
...@@ -16,7 +16,7 @@ contains ...@@ -16,7 +16,7 @@ contains
j = omp_get_thread_num () .eq. 0 j = omp_get_thread_num () .eq. 0
!$omp endmaster !$omp endmaster
!$omp end parallel !$omp end parallel
if (.not. (i .or. j)) STOP 1 if (.not. (i .or. j)) stop 1
end subroutine test_master end subroutine test_master
subroutine test_critical_1 (i, j) subroutine test_critical_1 (i, j)
...@@ -45,7 +45,7 @@ contains ...@@ -45,7 +45,7 @@ contains
i = i + 1 i = i + 1
!$omp endcritical (critical_foo) !$omp endcritical (critical_foo)
!$omp end parallel !$omp end parallel
if (n .lt. 1 .or. i .ne. n * 3 .or. j .ne. n * 3) STOP 2 if (n .lt. 1 .or. i .ne. n * 3 .or. j .ne. n * 3) stop 2
end subroutine test_critical end subroutine test_critical
subroutine test_barrier subroutine test_barrier
...@@ -62,7 +62,7 @@ contains ...@@ -62,7 +62,7 @@ contains
j = j .or. .true. j = j .or. .true.
end if end if
!$omp end parallel !$omp end parallel
if (i .ne. 5 .or. j) STOP 3 if (i .ne. 5 .or. j) stop 3
end subroutine test_barrier end subroutine test_barrier
subroutine test_atomic subroutine test_atomic
...@@ -89,14 +89,14 @@ contains ...@@ -89,14 +89,14 @@ contains
f = max (omp_get_thread_num (), f) f = max (omp_get_thread_num (), f)
if (omp_get_thread_num () .eq. 0) g = omp_get_num_threads () if (omp_get_thread_num () .eq. 0) g = omp_get_num_threads ()
!$omp end parallel !$omp end parallel
if (g .le. 0 .or. g .gt. 8) STOP 4 if (g .le. 0 .or. g .gt. 8) stop 4
if (a .ne. 6 * g .or. b .ne. 3 ** g) STOP 5 if (a .ne. 6 * g .or. b .ne. 3 ** g) stop 5
if (iand (g, 1) .eq. 1) then if (iand (g, 1) .eq. 1) then
if (c .ne. 8) STOP 6 if (c .ne. 8) stop 6
else if (c .ne. 0) then else if (c .ne. 0) then
STOP 7 stop 7
end if end if
if (d .ne. 1024 / (2 ** g)) STOP 8 if (d .ne. 1024 / (2 ** g)) stop 8
if (e .ne. 0 .or. f .ne. g - 1) STOP 9 if (e .ne. 0 .or. f .ne. g - 1) stop 9
end subroutine test_atomic end subroutine test_atomic
end end
...@@ -45,10 +45,10 @@ contains ...@@ -45,10 +45,10 @@ contains
j = 1 j = 1
do 100 i = 1, 100 do 100 i = 1, 100
if (i .eq. j) then if (i .eq. j) then
if (d(i) .ne. i) STOP 1 if (d(i) .ne. i) stop 1
j = i + 5 j = i + 5
else else
if (d(i) .ne. -1) STOP 2 if (d(i) .ne. -1) stop 2
end if end if
100 d(i) = -1 100 d(i) = -1
end subroutine test_ordered end subroutine test_ordered
...@@ -69,17 +69,17 @@ contains ...@@ -69,17 +69,17 @@ contains
!$omp parallel copyin (/tlsblock/, z) reduction (.or.:m) & !$omp parallel copyin (/tlsblock/, z) reduction (.or.:m) &
!$omp& num_threads (4) !$omp& num_threads (4)
if (omp_get_thread_num () .eq. 0) i = omp_get_num_threads () if (omp_get_thread_num () .eq. 0) i = omp_get_num_threads ()
if (x .ne. 6 .or. y .ne. 7 .or. z .ne. 8) STOP 3 if (x .ne. 6 .or. y .ne. 7 .or. z .ne. 8) stop 3
x = omp_get_thread_num () x = omp_get_thread_num ()
y = omp_get_thread_num () + 1024 y = omp_get_thread_num () + 1024
z = omp_get_thread_num () + 4096 z = omp_get_thread_num () + 4096
!$omp end parallel !$omp end parallel
if (x .ne. 0 .or. y .ne. 1024 .or. z .ne. 4096) STOP 4 if (x .ne. 0 .or. y .ne. 1024 .or. z .ne. 4096) stop 4
!$omp parallel num_threads (4), private (j) reduction (.or.:n) !$omp parallel num_threads (4), private (j) reduction (.or.:n)
if (omp_get_num_threads () .eq. i) then if (omp_get_num_threads () .eq. i) then
j = omp_get_thread_num () j = omp_get_thread_num ()
if (x .ne. j .or. y .ne. j + 1024 .or. z .ne. j + 4096) & if (x .ne. j .or. y .ne. j + 1024 .or. z .ne. j + 4096) &
& STOP 5 & stop 5
end if end if
!$omp end parallel !$omp end parallel
m = m .or. n m = m .or. n
...@@ -89,9 +89,9 @@ contains ...@@ -89,9 +89,9 @@ contains
if (z .ne. 4096) n = .true. if (z .ne. 4096) n = .true.
if (omp_get_num_threads () .eq. i) then if (omp_get_num_threads () .eq. i) then
j = omp_get_thread_num () j = omp_get_thread_num ()
if (x .ne. j .or. y .ne. j + 1024) STOP 6 if (x .ne. j .or. y .ne. j + 1024) stop 6
end if end if
!$omp end parallel !$omp end parallel
if (m .or. n) STOP 7 if (m .or. n) stop 7
end subroutine test_threadprivate end subroutine test_threadprivate
end end
...@@ -59,14 +59,14 @@ contains ...@@ -59,14 +59,14 @@ contains
!$omp end parallel !$omp end parallel
if (any (f .ne. (/100, 100, 100, 210, 210, 210, 310, 310, 337, 337/))) & if (any (f .ne. (/100, 100, 100, 210, 210, 210, 310, 310, 337, 337/))) &
& STOP 1 & stop 1
if (any (g .ne. (/-1, -1, -1, 0, 0, 0, 0, 0, 0, 0/))) STOP 2 if (any (g .ne. (/-1, -1, -1, 0, 0, 0, 0, 0, 0, 0/))) stop 2
if (i .ne. 20) STOP 3 if (i .ne. 20) stop 3
!$ if (l .ne. 128 + m) STOP 4 !$ if (l .ne. 128 + m) stop 4
if (any (d .ne. 1 .or. e .ne. 1)) STOP 5 if (any (d .ne. 1 .or. e .ne. 1)) stop 5
if (any (b .ne. transpose (a))) STOP 6 if (any (b .ne. transpose (a))) stop 6
if (any (c .ne. b)) STOP 7 if (any (c .ne. b)) stop 7
if (any (n .ne. (/1, 2, 6, 12, 5, 30, 42, 56, 9, 90, & if (any (n .ne. (/1, 2, 6, 12, 5, 30, 42, 56, 9, 90, &
& 110, 132, 13, 182, 210, 240/))) STOP 8 & 110, 132, 13, 182, 210, 240/))) stop 8
end subroutine test_workshare end subroutine test_workshare
end end
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
implicit none implicit none
include "omp_lib.h" include "omp_lib.h"
if (openmp_version .ne. 201511) STOP 1; if (openmp_version .ne. 201511) stop 1;
end program main end program main
...@@ -4,6 +4,6 @@ program main ...@@ -4,6 +4,6 @@ program main
use omp_lib use omp_lib
implicit none implicit none
if (openmp_version .ne. 201511) STOP 1; if (openmp_version .ne. 201511) stop 1;
end program main end program main
...@@ -34,7 +34,7 @@ program main ...@@ -34,7 +34,7 @@ program main
call foo () call foo ()
do i = 0, n - 1 do i = 0, n - 1
if (c(i) .ne. (i + MODULO ((i * 3), 7))) STOP 1 if (c(i) .ne. (i + MODULO ((i * 3), 7))) stop 1
end do end do
end program end program
...@@ -35,7 +35,7 @@ program main ...@@ -35,7 +35,7 @@ program main
call foo (n) call foo (n)
do i = 0, n - 1 do i = 0, n - 1
if (c(i) .ne. (i + MODULO ((i * 3), 7))) STOP 1 if (c(i) .ne. (i + MODULO ((i * 3), 7))) stop 1
end do end do
end program end program
...@@ -21,7 +21,7 @@ contains ...@@ -21,7 +21,7 @@ contains
c(1) = c(1) + 1 c(1) = c(1) + 1
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (a.ne.r.or.c(1).ne.r) STOP 1 if (a.ne.r.or.c(1).ne.r) stop 1
r2 = r r2 = r
b => a b => a
d => c d => c
...@@ -33,7 +33,7 @@ contains ...@@ -33,7 +33,7 @@ contains
d(1) = d(1) + 1 d(1) = d(1) + 1
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (b.ne.r+r2.or.d(1).ne.r+r2) STOP 2 if (b.ne.r+r2.or.d(1).ne.r+r2) stop 2
end subroutine foo end subroutine foo
subroutine bar (a, c) subroutine bar (a, c)
integer, pointer :: a, c(:), b, d(:) integer, pointer :: a, c(:), b, d(:)
...@@ -55,8 +55,8 @@ contains ...@@ -55,8 +55,8 @@ contains
end if end if
end do end do
!$omp end parallel do !$omp end parallel do
if (b.ne.100.or.any(d.ne.10)) STOP 3 if (b.ne.100.or.any(d.ne.10)) stop 3
if (a.ne.17.or.any(c.ne.21)) STOP 4 if (a.ne.17.or.any(c.ne.21)) stop 4
a => b a => b
c => d c => d
!$omp parallel do firstprivate (b, d) lastprivate (b, d) !$omp parallel do firstprivate (b, d) lastprivate (b, d)
...@@ -71,7 +71,7 @@ contains ...@@ -71,7 +71,7 @@ contains
end if end if
end do end do
!$omp end parallel do !$omp end parallel do
if (a.ne.200.or.any(c.ne.20)) STOP 5 if (a.ne.200.or.any(c.ne.20)) stop 5
if (b.ne.17.or.any(d.ne.21)) STOP 6 if (b.ne.17.or.any(d.ne.21)) stop 6
end subroutine bar end subroutine bar
end end
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
thr(1) = thr(1) + 1 thr(1) = thr(1) + 1
i = i + 1 i = i + 1
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
if (thr(1).ne.14) STOP 2 if (thr(1).ne.14) stop 2
if (s(1).ne.1+i) STOP 3 if (s(1).ne.1+i) stop 3
if (u(1).ne.14) STOP 4 if (u(1).ne.14) stop 4
end end
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
end do end do
!$omp end do !$omp end do
!$omp end parallel !$omp end parallel
if (k .ne. 100) STOP 1 if (k .ne. 100) stop 1
end end
...@@ -8,7 +8,7 @@ program pr27395_1 ...@@ -8,7 +8,7 @@ program pr27395_1
integer, dimension(n) :: sumarray integer, dimension(n) :: sumarray
call foo(n,m,sumarray) call foo(n,m,sumarray)
do i=1,n do i=1,n
if (sumarray(i).ne.m*i) STOP 1 if (sumarray(i).ne.m*i) stop 1
end do end do
end program pr27395_1 end program pr27395_1
......
...@@ -25,6 +25,6 @@ subroutine foo(n,m) ...@@ -25,6 +25,6 @@ subroutine foo(n,m)
!$OMP END DO !$OMP END DO
!$OMP END PARALLEL !$OMP END PARALLEL
do i=1,n do i=1,n
if (sumarray(i).ne.m*i) STOP 1 if (sumarray(i).ne.m*i) stop 1
end do end do
end subroutine foo end subroutine foo
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
!$omp parallel num_threads (4) !$omp parallel num_threads (4)
call foo (j) call foo (j)
!$omp end parallel !$omp end parallel
if (j.ne.6+16) STOP 1 if (j.ne.6+16) stop 1
end end
subroutine foo (j) subroutine foo (j)
......
...@@ -22,5 +22,5 @@ program pr27916 ...@@ -22,5 +22,5 @@ program pr27916
r = r .or. allocated (a) r = r .or. allocated (a)
end do end do
!$omp end parallel do !$omp end parallel do
if (r) STOP 1 if (r) stop 1
end program pr27916 end program pr27916
...@@ -22,5 +22,5 @@ program pr27916 ...@@ -22,5 +22,5 @@ program pr27916
r = r .or. allocated (a) r = r .or. allocated (a)
end do end do
!$omp end parallel do !$omp end parallel do
if (r) STOP 1 if (r) stop 1
end program pr27916 end program pr27916
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
!$omp parallel do lastprivate(i) !$omp parallel do lastprivate(i)
do i=1,100 do i=1,100
end do end do
if (i.ne.101) STOP 1 if (i.ne.101) stop 1
end end
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
program pr29629 program pr29629
integer :: n integer :: n
n = 10000 n = 10000
if (any (func(n).ne.10000)) STOP 1 if (any (func(n).ne.10000)) stop 1
contains contains
function func(n) function func(n)
integer, intent(in) :: n integer, intent(in) :: n
......
...@@ -17,5 +17,5 @@ ...@@ -17,5 +17,5 @@
e = e + 1 e = e + 1
end if end if
!$omp end parallel !$omp end parallel
if (e.ne.0) STOP 1 if (e.ne.0) stop 1
end end
...@@ -9,7 +9,7 @@ program pr33880 ...@@ -9,7 +9,7 @@ program pr33880
!$omp atomic !$omp atomic
j = j + 1 j = j + 1
end do end do
if (j .ne. 1000) STOP 1 if (j .ne. 1000) stop 1
contains contains
subroutine something() subroutine something()
i = 0 i = 0
......
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
do i = 1, 300000 do i = 1, 300000
call atomic_add(lhs, rhs) call atomic_add(lhs, rhs)
enddo enddo
if (lhs .ne. 300000) STOP 1 if (lhs .ne. 300000) stop 1
end end
...@@ -11,7 +11,7 @@ program pr35130 ...@@ -11,7 +11,7 @@ program pr35130
call inner(k) call inner(k)
end do end do
!$omp end parallel do !$omp end parallel do
if (any (a.ne.42)) STOP 1 if (any (a.ne.42)) stop 1
contains contains
subroutine inner(i) subroutine inner(i)
implicit none implicit none
......
...@@ -49,5 +49,5 @@ program pr42162 ...@@ -49,5 +49,5 @@ program pr42162
!$omp parallel num_threads(3) !$omp parallel num_threads(3)
call sub3 (k, c) call sub3 (k, c)
!$omp end parallel !$omp end parallel
if (k.ne.4.or.any(a.ne.2).or.any(b.ne.3).or.any(c.ne.4)) STOP 1 if (k.ne.4.or.any(a.ne.2).or.any(b.ne.3).or.any(c.ne.4)) stop 1
end end
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
do i = 2147483636, 2147483646 do i = 2147483636, 2147483646
j = j + 1 j = j + 1
end do end do
if (j.ne.11) STOP 1 if (j.ne.11) stop 1
j = 0 j = 0
!$omp parallel do reduction(+:j) !$omp parallel do reduction(+:j)
do i = -2147483637, -2147483647, -1 do i = -2147483637, -2147483647, -1
j = j + 1 j = j + 1
end do end do
if (j.ne.11) STOP 2 if (j.ne.11) stop 2
end end
...@@ -19,5 +19,5 @@ ...@@ -19,5 +19,5 @@
endif endif
!$omp end parallel !$omp end parallel
!$omp end parallel !$omp end parallel
if (err .ne. 0) STOP 1 if (err .ne. 0) stop 1
end end
...@@ -14,5 +14,5 @@ program pr49792 ...@@ -14,5 +14,5 @@ program pr49792
real(kind=8) :: b(16) real(kind=8) :: b(16)
b(:) = a(16:1:-1) b(:) = a(16:1:-1)
call reverse (16,a) call reverse (16,a)
if (any (a.ne.b)) STOP 1 if (any (a.ne.b)) stop 1
end program pr49792 end program pr49792
...@@ -17,6 +17,6 @@ program pr49792 ...@@ -17,6 +17,6 @@ program pr49792
!$omp parallel workshare !$omp parallel workshare
a = b a = b
!$omp end parallel workshare !$omp end parallel workshare
if (size(a).ne.size(b)) STOP 1 if (size(a).ne.size(b)) stop 1
if (any (a.ne.b)) STOP 2 if (any (a.ne.b)) stop 2
end program pr49792 end program pr49792
...@@ -10,5 +10,5 @@ program pr63938_1 ...@@ -10,5 +10,5 @@ program pr63938_1
x(1) = x(1) + 1 x(1) = x(1) + 1
end do end do
!$omp end parallel do !$omp end parallel do
if (x(1) .ne. 1000) STOP 1 if (x(1) .ne. 1000) stop 1
end program pr63938_1 end program pr63938_1
...@@ -14,5 +14,5 @@ program pr63938_2 ...@@ -14,5 +14,5 @@ program pr63938_2
x%x = x%x + 1 x%x = x%x + 1
end do end do
!$omp end parallel do !$omp end parallel do
if (x%x .ne. 1000) STOP 1 if (x%x .ne. 1000) stop 1
end program pr63938_2 end program pr63938_2
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
end do end do
do i = 1, 151 do i = 1, 151
if (mod (i, 31) .eq. 1) then if (mod (i, 31) .eq. 1) then
if (a(i) .ne. 2) STOP 1 if (a(i) .ne. 2) stop 1
else else
if (a(i) .ne. 0) STOP 2 if (a(i) .ne. 0) stop 2
end if end if
end do end do
end end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
do d = a, b do d = a, b
u(d) = v(d) + w(d) u(d) = v(d) + w(d)
end do end do
if (d .ne. 1025) STOP 1 if (d .ne. 1025) stop 1
c = 17 c = 17
d = 75 d = 75
!$omp parallel do simd default(none) firstprivate (a, b) shared(u, v, w) & !$omp parallel do simd default(none) firstprivate (a, b) shared(u, v, w) &
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
c = c + 5 c = c + 5
e = c e = c
end do end do
if (d .ne. 1025 .or. c .ne. (17 + 5 * 1024)) STOP 2 if (d .ne. 1025 .or. c .ne. (17 + 5 * 1024)) stop 2
if (e .ne. (17 + 5 * 1024)) STOP 3 if (e .ne. (17 + 5 * 1024)) stop 3
a1 = 0 a1 = 0
a2 = 0 a2 = 0
b1 = 31 b1 = 31
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
u(d1 * 32 + d2 + 1) = v(d1 * 32 + d2 + 1) + w(d1 * 32 + d2 + 1) u(d1 * 32 + d2 + 1) = v(d1 * 32 + d2 + 1) + w(d1 * 32 + d2 + 1)
end do end do
end do end do
if (d1 .ne. 32 .or. d2 .ne. 32) STOP 4 if (d1 .ne. 32 .or. d2 .ne. 32) stop 4
d1 = 7 d1 = 7
d2 = 9 d2 = 9
!$omp parallel do simd default(none) firstprivate (a1, b1, a2, b2) & !$omp parallel do simd default(none) firstprivate (a1, b1, a2, b2) &
...@@ -45,5 +45,5 @@ ...@@ -45,5 +45,5 @@
u(d1 * 32 + d2 + 1) = v(d1 * 32 + d2 + 1) + w(d1 * 32 + d2 + 1) u(d1 * 32 + d2 + 1) = v(d1 * 32 + d2 + 1) + w(d1 * 32 + d2 + 1)
end do end do
end do end do
if (d1 .ne. 32 .or. d2 .ne. 32) STOP 5 if (d1 .ne. 32 .or. d2 .ne. 32) stop 5
end end
...@@ -16,5 +16,5 @@ program pr71014 ...@@ -16,5 +16,5 @@ program pr71014
end do end do
end associate end associate
end do end do
if (any(s /= t)) STOP 1 if (any(s /= t)) stop 1
end program pr71014 end program pr71014
...@@ -13,5 +13,5 @@ program pr81304 ...@@ -13,5 +13,5 @@ program pr81304
a = min (a, c) a = min (a, c)
b = max (b, c) b = max (b, c)
end do end do
if (any (a /= (/ 1, -4, 6 /)) .or. any (b /= (/ 16, 11, 21 /))) STOP 1 if (any (a /= (/ 1, -4, 6 /)) .or. any (b /= (/ 16, 11, 21 /))) stop 1
end end
...@@ -17,10 +17,10 @@ program pr81841 ...@@ -17,10 +17,10 @@ program pr81841
common /c/ e, f common /c/ e, f
!$omp threadprivate (/c/) !$omp threadprivate (/c/)
!$omp parallel num_threads(8) !$omp parallel num_threads(8)
if ((e /= 32) .or. any(f /= 1.)) STOP 1 if ((e /= 32) .or. any(f /= 1.)) stop 1
e = omp_get_thread_num () e = omp_get_thread_num ()
f = e + 19. f = e + 19.
!$omp barrier !$omp barrier
if ((e /= omp_get_thread_num ()) .or. any(f /= e + 19.)) STOP 2 if ((e /= omp_get_thread_num ()) .or. any(f /= e + 19.)) stop 2
!$omp end parallel !$omp end parallel
end end
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
c(i) = foo (a(i), b(i)) c(i) = foo (a(i), b(i))
end do end do
do i = 1, 1024 do i = 1, 1024
if (c(i).ne.(2 * i)) STOP 1 if (c(i).ne.(2 * i)) stop 1
end do end do
contains contains
real function foo (x, y) real function foo (x, y)
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
c(i) = foo (a(i), b(:,i)) c(i) = foo (a(i), b(:,i))
end do end do
do i = 1, 1024 do i = 1, 1024
if (c(i).ne.(6 * i)) STOP 1 if (c(i).ne.(6 * i)) stop 1
end do end do
contains contains
function foo (x, y) function foo (x, y)
......
...@@ -11,25 +11,25 @@ ...@@ -11,25 +11,25 @@
integer :: i integer :: i
ptr => foo ptr => foo
!$omp parallel shared (ptr) !$omp parallel shared (ptr)
if (ptr () /= 1) STOP 1 if (ptr () /= 1) stop 1
!$omp end parallel !$omp end parallel
ptr => bar ptr => bar
!$omp parallel firstprivate (ptr) !$omp parallel firstprivate (ptr)
if (ptr () /= 2) STOP 2 if (ptr () /= 2) stop 2
!$omp end parallel !$omp end parallel
!$omp parallel sections lastprivate (ptr) !$omp parallel sections lastprivate (ptr)
!$omp section !$omp section
ptr => foo ptr => foo
if (ptr () /= 1) STOP 3 if (ptr () /= 1) stop 3
!$omp section !$omp section
ptr => bar ptr => bar
if (ptr () /= 2) STOP 4 if (ptr () /= 2) stop 4
!$omp section !$omp section
ptr => baz ptr => baz
if (ptr () /= 3) STOP 5 if (ptr () /= 3) stop 5
!$omp end parallel sections !$omp end parallel sections
if (ptr () /= 3) STOP 6 if (ptr () /= 3) stop 6
if (.not.associated (ptr, baz)) STOP 7 if (.not.associated (ptr, baz)) stop 7
end end
integer function foo () integer function foo ()
foo = 1 foo = 1
......
...@@ -14,7 +14,7 @@ do i=1,10 ...@@ -14,7 +14,7 @@ do i=1,10
call sub(i) call sub(i)
end do end do
!$omp end parallel do !$omp end parallel do
if (s/=55) STOP 1 if (s/=55) stop 1
contains contains
......
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
ca = cmplx (-1, 0) ca = cmplx (-1, 0)
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 1 if (v) stop 1
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (i .ne. 8 .or. any (ia .ne. (/3, 3, 1, 6, 6, 8/))) STOP 2 if (i .ne. 8 .or. any (ia .ne. (/3, 3, 1, 6, 6, 8/))) stop 2
if (r .ne. 8 .or. any (ra .ne. (/9.5, 8.0, 1.5, 1.5/))) STOP 3 if (r .ne. 8 .or. any (ra .ne. (/9.5, 8.0, 1.5, 1.5/))) stop 3
if (d .ne. 12.5 .or. any (da .ne. (/8.0, 16.5, 16.5, 14.0, 5.5/))) STOP 4 if (d .ne. 12.5 .or. any (da .ne. (/8.0, 16.5, 16.5, 14.0, 5.5/))) stop 4
if (c .ne. cmplx (11.5, -5)) STOP 5 if (c .ne. cmplx (11.5, -5)) stop 5
if (ca(1) .ne. cmplx (12, 2)) STOP 6 if (ca(1) .ne. cmplx (12, 2)) stop 6
if (ca(2) .ne. cmplx (6.5, 3) .or. ca(2) .ne. ca(3)) STOP 7 if (ca(2) .ne. cmplx (6.5, 3) .or. ca(2) .ne. ca(3)) stop 7
end if end if
i = 1 i = 1
...@@ -113,14 +113,14 @@ ...@@ -113,14 +113,14 @@
ca = cmplx (-1, 0) ca = cmplx (-1, 0)
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 8 if (v) stop 8
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (i .ne. 8 .or. any (ia .ne. (/3, 3, 1, 6, 6, 8/))) STOP 9 if (i .ne. 8 .or. any (ia .ne. (/3, 3, 1, 6, 6, 8/))) stop 9
if (r .ne. 8 .or. any (ra .ne. (/9.5, 8.0, 1.5, 1.5/))) STOP 10 if (r .ne. 8 .or. any (ra .ne. (/9.5, 8.0, 1.5, 1.5/))) stop 10
if (d .ne. 12.5 .or. any (da .ne. (/8.0, 16.5, 16.5, 14.0, 5.5/))) STOP 11 if (d .ne. 12.5 .or. any (da .ne. (/8.0, 16.5, 16.5, 14.0, 5.5/))) stop 11
if (c .ne. cmplx (11.5, -5)) STOP 12 if (c .ne. cmplx (11.5, -5)) stop 12
if (ca(1) .ne. cmplx (12, 2)) STOP 13 if (ca(1) .ne. cmplx (12, 2)) stop 13
if (ca(2) .ne. cmplx (6.5, 3) .or. ca(2) .ne. ca(3)) STOP 14 if (ca(2) .ne. cmplx (6.5, 3) .or. ca(2) .ne. ca(3)) stop 14
end if end if
i = 1 i = 1
...@@ -169,13 +169,13 @@ ...@@ -169,13 +169,13 @@
ca = cmplx (-1, 0) ca = cmplx (-1, 0)
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 15 if (v) stop 15
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (i .ne. 6 .or. any (ia .ne. (/4, 4, 8, -16, -16, -8/))) STOP 16 if (i .ne. 6 .or. any (ia .ne. (/4, 4, 8, -16, -16, -8/))) stop 16
if (r .ne. 8 .or. any (ra .ne. (/4., -2., -1., -1./))) STOP 17 if (r .ne. 8 .or. any (ra .ne. (/4., -2., -1., -1./))) stop 17
if (d .ne. -40 .or. any (da .ne. (/32., -64., -64., 64., -32./))) STOP 18 if (d .ne. -40 .or. any (da .ne. (/32., -64., -64., 64., -32./))) stop 18
if (c .ne. cmplx (0, 15)) STOP 19 if (c .ne. cmplx (0, 15)) stop 19
if (ca(1) .ne. cmplx (0, 10)) STOP 20 if (ca(1) .ne. cmplx (0, 10)) stop 20
if (ca(2) .ne. cmplx (-2, 0) .or. ca(2) .ne. ca(3)) STOP 21 if (ca(2) .ne. cmplx (-2, 0) .or. ca(2) .ne. ca(3)) stop 21
end if end if
end end
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
ma(1) = .true. ma(1) = .true.
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 1 if (v) stop 1
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (l .or. any (la .neqv. (/.true., .false., .false., .false./))) STOP 2 if (l .or. any (la .neqv. (/.true., .false., .false., .false./))) stop 2
if (.not. m .or. any (ma .neqv. (/.true., .true., .false., .true./))) STOP 3 if (.not. m .or. any (ma .neqv. (/.true., .true., .false., .true./))) stop 3
end if end if
l = .true. l = .true.
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
ma(1) = .true. ma(1) = .true.
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 4 if (v) stop 4
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (.not. l .or. any (la .neqv. (/.true., .false., .true., .false./))) STOP 5 if (.not. l .or. any (la .neqv. (/.true., .false., .true., .false./))) stop 5
if (.not. m .or. any (ma .neqv. (/.false., .true., .false., .true./))) STOP 6 if (.not. m .or. any (ma .neqv. (/.false., .true., .false., .true./))) stop 6
end if end if
end end
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
da = -1 da = -1
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 1 if (v) stop 1
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (i .ne. 4 .or. any (ia .ne. (/7, 2, 2, 5, 5, 5/))) STOP 2 if (i .ne. 4 .or. any (ia .ne. (/7, 2, 2, 5, 5, 5/))) stop 2
if (r .ne. 5 .or. any (ra .ne. (/6.5, 6.5, 4., 4./))) STOP 3 if (r .ne. 5 .or. any (ra .ne. (/6.5, 6.5, 4., 4./))) stop 3
if (d .ne. 8.5 .or. any (da .ne. (/6.5, 8.5, 8.5, 8.5, 6.5/))) STOP 4 if (d .ne. 8.5 .or. any (da .ne. (/6.5, 8.5, 8.5, 8.5, 6.5/))) stop 4
end if end if
i = 1 i = 1
...@@ -94,10 +94,10 @@ ...@@ -94,10 +94,10 @@
da(1:4) = 6 da(1:4) = 6
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 5 if (v) stop 5
if (cnt .eq. 3) then if (cnt .eq. 3) then
if (i .ne. 1 .or. any (ia .ne. (/1, 1, -2, -2, -2, 1/))) STOP 6 if (i .ne. 1 .or. any (ia .ne. (/1, 1, -2, -2, -2, 1/))) stop 6
if (r .ne. -1 .or. any (ra .ne. (/4., -1.5, -8.5, -1.5/))) STOP 7 if (r .ne. -1 .or. any (ra .ne. (/4., -1.5, -8.5, -1.5/))) stop 7
if (d .ne. -2.5 .or. any (da .ne. (/2.5, 2.5, 2.5, 6., 6.5/))) STOP 8 if (d .ne. -2.5 .or. any (da .ne. (/2.5, 2.5, 2.5, 6., 6.5/))) stop 8
end if end if
end end
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
ka(6:6) = int(Z'777') ka(6:6) = int(Z'777')
end if end if
!$omp end parallel !$omp end parallel
if (v) STOP 1 if (v) stop 1
if (cnt .eq. 3) then if (cnt .eq. 3) then
ta = (/int(Z'f0ff03'), int(Z'f0af03'), int(Z'f0af01'), int(Z'f0af01'), int(Z'f0af01'), int(Z'f0ff0f')/) ta = (/int(Z'f0ff03'), int(Z'f0af03'), int(Z'f0af01'), int(Z'f0af01'), int(Z'f0af01'), int(Z'f0ff0f')/)
if (i .ne. int(Z'777f07') .or. any (ia .ne. ta)) STOP 2 if (i .ne. int(Z'777f07') .or. any (ia .ne. ta)) stop 2
ta = (/int(Z'f5a01'), int(Z'f5a09'), int(Z'f5a09'), int(Z'f5a08'), int(Z'f5f08'), int(Z'f5f00')/) ta = (/int(Z'f5a01'), int(Z'f5a09'), int(Z'f5a09'), int(Z'f5a08'), int(Z'f5f08'), int(Z'f5f00')/)
if (j .ne. int(Z'fff80') .or. any (ja .ne. ta)) STOP 3 if (j .ne. int(Z'fff80') .or. any (ja .ne. ta)) stop 3
ta = (/int(Z'5a5a5'), int(Z'5a5a5'), int(Z'aaba2'), int(Z'aaba2'), int(Z'5aaaa'), int(Z'5addd')/) ta = (/int(Z'5a5a5'), int(Z'5a5a5'), int(Z'aaba2'), int(Z'aaba2'), int(Z'5aaaa'), int(Z'5addd')/)
if (k .ne. int(Z'54a8f') .or. any (ka .ne. ta)) STOP 4 if (k .ne. int(Z'54a8f') .or. any (ka .ne. ta)) stop 4
end if end if
end end
...@@ -18,7 +18,7 @@ contains ...@@ -18,7 +18,7 @@ contains
!$omp section !$omp section
n = bitwise_or (n, int(Z'2000')) n = bitwise_or (n, int(Z'2000'))
!$omp end parallel sections !$omp end parallel sections
if (n .ne. int(Z'243f')) STOP 1 if (n .ne. int(Z'243f')) stop 1
end subroutine end subroutine
subroutine test2 subroutine test2
use reduction5, min => max, max => min use reduction5, min => max, max => min
...@@ -36,7 +36,7 @@ contains ...@@ -36,7 +36,7 @@ contains
if (m .gt. 3) m = 3 if (m .gt. 3) m = 3
if (n .lt. -1) n = -1 if (n .lt. -1) n = -1
!$omp end parallel sections !$omp end parallel sections
if (m .ne. 3 .or. n .ne. 15) STOP 2 if (m .ne. 3 .or. n .ne. 15) stop 2
end subroutine test2 end subroutine test2
end end
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
call foo (a (2:4, 3:5), nthreads) call foo (a (2:4, 3:5), nthreads)
if (nthreads .eq. 3) then if (nthreads .eq. 3) then
write (c, '(36i1)') a write (c, '(36i1)') a
if (c .ne. '999999999999966699966699966699999999') STOP 1 if (c .ne. '999999999999966699966699966699999999') stop 1
end if end if
contains contains
subroutine foo (b, nthreads) subroutine foo (b, nthreads)
...@@ -27,6 +27,6 @@ contains ...@@ -27,6 +27,6 @@ contains
!$omp end master !$omp end master
b = 2 b = 2
!$omp end parallel !$omp end parallel
if (err .gt. 0) STOP 2 if (err .gt. 0) stop 2
end subroutine foo end subroutine foo
end end
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
k = 0 k = 0
d = 24.5 d = 24.5
call test (i, j, k, d) call test (i, j, k, d)
if (i .ne. 38) STOP 1 if (i .ne. 38) stop 1
if (iand (k, 255) .ne. 0) STOP 2 if (iand (k, 255) .ne. 0) stop 2
if (iand (k, 65280) .eq. 0) then if (iand (k, 65280) .eq. 0) then
if (k .ne. 65536 * 4) STOP 3 if (k .ne. 65536 * 4) stop 3
end if end if
contains contains
subroutine test (i, j, k, d) subroutine test (i, j, k, d)
......
...@@ -11,7 +11,7 @@ contains ...@@ -11,7 +11,7 @@ contains
a = 15 a = 15
l = bar (a) l = bar (a)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine end subroutine
function bar (a) function bar (a)
real, dimension (5) :: a real, dimension (5) :: a
......
...@@ -14,7 +14,7 @@ function f1 () ...@@ -14,7 +14,7 @@ function f1 ()
l = l .or. (omp_get_thread_num () .eq. 0 .and. f1 .ne. 8.5) l = l .or. (omp_get_thread_num () .eq. 0 .and. f1 .ne. 8.5)
l = l .or. (omp_get_thread_num () .eq. 1 .and. f1 .ne. 14.5) l = l .or. (omp_get_thread_num () .eq. 1 .and. f1 .ne. 14.5)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
f1 = -2.5 f1 = -2.5
end function f1 end function f1
function f2 () function f2 ()
...@@ -32,7 +32,7 @@ entry e2 () ...@@ -32,7 +32,7 @@ entry e2 ()
l = l .or. (omp_get_thread_num () .eq. 0 .and. e2 .ne. 8.5) l = l .or. (omp_get_thread_num () .eq. 0 .and. e2 .ne. 8.5)
l = l .or. (omp_get_thread_num () .eq. 1 .and. e2 .ne. 14.5) l = l .or. (omp_get_thread_num () .eq. 1 .and. e2 .ne. 14.5)
!$omp end parallel !$omp end parallel
if (l) STOP 2 if (l) stop 2
e2 = 7.5 e2 = 7.5
end function f2 end function f2
function f3 () function f3 ()
...@@ -53,7 +53,7 @@ entry e3 () ...@@ -53,7 +53,7 @@ entry e3 ()
l = l .or. (omp_get_thread_num () .eq. 1 .and. e3 .ne. 14.5) l = l .or. (omp_get_thread_num () .eq. 1 .and. e3 .ne. 14.5)
l = l .or. f3 .ne. e3 - 4.5 l = l .or. f3 .ne. e3 - 4.5
!$omp end parallel !$omp end parallel
if (l) STOP 3 if (l) stop 3
e3 = 0.5 e3 = 0.5
end function f3 end function f3
function f4 () result (r4) function f4 () result (r4)
...@@ -74,7 +74,7 @@ entry e4 () result (s4) ...@@ -74,7 +74,7 @@ entry e4 () result (s4)
l = l .or. (omp_get_thread_num () .eq. 1 .and. s4 .ne. 14.5) l = l .or. (omp_get_thread_num () .eq. 1 .and. s4 .ne. 14.5)
l = l .or. r4 .ne. s4 - 4.5 l = l .or. r4 .ne. s4 - 4.5
!$omp end parallel !$omp end parallel
if (l) STOP 4 if (l) stop 4
s4 = -0.5 s4 = -0.5
end function f4 end function f4
function f5 (is_f5) function f5 (is_f5)
...@@ -101,20 +101,20 @@ entry e5 (is_f5) ...@@ -101,20 +101,20 @@ entry e5 (is_f5)
l = l .or. (omp_get_thread_num () .eq. 1 .and. e5 .ne. 14) l = l .or. (omp_get_thread_num () .eq. 1 .and. e5 .ne. 14)
l = l .or. f5 .ne. e5 - 4.5 l = l .or. f5 .ne. e5 - 4.5
!$omp end parallel !$omp end parallel
if (l) STOP 5 if (l) stop 5
if (is_f5) f5 = -2.5 if (is_f5) f5 = -2.5
if (.not. is_f5) e5 = 8 if (.not. is_f5) e5 = 8
end function f5 end function f5
real :: f1, f2, e2, f3, e3, f4, e4, f5 real :: f1, f2, e2, f3, e3, f4, e4, f5
integer :: e5 integer :: e5
if (f1 () .ne. -2.5) STOP 6 if (f1 () .ne. -2.5) stop 6
if (f2 () .ne. 7.5) STOP 7 if (f2 () .ne. 7.5) stop 7
if (e2 () .ne. 7.5) STOP 8 if (e2 () .ne. 7.5) stop 8
if (f3 () .ne. 0.5) STOP 9 if (f3 () .ne. 0.5) stop 9
if (e3 () .ne. 0.5) STOP 10 if (e3 () .ne. 0.5) stop 10
if (f4 () .ne. -0.5) STOP 11 if (f4 () .ne. -0.5) stop 11
if (e4 () .ne. -0.5) STOP 12 if (e4 () .ne. -0.5) stop 12
if (f5 (.true.) .ne. -2.5) STOP 13 if (f5 (.true.) .ne. -2.5) stop 13
if (e5 (.false.) .ne. 8) STOP 14 if (e5 (.false.) .ne. 8) stop 14
end end
...@@ -17,11 +17,11 @@ contains ...@@ -17,11 +17,11 @@ contains
l = l .or. (omp_get_thread_num () .eq. 0 .and. f1 .ne. 8.5) l = l .or. (omp_get_thread_num () .eq. 0 .and. f1 .ne. 8.5)
l = l .or. (omp_get_thread_num () .eq. 1 .and. f1 .ne. 14.5) l = l .or. (omp_get_thread_num () .eq. 1 .and. f1 .ne. 14.5)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
f1 = -2.5 f1 = -2.5
end subroutine sub1 end subroutine sub1
end function f1 end function f1
real :: f1 real :: f1
if (f1 () .ne. -2.5) STOP 2 if (f1 () .ne. -2.5) stop 2
end end
...@@ -25,5 +25,5 @@ ...@@ -25,5 +25,5 @@
!$omp barrier !$omp barrier
if (j .ne. 25 .or. i .ne. (k * 10 + 14)) l = .true. if (j .ne. 25 .or. i .ne. (k * 10 + 14)) l = .true.
!$omp end parallel !$omp end parallel
if (l .or. j .ne. 25) STOP 1 if (l .or. j .ne. 25) stop 1
end end
...@@ -27,6 +27,6 @@ ...@@ -27,6 +27,6 @@
!$omp barrier !$omp barrier
if (j .ne. 25 .or. i .ne. (k * 10 + 14)) l = .true. if (j .ne. 25 .or. i .ne. (k * 10 + 14)) l = .true.
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
if (j .ne. 25) STOP 2 if (j .ne. 25) stop 2
end end
...@@ -30,6 +30,6 @@ ...@@ -30,6 +30,6 @@
s = s + l s = s + l
t%x = t%x + l t%x = t%x + l
end do end do
if (r.ne.2700.or.j.ne.70.or.k.ne.80.or.s.ne.2700) STOP 1 if (r.ne.2700.or.j.ne.70.or.k.ne.80.or.s.ne.2700) stop 1
if (t%x.ne.2700) STOP 2 if (t%x.ne.2700) stop 2
end end
...@@ -13,42 +13,42 @@ ...@@ -13,42 +13,42 @@
end do end do
s = foo (b) s = foo (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 1 if (a(i).ne.((i - 513) * b(i))) stop 1
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 2 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 2
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 3 if (b(i).ne.(modulo (i - 52, 39))) stop 3
end if end if
a(i) = i - 513 a(i) = i - 513
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 4 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 4
k = 4 k = 4
m = 2 m = 2
t = 1 t = 1
s = bar (b) s = bar (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 5 if (a(i).ne.((i - 513) * b(i))) stop 5
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 6 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 6
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 7 if (b(i).ne.(modulo (i - 52, 39))) stop 7
end if end if
a(i) = i - 513 a(i) = i - 513
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 8 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 8
k = 4 k = 4
m = 2 m = 2
t = 1 t = 1
s = baz (b) s = baz (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 9 if (a(i).ne.((i - 513) * b(i))) stop 9
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 10 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 10
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 11 if (b(i).ne.(modulo (i - 52, 39))) stop 11
end if end if
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 12 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 12
contains contains
function foo (p) function foo (p)
integer :: p(1024), u, v, i, s, foo integer :: p(1024), u, v, i, s, foo
...@@ -62,8 +62,8 @@ contains ...@@ -62,8 +62,8 @@ contains
s = s + p(i) + k s = s + p(i) + k
end do end do
!$omp end simd !$omp end simd
if (i.ne.1025) STOP 13 if (i.ne.1025) stop 13
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 14 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 14
foo = s foo = s
end function foo end function foo
function bar (p) function bar (p)
...@@ -78,8 +78,8 @@ contains ...@@ -78,8 +78,8 @@ contains
s = s + p(i) + k s = s + p(i) + k
end do end do
!$omp end simd !$omp end simd
if (i.ne.1025) STOP 15 if (i.ne.1025) stop 15
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 16 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 16
bar = s bar = s
end function bar end function bar
function baz (p) function baz (p)
...@@ -94,8 +94,8 @@ contains ...@@ -94,8 +94,8 @@ contains
v = p(i) + k v = p(i) + k
s = s + p(i) + k s = s + p(i) + k
end do end do
if (i.ne.1025) STOP 17 if (i.ne.1025) stop 17
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 18 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 18
baz = s baz = s
end function baz end function baz
end end
...@@ -13,42 +13,42 @@ ...@@ -13,42 +13,42 @@
end do end do
s = foo (b) s = foo (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 1 if (a(i).ne.((i - 513) * b(i))) stop 1
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 2 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 2
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 3 if (b(i).ne.(modulo (i - 52, 39))) stop 3
end if end if
a(i) = i - 513 a(i) = i - 513
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 4 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 4
k = 4 k = 4
m = 2 m = 2
t = 1 t = 1
s = bar (b) s = bar (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 5 if (a(i).ne.((i - 513) * b(i))) stop 5
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 6 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 6
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 7 if (b(i).ne.(modulo (i - 52, 39))) stop 7
end if end if
a(i) = i - 513 a(i) = i - 513
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 8 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 8
k = 4 k = 4
m = 2 m = 2
t = 1 t = 1
s = baz (b) s = baz (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 9 if (a(i).ne.((i - 513) * b(i))) stop 9
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 10 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 10
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 11 if (b(i).ne.(modulo (i - 52, 39))) stop 11
end if end if
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 12 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 12
contains contains
function foo (p) function foo (p)
integer :: p(1024), u, v, i, s, foo integer :: p(1024), u, v, i, s, foo
...@@ -65,8 +65,8 @@ contains ...@@ -65,8 +65,8 @@ contains
end do end do
!$omp end do simd !$omp end do simd
!$omp end parallel !$omp end parallel
if (i.ne.1025) STOP 13 if (i.ne.1025) stop 13
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 14 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 14
foo = s foo = s
end function foo end function foo
function bar (p) function bar (p)
...@@ -84,8 +84,8 @@ contains ...@@ -84,8 +84,8 @@ contains
end do end do
!$omp end do simd !$omp end do simd
!$omp endparallel !$omp endparallel
if (i.ne.1025) STOP 15 if (i.ne.1025) stop 15
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 16 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 16
bar = s bar = s
end function bar end function bar
function baz (p) function baz (p)
...@@ -102,8 +102,8 @@ contains ...@@ -102,8 +102,8 @@ contains
s = s + p(i) + k s = s + p(i) + k
end do end do
!$omp end parallel !$omp end parallel
if (i.ne.1025) STOP 17 if (i.ne.1025) stop 17
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 18 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 18
baz = s baz = s
end function baz end function baz
end end
...@@ -13,42 +13,42 @@ ...@@ -13,42 +13,42 @@
end do end do
s = foo (b) s = foo (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 1 if (a(i).ne.((i - 513) * b(i))) stop 1
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 2 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 2
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 3 if (b(i).ne.(modulo (i - 52, 39))) stop 3
end if end if
a(i) = i - 513 a(i) = i - 513
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 4 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 4
k = 4 k = 4
m = 2 m = 2
t = 1 t = 1
s = bar (b) s = bar (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 5 if (a(i).ne.((i - 513) * b(i))) stop 5
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 6 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 6
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 7 if (b(i).ne.(modulo (i - 52, 39))) stop 7
end if end if
a(i) = i - 513 a(i) = i - 513
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 8 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 8
k = 4 k = 4
m = 2 m = 2
t = 1 t = 1
s = baz (b) s = baz (b)
do i = 1, 1024 do i = 1, 1024
if (a(i).ne.((i - 513) * b(i))) STOP 9 if (a(i).ne.((i - 513) * b(i))) stop 9
if (i.lt.52.and.modulo (i - 52, 39).ne.0) then if (i.lt.52.and.modulo (i - 52, 39).ne.0) then
if (b(i).ne.(modulo (i - 52, 39) - 39)) STOP 10 if (b(i).ne.(modulo (i - 52, 39) - 39)) stop 10
else else
if (b(i).ne.(modulo (i - 52, 39))) STOP 11 if (b(i).ne.(modulo (i - 52, 39))) stop 11
end if end if
end do end do
if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) STOP 12 if (k.ne.(4 + 3 * 1024).or.s.ne.1596127) stop 12
contains contains
function foo (p) function foo (p)
integer :: p(1024), u, v, i, s, foo integer :: p(1024), u, v, i, s, foo
...@@ -63,8 +63,8 @@ contains ...@@ -63,8 +63,8 @@ contains
s = s + p(i) + k s = s + p(i) + k
end do end do
!$omp end parallel do simd !$omp end parallel do simd
if (i.ne.1025) STOP 13 if (i.ne.1025) stop 13
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 14 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 14
foo = s foo = s
end function foo end function foo
function bar (p) function bar (p)
...@@ -80,8 +80,8 @@ contains ...@@ -80,8 +80,8 @@ contains
s = s + p(i) + k s = s + p(i) + k
end do end do
!$omp endparalleldosimd !$omp endparalleldosimd
if (i.ne.1025) STOP 15 if (i.ne.1025) stop 15
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 16 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 16
bar = s bar = s
end function bar end function bar
function baz (p) function baz (p)
...@@ -96,8 +96,8 @@ contains ...@@ -96,8 +96,8 @@ contains
v = p(i) + k v = p(i) + k
s = s + p(i) + k s = s + p(i) + k
end do end do
if (i.ne.1025) STOP 17 if (i.ne.1025) stop 17
if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) STOP 18 if (u.ne.(36 + 4 + 3 * 1023).or.v.ne.(36 + 4 + 3 * 1024)) stop 18
baz = s baz = s
end function baz end function baz
end end
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
b = b + 2 b = b + 2
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 1 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 1
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
b = b + 3 b = b + 3
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 2 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 2
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
b = b + 2 b = b + 2
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 3 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 3
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
b = b + 3 b = b + 3
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 4 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 4
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
b = b + 2 b = b + 2
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 5 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 5
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
b = b + 2 b = b + 2
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 6 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 6
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
b = b + 2 b = b + 2
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 7 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 7
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
b = b + 3 b = b + 3
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 8 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 8
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
b = b + 2 b = b + 2
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 9 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 9
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
b = b + 3 b = b + 3
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 10 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 10
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
b = b + 2 b = b + 2
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 11 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 11
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -120,5 +120,5 @@ ...@@ -120,5 +120,5 @@
b = b + 2 b = b + 2
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 12 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 12
end end
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 1 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 1
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
call foo (b, i, j, 3) call foo (b, i, j, 3)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 2 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 2
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 3 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 3
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
call foo (b, i, j, 3) call foo (b, i, j, 3)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 4 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 4
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 5 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 5
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 6 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 6
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 7 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 7
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
call foo (b, i, j, 3) call foo (b, i, j, 3)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 8 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 8
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
c = c + b - (7 + 2 * i) c = c + b - (7 + 2 * i)
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) STOP 9 if (c /= 0 .or. i /= 64 .or. b /= 7 + 64 * 2) stop 9
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
c = c + b - (7 + i / 4 * 3) c = c + b - (7 + i / 4 * 3)
call foo (b, i, j, 3) call foo (b, i, j, 3)
end do end do
if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) STOP 10 if (c /= 0 .or. i /= 64 .or. b /= 7 + 16 * 3) stop 10
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 11 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 11
i = 4 i = 4
j = 4 j = 4
b = 7 b = 7
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
call foo (b, i, j, 2) call foo (b, i, j, 2)
end do end do
end do end do
if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) STOP 12 if (c /= 0 .or. i /= 8 .or. j /= 8 .or. b /= 7 + 64 * 2) stop 12
end end
subroutine foo (b, i, j, x) subroutine foo (b, i, j, x)
integer, intent (inout) :: b integer, intent (inout) :: b
......
...@@ -30,20 +30,20 @@ subroutine foo (d, e, f, g, m, n) ...@@ -30,20 +30,20 @@ subroutine foo (d, e, f, g, m, n)
b = b + 1; c = c + 2; d = d + 3; e = e + 4; f = f + 5; g = g + 6 b = b + 1; c = c + 2; d = d + 3; e = e + 4; f = f + 5; g = g + 6
h = h + 7; k = k + 8; m = m + 9 h = h + 7; k = k + 8; m = m + 9
end do end do
if (l .or. i /= 64) STOP 1 if (l .or. i /= 64) stop 1
if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) STOP 2 if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) stop 2
if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) STOP 3 if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) stop 3
if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) STOP 4 if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) stop 4
if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) STOP 5 if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) stop 5
if (m /= 15 + 9 * 64) STOP 6 if (m /= 15 + 9 * 64) stop 6
if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) STOP 7 if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) stop 7
if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) STOP 8 if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) stop 8
if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) STOP 9 if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) stop 9
if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) STOP 10 if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) stop 10
if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) STOP 11 if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) stop 11
if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) STOP 12 if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) stop 12
if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) STOP 13 if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) stop 13
if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) STOP 14 if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) stop 14
i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15 i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15
!$omp simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5)linear(g:6) & !$omp simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5)linear(g:6) &
!$omp & linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l) collapse(2) !$omp & linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l) collapse(2)
...@@ -68,20 +68,20 @@ subroutine foo (d, e, f, g, m, n) ...@@ -68,20 +68,20 @@ subroutine foo (d, e, f, g, m, n)
h = h + 7; k = k + 8; m = m + 9 h = h + 7; k = k + 8; m = m + 9
end do end do
end do end do
if (l .or. i /= 8 .or. j /= 8) STOP 15 if (l .or. i /= 8 .or. j /= 8) stop 15
if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) STOP 16 if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) stop 16
if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) STOP 17 if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) stop 17
if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) STOP 18 if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) stop 18
if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) STOP 19 if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) stop 19
if (m /= 15 + 9 * 64) STOP 20 if (m /= 15 + 9 * 64) stop 20
if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) STOP 21 if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) stop 21
if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) STOP 22 if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) stop 22
if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) STOP 23 if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) stop 23
if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) STOP 24 if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) stop 24
if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) STOP 25 if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) stop 25
if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) STOP 26 if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) stop 26
if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) STOP 27 if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) stop 27
if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) STOP 28 if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) stop 28
i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15 i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15
!$omp parallel do simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5) & !$omp parallel do simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5) &
!$omp & linear(g:6)linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l) !$omp & linear(g:6)linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l)
...@@ -104,20 +104,20 @@ subroutine foo (d, e, f, g, m, n) ...@@ -104,20 +104,20 @@ subroutine foo (d, e, f, g, m, n)
b = b + 1; c = c + 2; d = d + 3; e = e + 4; f = f + 5; g = g + 6 b = b + 1; c = c + 2; d = d + 3; e = e + 4; f = f + 5; g = g + 6
h = h + 7; k = k + 8; m = m + 9 h = h + 7; k = k + 8; m = m + 9
end do end do
if (l .or. i /= 64) STOP 29 if (l .or. i /= 64) stop 29
if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) STOP 30 if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) stop 30
if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) STOP 31 if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) stop 31
if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) STOP 32 if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) stop 32
if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) STOP 33 if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) stop 33
if (m /= 15 + 9 * 64) STOP 34 if (m /= 15 + 9 * 64) stop 34
if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) STOP 35 if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) stop 35
if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) STOP 36 if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) stop 36
if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) STOP 37 if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) stop 37
if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) STOP 38 if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) stop 38
if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) STOP 39 if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) stop 39
if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) STOP 40 if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) stop 40
if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) STOP 41 if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) stop 41
if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) STOP 42 if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) stop 42
i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15 i = 4; j = 4; b = 7; c = 8; d = 9; e = 10; f = 11; g = 12; h = 13; k = 14; m = 15
!$omp parallel do simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5) & !$omp parallel do simd linear(b)linear(c:2)linear(d:3)linear(e:4)linear(f:5) &
!$omp & linear(g:6)linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l) collapse(2) !$omp & linear(g:6)linear(h:7)linear(k:8)linear(m:9) reduction(.or.:l) collapse(2)
...@@ -142,20 +142,20 @@ subroutine foo (d, e, f, g, m, n) ...@@ -142,20 +142,20 @@ subroutine foo (d, e, f, g, m, n)
h = h + 7; k = k + 8; m = m + 9 h = h + 7; k = k + 8; m = m + 9
end do end do
end do end do
if (l .or. i /= 8 .or. j /= 8) STOP 43 if (l .or. i /= 8 .or. j /= 8) stop 43
if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) STOP 44 if (any (b /= 7 + 64) .or. any (c /= 8 + 2 * 64)) stop 44
if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) STOP 45 if (any (d /= 9 + 3 * 64) .or. any (e /= 10 + 4 * 64)) stop 45
if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) STOP 46 if (any (f /= 11 + 5 * 64) .or. any (g /= 12 + 6 * 64)) stop 46
if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) STOP 47 if (any (h /= 13 + 7 * 64) .or. (k /= 14 + 8 * 64)) stop 47
if (m /= 15 + 9 * 64) STOP 48 if (m /= 15 + 9 * 64) stop 48
if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) STOP 49 if ((lbound (b, 1) /= 2) .or. (ubound (b, 1) /= 9)) stop 49
if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) STOP 50 if ((lbound (c, 1) /= 3) .or. (ubound (c, 1) /= n)) stop 50
if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) STOP 51 if ((lbound (d, 1) /= 1) .or. (ubound (d, 1) /= 17)) stop 51
if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) STOP 52 if ((lbound (e, 1) /= 2) .or. (ubound (e, 1) /= n)) stop 52
if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) STOP 53 if ((lbound (f, 1) /= 2) .or. (ubound (f, 1) /= 3)) stop 53
if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) STOP 54 if ((lbound (f, 2) /= 3) .or. (ubound (f, 2) /= 5)) stop 54
if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) STOP 55 if ((lbound (g, 1) /= 7) .or. (ubound (g, 1) /= 10)) stop 55
if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) STOP 56 if ((lbound (h, 1) /= 2) .or. (ubound (h, 1) /= 7)) stop 56
end subroutine end subroutine
interface interface
......
...@@ -11,7 +11,7 @@ program stack ...@@ -11,7 +11,7 @@ program stack
!$omp end parallel !$omp end parallel
! Check that the two threads are not sharing a location for ! Check that the two threads are not sharing a location for
! the array x in foo() ! the array x in foo()
if (ilocs(1) .eq. ilocs(2)) STOP 1 if (ilocs(1) .eq. ilocs(2)) stop 1
end program stack end program stack
integer function foo () integer function foo ()
......
...@@ -19,7 +19,7 @@ program strassen_matmul ...@@ -19,7 +19,7 @@ program strassen_matmul
call strassen (A, B, D, N) call strassen (A, B, D, N)
end = omp_get_wtime () end = omp_get_wtime ()
write(*,'(a, f10.6)') ' Time for Strassen = ', end - start write(*,'(a, f10.6)') ' Time for Strassen = ', end - start
if (sqrt (sum ((C - D) ** 2)) / N .gt. 0.1) STOP 1 if (sqrt (sum ((C - D) ** 2)) / N .gt. 0.1) stop 1
D = 0 D = 0
start = omp_get_wtime () start = omp_get_wtime ()
!$omp parallel !$omp parallel
...@@ -29,7 +29,7 @@ program strassen_matmul ...@@ -29,7 +29,7 @@ program strassen_matmul
!$omp end parallel !$omp end parallel
end = omp_get_wtime () end = omp_get_wtime ()
write(*,'(a, f10.6)') ' Time for Strassen MP = ', end - start write(*,'(a, f10.6)') ' Time for Strassen MP = ', end - start
if (sqrt (sum ((C - D) ** 2)) / N .gt. 0.1) STOP 2 if (sqrt (sum ((C - D) ** 2)) / N .gt. 0.1) stop 2
contains contains
......
if (b().ne.2) STOP 1 if (b().ne.2) stop 1
contains contains
subroutine a subroutine a
!$omp parallel !$omp parallel
......
! { dg-options "-ffixed-form" } ! { dg-options "-ffixed-form" }
if (b().ne.2) STOP 1 if (b().ne.2) stop 1
contains contains
subroutine a subroutine a
!$omp parallel !$omp parallel
......
...@@ -13,9 +13,9 @@ contains ...@@ -13,9 +13,9 @@ contains
q(i) = p(i) q(i) = p(i)
end do end do
!$omp end target !$omp end target
if (any (p /= q)) STOP 1 if (any (p /= q)) stop 1
do i = 1, n do i = 1, n
if (p(i) /= i * iand (i, 63)) STOP 2 if (p(i) /= i * iand (i, 63)) stop 2
end do end do
!$omp target data if (n > 256) map (to: v(1:n), w) map (from: p, q) !$omp target data if (n > 256) map (to: v(1:n), w) map (from: p, q)
!$omp target if (n > 256) !$omp target if (n > 256)
...@@ -38,7 +38,7 @@ contains ...@@ -38,7 +38,7 @@ contains
end do end do
!$omp end target !$omp end target
!$omp end target data !$omp end target data
if (any (p + 2.0 /= q)) STOP 3 if (any (p + 2.0 /= q)) stop 3
end subroutine end subroutine
end module target1 end module target1
use target1, only : foo use target1, only : foo
...@@ -52,7 +52,7 @@ end module target1 ...@@ -52,7 +52,7 @@ end module target1
end do end do
call foo (p, v, w, n) call foo (p, v, w, n)
do i = 1, n do i = 1, n
if (p(i) /= i * iand (i, 63) + 3) STOP 4 if (p(i) /= i * iand (i, 63) + 3) stop 4
end do end do
deallocate (p, v, w) deallocate (p, v, w)
end end
...@@ -29,7 +29,7 @@ contains ...@@ -29,7 +29,7 @@ contains
r = r .or. (j /= 16) r = r .or. (j /= 16)
r = r .or. (any (k /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n) r = r .or. (any (k /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n)
!$omp end target !$omp end target
if (r) STOP 1 if (r) stop 1
!$omp target map (to: b(3:n), c(5:n+4), d(2:n+1), e(1:,:2), g(3:n), i(3:n), k(4:n), n) map (from: r) !$omp target map (to: b(3:n), c(5:n+4), d(2:n+1), e(1:,:2), g(3:n), i(3:n), k(4:n), n) map (from: r)
r = (any (b /= 8)) .or. (lbound (b, 1) /= 3) .or. (ubound (b, 1) /= n) r = (any (b /= 8)) .or. (lbound (b, 1) /= 3) .or. (ubound (b, 1) /= n)
r = r .or. (any (c /= 9)) .or. (lbound (c, 1) /= 5) .or. (ubound (c, 1) /= n + 4) r = r .or. (any (c /= 9)) .or. (lbound (c, 1) /= 5) .or. (ubound (c, 1) /= n + 4)
...@@ -40,7 +40,7 @@ contains ...@@ -40,7 +40,7 @@ contains
r = r .or. (any (i /= 15)) .or. (lbound (i, 1) /= 3) .or. (ubound (i, 1) /= n) r = r .or. (any (i /= 15)) .or. (lbound (i, 1) /= 3) .or. (ubound (i, 1) /= n)
r = r .or. (any (k /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n) r = r .or. (any (k /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n)
!$omp end target !$omp end target
if (r) STOP 2 if (r) stop 2
!$omp target map (to: b(5:n-2), c(7:n), d(4:n-2), e(1:,2:), g(5:n-3), i(6:n-4), k(5:n-5), n) map (from: r) !$omp target map (to: b(5:n-2), c(7:n), d(4:n-2), e(1:,2:), g(5:n-3), i(6:n-4), k(5:n-5), n) map (from: r)
r = (any (b(5:n-2) /= 8)) .or. (lbound (b, 1) /= 3) .or. (ubound (b, 1) /= n) r = (any (b(5:n-2) /= 8)) .or. (lbound (b, 1) /= 3) .or. (ubound (b, 1) /= n)
r = r .or. (any (c(7:n) /= 9)) .or. (lbound (c, 1) /= 5) .or. (ubound (c, 1) /= n + 4) r = r .or. (any (c(7:n) /= 9)) .or. (lbound (c, 1) /= 5) .or. (ubound (c, 1) /= n + 4)
...@@ -62,7 +62,7 @@ contains ...@@ -62,7 +62,7 @@ contains
r = r .or. (any (i(6:n-4) /= 15)) .or. (lbound (i, 1) /= 3) .or. (ubound (i, 1) /= n) r = r .or. (any (i(6:n-4) /= 15)) .or. (lbound (i, 1) /= 3) .or. (ubound (i, 1) /= n)
r = r .or. (any (k(5:n-5) /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n) r = r .or. (any (k(5:n-5) /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n)
!$omp end target !$omp end target
if (r) STOP 3 if (r) stop 3
!$omp target map (to: d(2:n+1), n) !$omp target map (to: d(2:n+1), n)
r = a /= 7 r = a /= 7
r = r .or. (any (b /= 8)) .or. (lbound (b, 1) /= 3) .or. (ubound (b, 1) /= n) r = r .or. (any (b /= 8)) .or. (lbound (b, 1) /= 3) .or. (ubound (b, 1) /= n)
...@@ -77,7 +77,7 @@ contains ...@@ -77,7 +77,7 @@ contains
r = r .or. (j /= 16) r = r .or. (j /= 16)
r = r .or. (any (k /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n) r = r .or. (any (k /= 17)) .or. (lbound (k, 1) /= 4) .or. (ubound (k, 1) /= n)
!$omp end target !$omp end target
if (r) STOP 4 if (r) stop 4
end subroutine foo end subroutine foo
end module target2 end module target2
use target2, only : foo use target2, only : foo
......
...@@ -13,12 +13,12 @@ contains ...@@ -13,12 +13,12 @@ contains
r = associated (f) .or. associated (g) r = associated (f) .or. associated (g)
r = r .or. associated (j) .or. associated (k) r = r .or. associated (j) .or. associated (k)
!$omp end target !$omp end target
if (r) STOP 1 if (r) stop 1
!$omp target !$omp target
r = associated (f) .or. associated (g) r = associated (f) .or. associated (g)
r = r .or. associated (j) .or. associated (k) r = r .or. associated (j) .or. associated (k)
!$omp end target !$omp end target
if (r) STOP 2 if (r) stop 2
end subroutine foo end subroutine foo
end module target3 end module target3
use target3, only : foo use target3, only : foo
......
...@@ -44,5 +44,5 @@ end module target4 ...@@ -44,5 +44,5 @@ end module target4
& 30800.0d0, 33000.0d0, 23256.0d0, 25840.0d0, 28424.0d0, 31008.0d0, 33592.0d0, 36176.0d0, & & 30800.0d0, 33000.0d0, 23256.0d0, 25840.0d0, 28424.0d0, 31008.0d0, 33592.0d0, 36176.0d0, &
& 38760.0d0, 41344.0d0, 30000.0d0, 33000.0d0, 36000.0d0, 39000.0d0, 42000.0d0, 45000.0d0, & & 38760.0d0, 41344.0d0, 30000.0d0, 33000.0d0, 36000.0d0, 39000.0d0, 42000.0d0, 45000.0d0, &
& 48000.0d0, 51000.0d0 /), (/ 8, 9 /)) & 48000.0d0, 51000.0d0 /), (/ 8, 9 /))
if (any (a /= res)) STOP 1 if (any (a /= res)) stop 1
end end
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
integer :: r integer :: r
r = 0 r = 0
call foo (r) call foo (r)
if (r /= 11) STOP 1 if (r /= 11) stop 1
contains contains
subroutine foo (r) subroutine foo (r)
integer :: i, r integer :: i, r
......
...@@ -16,7 +16,7 @@ contains ...@@ -16,7 +16,7 @@ contains
!$omp end target !$omp end target
!$omp target update if (n > 256) from (p) !$omp target update if (n > 256) from (p)
do i = 1, n do i = 1, n
if (p(i) /= i * iand (i, 63)) STOP 1 if (p(i) /= i * iand (i, 63)) stop 1
v(i) = v(i) + 1 v(i) = v(i) + 1
end do end do
!$omp target update if (n > 256) to (v(1:n)) !$omp target update if (n > 256) to (v(1:n))
...@@ -28,8 +28,8 @@ contains ...@@ -28,8 +28,8 @@ contains
!$omp end target !$omp end target
!$omp end target data !$omp end target data
do i = 1, n do i = 1, n
if (q(i) /= (v(i) - 1) * w(i)) STOP 2 if (q(i) /= (v(i) - 1) * w(i)) stop 2
if (p(i) /= q(i) + w(i)) STOP 3 if (p(i) /= q(i) + w(i)) stop 3
end do end do
end subroutine end subroutine
end module target6 end module target6
...@@ -44,7 +44,7 @@ end module target6 ...@@ -44,7 +44,7 @@ end module target6
end do end do
call foo (p, v, w, n) call foo (p, v, w, n)
do i = 1, n do i = 1, n
if (p(i) /= (i + 1) * iand (i, 63)) STOP 4 if (p(i) /= (i + 1) * iand (i, 63)) stop 4
end do end do
deallocate (p, v, w) deallocate (p, v, w)
end end
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
do i = 1, n do i = 1, n
if (a(i) /= i + 1) STOP 1 if (a(i) /= i + 1) stop 1
end do end do
end end
real function foo (x) real function foo (x)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
do i = 1, n do i = 1, n
if (a(i) /= i + 1) STOP 1 if (a(i) /= i + 1) stop 1
end do end do
contains contains
real function foo (x) real function foo (x)
......
...@@ -13,7 +13,7 @@ program tasktest ...@@ -13,7 +13,7 @@ program tasktest
!$omp end task !$omp end task
end if end if
!$omp end parallel !$omp end parallel
if (j.gt.0) STOP 1 if (j.gt.0) stop 1
contains contains
subroutine subr (i) subroutine subr (i)
use omp_lib use omp_lib
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
call test call test
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
if (err.ne.0) STOP 1 if (err.ne.0) stop 1
contains contains
subroutine check (x, y, l) subroutine check (x, y, l)
integer :: x, y integer :: x, y
......
...@@ -21,6 +21,6 @@ program F03_2_7_1d ...@@ -21,6 +21,6 @@ program F03_2_7_1d
!$omp end parallel !$omp end parallel
if (sum /= NT) then if (sum /= NT) then
print *, "FAIL - sum == ", sum, " (expected ", NT, ")" print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
STOP 1 stop 1
end if end if
end program F03_2_7_1d end program F03_2_7_1d
...@@ -41,5 +41,5 @@ ...@@ -41,5 +41,5 @@
!$omp end parallel !$omp end parallel
!$omp atomic read !$omp atomic read
e = err e = err
if (e .ne. 0) STOP 1 if (e .ne. 0) stop 1
end end
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
end do end do
!$omp end taskgroup !$omp end taskgroup
do i = 1, 16 do i = 1, 16
if (v(i).ne.(i + 1)) STOP 1 if (v(i).ne.(i + 1)) stop 1
end do end do
!$omp taskgroup !$omp taskgroup
do i = 1, 16, 2 do i = 1, 16, 2
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
end do end do
!$omp endtaskgroup !$omp endtaskgroup
do i = 1, 16 do i = 1, 16
if (v(i).ne.(i + 2)) STOP 2 if (v(i).ne.(i + 2)) stop 2
end do end do
!$omp taskgroup !$omp taskgroup
do i = 1, 16, 2 do i = 1, 16, 2
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
end do end do
!$omp end taskgroup !$omp end taskgroup
do i = 1, 16, 2 do i = 1, 16, 2
if (v(i).ne.(i + 3)) STOP 3 if (v(i).ne.(i + 3)) stop 3
if (v(i + 1).ne.(i + 5)) STOP 4 if (v(i + 1).ne.(i + 5)) stop 4
end do end do
!$omp taskgroup !$omp taskgroup
do i = 1, 16, 2 do i = 1, 16, 2
...@@ -67,14 +67,14 @@ ...@@ -67,14 +67,14 @@
v(i + 1) = v(i + 1) + 1 v(i + 1) = v(i + 1) + 1
!$omp end task !$omp end task
!$omp end taskgroup !$omp end taskgroup
if (v(i).ne.(i + 4).or.v(i + 1).ne.(i + 6)) STOP 5 if (v(i).ne.(i + 4).or.v(i + 1).ne.(i + 6)) stop 5
!$omp task !$omp task
v(i) = v(i) + 1 v(i) = v(i) + 1
!$omp end task !$omp end task
end do end do
!$omp end taskgroup !$omp end taskgroup
do i = 1, 16 do i = 1, 16
if (v(i).ne.(i + 5)) STOP 6 if (v(i).ne.(i + 5)) stop 6
end do end do
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
r = bar (12, 18) r = bar (12, 18)
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
if (q .ne. 6 .or. r .ne. 17 .or. e) STOP 1 if (q .ne. 6 .or. r .ne. 17 .or. e) stop 1
contains contains
subroutine foo (a, b) subroutine foo (a, b)
integer, intent (in) :: a, b integer, intent (in) :: a, b
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
do i = 1, 1024 do i = 1, 1024
if (u(i) .ne. 2 * i + 1) STOP 1 if (u(i) .ne. 2 * i + 1) stop 1
v(i) = 1024 - i v(i) = 1024 - i
w(i) = 512 - i w(i) = 512 - i
end do end do
...@@ -24,45 +24,45 @@ ...@@ -24,45 +24,45 @@
!$omp end parallel !$omp end parallel
do i = 1, 1024 do i = 1, 1024
if (i .lt. 2 .or. i .gt. 1022) then if (i .lt. 2 .or. i .gt. 1022) then
if (u(i) .ne. 2 * i + 1) STOP 2 if (u(i) .ne. 2 * i + 1) stop 2
else else
if (u(i) .ne. 1536 - 2 * i) STOP 3 if (u(i) .ne. 1536 - 2 * i) stop 3
end if end if
v(i) = i v(i) = i
w(i) = i + 1 w(i) = i + 1
end do end do
if (m .ne. (1023 + 2 * (1021 * 5 + 17) + 9)) STOP 4 if (m .ne. (1023 + 2 * (1021 * 5 + 17) + 9)) stop 4
!$omp parallel !$omp parallel
!$omp single !$omp single
call f3 (1, 1024) call f3 (1, 1024)
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
do i = 1, 1024 do i = 1, 1024
if (u(i) .ne. 2 * i + 1) STOP 5 if (u(i) .ne. 2 * i + 1) stop 5
v(i) = 1024 - i v(i) = 1024 - i
w(i) = 512 - i w(i) = 512 - i
end do end do
if (m .ne. 1025) STOP 6 if (m .ne. 1025) stop 6
!$omp parallel !$omp parallel
!$omp single !$omp single
call f4 (0, 31, 1, 32) call f4 (0, 31, 1, 32)
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
do i = 1, 1024 do i = 1, 1024
if (u(i) .ne. 1536 - 2 * i) STOP 7 if (u(i) .ne. 1536 - 2 * i) stop 7
v(i) = i v(i) = i
w(i) = i + 1 w(i) = i + 1
end do end do
if (m .ne. 32 + 33 + 1024) STOP 8 if (m .ne. 32 + 33 + 1024) stop 8
!$omp parallel !$omp parallel
!$omp single !$omp single
call f5 (0, 31, 1, 32) call f5 (0, 31, 1, 32)
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
do i = 1, 1024 do i = 1, 1024
if (u(i) .ne. 2 * i + 1) STOP 9 if (u(i) .ne. 2 * i + 1) stop 9
end do end do
if (m .ne. 32 + 33) STOP 10 if (m .ne. 32 + 33) stop 10
contains contains
subroutine f1 (a, b) subroutine f1 (a, b)
integer, intent(in) :: a, b integer, intent(in) :: a, b
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
integer :: i integer :: i
!$omp parallel !$omp parallel
!$omp single !$omp single
if (f1 (74) .ne. 63 + 4) STOP 1 if (f1 (74) .ne. 63 + 4) stop 1
g = 77 g = 77
call f2 call f2
!$omp taskwait !$omp taskwait
if (g .ne. 63 + 9) STOP 2 if (g .ne. 63 + 9) stop 2
if (f3 (7_8, 11_8, 2_8) .ne. 11 * 7 + 13) STOP 3 if (f3 (7_8, 11_8, 2_8) .ne. 11 * 7 + 13) stop 3
if (f4 (0_8, 31_8, 16_8, 46_8, 1_8, 2_8, 73) .ne. 32 + 5 * 48 & if (f4 (0_8, 31_8, 16_8, 46_8, 1_8, 2_8, 73) .ne. 32 + 5 * 48 &
& + 11 * 31 + 17 * 46) STOP 4 & + 11 * 31 + 17 * 46) stop 4
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
contains contains
...@@ -22,7 +22,7 @@ contains ...@@ -22,7 +22,7 @@ contains
x = y x = y
!$omp taskloop firstprivate(x)lastprivate(x) !$omp taskloop firstprivate(x)lastprivate(x)
do i = 0, 63 do i = 0, 63
if (x .ne. 74) STOP 5 if (x .ne. 74) stop 5
if (i .eq. 63) then if (i .eq. 63) then
x = i + 4 x = i + 4
end if end if
...@@ -33,7 +33,7 @@ contains ...@@ -33,7 +33,7 @@ contains
integer :: i integer :: i
!$omp taskloop firstprivate(g)lastprivate(g)nogroup !$omp taskloop firstprivate(g)lastprivate(g)nogroup
do i = 0, 63 do i = 0, 63
if (g .ne. 77) STOP 6 if (g .ne. 77) stop 6
if (i .eq. 63) then if (i .eq. 63) then
g = i + 9 g = i + 9
end if end if
...@@ -60,7 +60,7 @@ contains ...@@ -60,7 +60,7 @@ contains
!$omp & lastprivate (i, j, k, l) !$omp & lastprivate (i, j, k, l)
do i = a, b, e do i = a, b, e
do j = c, d, f do j = c, d, f
if (k .ne. 73) STOP 7 if (k .ne. 73) stop 7
if (i .eq. 31 .and. j .eq. 46) then if (i .eq. 31 .and. j .eq. 46) then
k = i k = i
end if end if
......
...@@ -11,22 +11,22 @@ ...@@ -11,22 +11,22 @@
! >= grainsize && < 2 * grainsize, ! >= grainsize && < 2 * grainsize,
! unless # of loop iterations is smaller than grainsize. ! unless # of loop iterations is smaller than grainsize.
call test (0, 79, 1, 17, fn, ntasks, min_iters, max_iters, cnt) call test (0, 79, 1, 17, fn, ntasks, min_iters, max_iters, cnt)
if (cnt .ne. 79) STOP 1 if (cnt .ne. 79) stop 1
if (min_iters .lt. 17 .or. max_iters .ge. 17 * 2) STOP 2 if (min_iters .lt. 17 .or. max_iters .ge. 17 * 2) stop 2
call test (-49, 2541, 7, 28, fn, ntasks, min_iters, max_iters, cnt) call test (-49, 2541, 7, 28, fn, ntasks, min_iters, max_iters, cnt)
if (cnt .ne. 370) STOP 3 if (cnt .ne. 370) stop 3
if (min_iters .lt. 28 .or. max_iters .ge. 28 * 2) STOP 4 if (min_iters .lt. 28 .or. max_iters .ge. 28 * 2) stop 4
call test (7, 21, 2, 15, fn, ntasks, min_iters, max_iters, cnt) call test (7, 21, 2, 15, fn, ntasks, min_iters, max_iters, cnt)
if (cnt .ne. 7) STOP 5 if (cnt .ne. 7) stop 5
if (min_iters .ne. 7 .or. max_iters .ne. 7) STOP 6 if (min_iters .ne. 7 .or. max_iters .ne. 7) stop 6
if (ntasks .ne. 1) STOP 7 if (ntasks .ne. 1) stop 7
fn => num_tasks fn => num_tasks
! If num_tasks is present, # of task loop iters is ! If num_tasks is present, # of task loop iters is
! min (# of loop iters, num_tasks). ! min (# of loop iters, num_tasks).
call test (-51, 2500, 48, 9, fn, ntasks, min_iters, max_iters, cnt) call test (-51, 2500, 48, 9, fn, ntasks, min_iters, max_iters, cnt)
if (cnt .ne. 54 .or. ntasks .ne. 9) STOP 8 if (cnt .ne. 54 .or. ntasks .ne. 9) stop 8
call test (0, 25, 2, 17, fn, ntasks, min_iters, max_iters, cnt) call test (0, 25, 2, 17, fn, ntasks, min_iters, max_iters, cnt)
if (cnt .ne. 13 .or. ntasks .ne. 13) STOP 9 if (cnt .ne. 13 .or. ntasks .ne. 13) stop 9
!$omp end single !$omp end single
!$omp end parallel !$omp end parallel
contains contains
...@@ -42,7 +42,7 @@ contains ...@@ -42,7 +42,7 @@ contains
k = v k = v
v = v + 1 v = v + 1
!$omp end atomic !$omp end atomic
if (k .ge. 64) STOP 10 if (k .ge. 64) stop 10
end if end if
j = j + 1 j = j + 1
u(k + 1) = j u(k + 1) = j
...@@ -60,7 +60,7 @@ contains ...@@ -60,7 +60,7 @@ contains
k = v k = v
v = v + 1 v = v + 1
!$omp end atomic !$omp end atomic
if (k .ge. 64) STOP 11 if (k .ge. 64) stop 11
end if end if
j = j + 1 j = j + 1
u(k + 1) = j u(k + 1) = j
......
...@@ -15,7 +15,7 @@ end module threadprivate1 ...@@ -15,7 +15,7 @@ end module threadprivate1
!$omp barrier !$omp barrier
if (d .ne. omp_get_thread_num () + 6.5) l = .true. if (d .ne. omp_get_thread_num () + 6.5) l = .true.
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end end
! { dg-final { cleanup-modules "threadprivate1" } } ! { dg-final { cleanup-modules "threadprivate1" } }
...@@ -53,16 +53,16 @@ end module threadprivate2 ...@@ -53,16 +53,16 @@ end module threadprivate2
baz%b = omp_get_thread_num () * 2 + 1 baz%b = omp_get_thread_num () * 2 + 1
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
if (.not.allocated (foo)) STOP 2 if (.not.allocated (foo)) stop 2
if (size (foo).ne.18) STOP 3 if (size (foo).ne.18) stop 3
if (any (foo.ne.1)) STOP 4 if (any (foo.ne.1)) stop 4
if (associated (bar1)) STOP 5 if (associated (bar1)) stop 5
if (.not.associated (bar3)) STOP 6 if (.not.associated (bar3)) stop 6
if (any (bar3 .ne. -2)) STOP 7 if (any (bar3 .ne. -2)) stop 7
deallocate (bar3) deallocate (bar3)
if (associated (bar3)) STOP 8 if (associated (bar3)) stop 8
!$omp parallel num_threads (4) reduction (.or.:l) !$omp parallel num_threads (4) reduction (.or.:l)
l = l.or..not.allocated (foo) l = l.or..not.allocated (foo)
...@@ -85,12 +85,12 @@ end module threadprivate2 ...@@ -85,12 +85,12 @@ end module threadprivate2
l = l.or.(baz%b.ne.(omp_get_thread_num () * 2 + 1)) l = l.or.(baz%b.ne.(omp_get_thread_num () * 2 + 1))
!$omp end parallel !$omp end parallel
if (l) STOP 9 if (l) stop 9
if (.not.allocated (foo)) STOP 10 if (.not.allocated (foo)) stop 10
if (size (foo).ne.18) STOP 11 if (size (foo).ne.18) stop 11
if (any (foo.ne.1)) STOP 12 if (any (foo.ne.1)) stop 12
deallocate (foo) deallocate (foo)
if (allocated (foo)) STOP 13 if (allocated (foo)) stop 13
end end
! { dg-final { cleanup-modules "threadprivate2" } } ! { dg-final { cleanup-modules "threadprivate2" } }
...@@ -44,7 +44,7 @@ end module threadprivate3 ...@@ -44,7 +44,7 @@ end module threadprivate3
bar3 = omp_get_thread_num () - 2 bar3 = omp_get_thread_num () - 2
if (omp_get_thread_num () .ne. 0) then if (omp_get_thread_num () .ne. 0) then
deallocate (bar3) deallocate (bar3)
if (associated (bar3)) STOP 1 if (associated (bar3)) stop 1
else else
bar1 => var bar1 => var
end if end if
...@@ -55,13 +55,13 @@ end module threadprivate3 ...@@ -55,13 +55,13 @@ end module threadprivate3
baz%b = omp_get_thread_num () * 2 + 1 baz%b = omp_get_thread_num () * 2 + 1
!$omp end parallel !$omp end parallel
if (l) STOP 2 if (l) stop 2
if (.not.associated (bar1)) STOP 3 if (.not.associated (bar1)) stop 3
if (any (bar1.ne.6)) STOP 4 if (any (bar1.ne.6)) stop 4
if (.not.associated (bar3)) STOP 5 if (.not.associated (bar3)) stop 5
if (any (bar3 .ne. -2)) STOP 6 if (any (bar3 .ne. -2)) stop 6
deallocate (bar3) deallocate (bar3)
if (associated (bar3)) STOP 7 if (associated (bar3)) stop 7
allocate (bar3 (10)) allocate (bar3 (10))
bar3 = 17 bar3 = 17
...@@ -102,7 +102,7 @@ end module threadprivate3 ...@@ -102,7 +102,7 @@ end module threadprivate3
l = l.or.(baz%b .ne. omp_get_thread_num () * 3 + 5) l = l.or.(baz%b .ne. omp_get_thread_num () * 3 + 5)
!$omp end parallel !$omp end parallel
if (l) STOP 8 if (l) stop 8
end end
! { dg-final { cleanup-modules "threadprivate3" } } ! { dg-final { cleanup-modules "threadprivate3" } }
...@@ -72,7 +72,7 @@ end module threadprivate4 ...@@ -72,7 +72,7 @@ end module threadprivate4
vi = -1 vi = -1
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end end
......
...@@ -28,24 +28,24 @@ end module udr1 ...@@ -28,24 +28,24 @@ end module udr1
do i = 1, 100 do i = 1, 100
j = j + i j = j + i
end do end do
if (j .ne. 5050) STOP 1 if (j .ne. 5050) stop 1
j = 3 j = 3
!$omp parallel do reduction (bar : j) !$omp parallel do reduction (bar : j)
do i = 1, 100 do i = 1, 100
j = j + 4 * i j = j + 4 * i
end do end do
if (j .ne. (5050 * 4 + 3)) STOP 2 if (j .ne. (5050 * 4 + 3)) stop 2
!$omp parallel do reduction (+ : d) !$omp parallel do reduction (+ : d)
do i = 1, 100 do i = 1, 100
if (d%y .ne. 9) STOP 3 if (d%y .ne. 9) stop 3
d%x = d%x + 8 * i d%x = d%x + 8 * i
end do end do
if (d%x .ne. (5050 * 8 + 7) .or. d%y .ne. 9) STOP 4 if (d%x .ne. (5050 * 8 + 7) .or. d%y .ne. 9) stop 4
d = dt (5, 21) d = dt (5, 21)
!$omp parallel do reduction (foo : d) !$omp parallel do reduction (foo : d)
do i = 1, 100 do i = 1, 100
if (d%y .ne. 21) STOP 5 if (d%y .ne. 21) stop 5
d%x = d%x + 8 * i d%x = d%x + 8 * i
end do end do
if (d%x .ne. (5050 * 8 + 5) .or. d%y .ne. 21) STOP 6 if (d%x .ne. (5050 * 8 + 5) .or. d%y .ne. 21) stop 6
end end
...@@ -28,5 +28,5 @@ program udr10 ...@@ -28,5 +28,5 @@ program udr10
j = j .localadd. dl(i) j = j .localadd. dl(i)
k = k + dl(i * 2) k = k + dl(i * 2)
end do end do
if (j%x /= 5050 .or. k%x /= 10100) STOP 1 if (j%x /= 5050 .or. k%x /= 10100) stop 1
end end
...@@ -88,8 +88,8 @@ end module udr11 ...@@ -88,8 +88,8 @@ end module udr11
t%x = t%x + 2 * i t%x = t%x + 2 * i
u%x = u%x + 3 * i u%x = u%x + 3 * i
end do end do
if (j%x /= 5050 .or. k%x /= 30300 .or. l%x /= 15150) STOP 1 if (j%x /= 5050 .or. k%x /= 30300 .or. l%x /= 15150) stop 1
if (m%x /= 5050 .or. n%x /= 10100 .or. o%x /= 15150) STOP 2 if (m%x /= 5050 .or. n%x /= 10100 .or. o%x /= 15150) stop 2
if (p%x /= 5050 .or. q%x /= 10100 .or. r%x /= 15150) STOP 3 if (p%x /= 5050 .or. q%x /= 10100 .or. r%x /= 15150) stop 3
if (s%x /= 5050 .or. t%x /= 10100 .or. u%x /= 15150) STOP 4 if (s%x /= 5050 .or. t%x /= 10100 .or. u%x /= 15150) stop 4
end end
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
b = b + 3 b = b + 3
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (any (a /= 2 * r) .or. b /= 3 * r) STOP 1 if (any (a /= 2 * r) .or. b /= 3 * r) stop 1
a(:) = 0 a(:) = 0
b = 0 b = 0
r = 0 r = 0
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
b = b + 3 b = b + 3
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (any (a /= 4 * r) .or. b /= 6 * r) STOP 2 if (any (a /= 4 * r) .or. b /= 6 * r) stop 2
a(:) = 0 a(:) = 0
b = 0 b = 0
r = 0 r = 0
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
b = b + 3 b = b + 3
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (any (a /= 2 * r) .or. b /= 3 * r) STOP 3 if (any (a /= 2 * r) .or. b /= 3 * r) stop 3
end end
elemental function fn1 (x, y) elemental function fn1 (x, y)
integer, intent(in) :: x, y integer, intent(in) :: x, y
......
...@@ -41,38 +41,38 @@ ...@@ -41,38 +41,38 @@
a(:) = 0 a(:) = 0
r = 0 r = 0
!$omp parallel reduction (bar : a) reduction (+: r) !$omp parallel reduction (bar : a) reduction (+: r)
if (lbound (a, 1) /= 1 .or. ubound (a, 1) /= 10) STOP 1 if (lbound (a, 1) /= 1 .or. ubound (a, 1) /= 10) stop 1
a = a + 2 a = a + 2
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (any (a /= 4 * r) ) STOP 2 if (any (a /= 4 * r) ) stop 2
b(:,:) = 0 b(:,:) = 0
allocate (c (4:6,8:10)) allocate (c (4:6,8:10))
c(:,:) = 0 c(:,:) = 0
r = 0 r = 0
!$omp parallel reduction (baz : b, c) reduction (+: r) !$omp parallel reduction (baz : b, c) reduction (+: r)
if (lbound (b, 1) /= 3 .or. ubound (b, 1) /= 5) STOP 3 if (lbound (b, 1) /= 3 .or. ubound (b, 1) /= 5) stop 3
if (lbound (b, 2) /= 7 .or. ubound (b, 2) /= 9) STOP 4 if (lbound (b, 2) /= 7 .or. ubound (b, 2) /= 9) stop 4
if (.not. allocated (c)) STOP 5 if (.not. allocated (c)) stop 5
if (lbound (c, 1) /= 4 .or. ubound (c, 1) /= 6) STOP 6 if (lbound (c, 1) /= 4 .or. ubound (c, 1) /= 6) stop 6
if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 10) STOP 7 if (lbound (c, 2) /= 8 .or. ubound (c, 2) /= 10) stop 7
b = b + 3 b = b + 3
c = c + 4 c = c + 4
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (any (b /= 3 * r) .or. any (c /= 4 * r)) STOP 8 if (any (b /= 3 * r) .or. any (c /= 4 * r)) stop 8
deallocate (c) deallocate (c)
allocate (c (0:1,7:11)) allocate (c (0:1,7:11))
c(:,:) = 0 c(:,:) = 0
r = 0 r = 0
!$omp parallel reduction (foo : c) reduction (+: r) !$omp parallel reduction (foo : c) reduction (+: r)
if (.not. allocated (c)) STOP 9 if (.not. allocated (c)) stop 9
if (lbound (c, 1) /= 0 .or. ubound (c, 1) /= 1) STOP 10 if (lbound (c, 1) /= 0 .or. ubound (c, 1) /= 1) stop 10
if (lbound (c, 2) /= 7 .or. ubound (c, 2) /= 11) STOP 11 if (lbound (c, 2) /= 7 .or. ubound (c, 2) /= 11) stop 11
c = c + 5 c = c + 5
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (any (c /= 10 * r)) STOP 12 if (any (c /= 10 * r)) stop 12
end end
function fn1 (x, y, m1, m2) function fn1 (x, y, m1, m2)
integer, intent(in) :: x(:), y(:), m1, m2 integer, intent(in) :: x(:), y(:), m1, m2
......
...@@ -13,31 +13,31 @@ ...@@ -13,31 +13,31 @@
a(7)%h = (/ 0, 0, 0 /) a(7)%h = (/ 0, 0, 0 /)
r = 0 r = 0
!$omp parallel reduction(+:r) reduction (baz:a) !$omp parallel reduction(+:r) reduction (baz:a)
if (.not.allocated (a)) STOP 1 if (.not.allocated (a)) stop 1
if (lbound (a, 1) /= 7 .or. ubound (a, 1) /= 8) STOP 2 if (lbound (a, 1) /= 7 .or. ubound (a, 1) /= 8) stop 2
if (.not.allocated (a(7)%h)) STOP 3 if (.not.allocated (a(7)%h)) stop 3
if (allocated (a(8)%h)) STOP 4 if (allocated (a(8)%h)) stop 4
if (lbound (a(7)%h, 1) /= 1 .or. ubound (a(7)%h, 1) /= 3) STOP 5 if (lbound (a(7)%h, 1) /= 1 .or. ubound (a(7)%h, 1) /= 3) stop 5
a(:)%g = a(:)%g + 2 a(:)%g = a(:)%g + 2
a(7)%h = a(7)%h + 3 a(7)%h = a(7)%h + 3
r = r + 1 r = r + 1
!$omp end parallel !$omp end parallel
if (.not.allocated (a)) STOP 6 if (.not.allocated (a)) stop 6
if (lbound (a, 1) /= 7 .or. ubound (a, 1) /= 8) STOP 7 if (lbound (a, 1) /= 7 .or. ubound (a, 1) /= 8) stop 7
if (.not.allocated (a(7)%h)) STOP 8 if (.not.allocated (a(7)%h)) stop 8
if (allocated (a(8)%h)) STOP 9 if (allocated (a(8)%h)) stop 9
if (lbound (a(7)%h, 1) /= 1 .or. ubound (a(7)%h, 1) /= 3) STOP 10 if (lbound (a(7)%h, 1) /= 1 .or. ubound (a(7)%h, 1) /= 3) stop 10
if (any (a(:)%g /= 2 * r) .or. any (a(7)%h(:) /= 3 * r)) STOP 11 if (any (a(:)%g /= 2 * r) .or. any (a(7)%h(:) /= 3 * r)) stop 11
contains contains
subroutine foo (x, y) subroutine foo (x, y)
type (dt), allocatable :: x(:), y(:) type (dt), allocatable :: x(:), y(:)
if (allocated (x) .neqv. allocated (y)) STOP 12 if (allocated (x) .neqv. allocated (y)) stop 12
if (lbound (x, 1) /= lbound (y, 1)) STOP 13 if (lbound (x, 1) /= lbound (y, 1)) stop 13
if (ubound (x, 1) /= ubound (y, 1)) STOP 14 if (ubound (x, 1) /= ubound (y, 1)) stop 14
if (allocated (x(7)%h) .neqv. allocated (y(7)%h)) STOP 15 if (allocated (x(7)%h) .neqv. allocated (y(7)%h)) stop 15
if (allocated (x(8)%h) .neqv. allocated (y(8)%h)) STOP 16 if (allocated (x(8)%h) .neqv. allocated (y(8)%h)) stop 16
if (lbound (x(7)%h, 1) /= lbound (y(7)%h, 1)) STOP 17 if (lbound (x(7)%h, 1) /= lbound (y(7)%h, 1)) stop 17
if (ubound (x(7)%h, 1) /= ubound (y(7)%h, 1)) STOP 18 if (ubound (x(7)%h, 1) /= ubound (y(7)%h, 1)) stop 18
x(7)%g = 0 x(7)%g = 0
x(7)%h = 0 x(7)%h = 0
x(8)%g = 0 x(8)%g = 0
......
...@@ -60,5 +60,5 @@ end module udr15m2 ...@@ -60,5 +60,5 @@ end module udr15m2
j = j.addthree.iand (i, -4) j = j.addthree.iand (i, -4)
d = d + dt(i) d = d + dt(i)
end do end do
if (d%x /= 5050 .or. j /= 4903) STOP 1 if (d%x /= 5050 .or. j /= 4903) stop 1
end end
...@@ -28,24 +28,24 @@ end module udr2 ...@@ -28,24 +28,24 @@ end module udr2
do i = 1, 100 do i = 1, 100
j = j + i j = j + i
end do end do
if (any(j .ne. 5050)) STOP 1 if (any(j .ne. 5050)) stop 1
j = 3 j = 3
!$omp parallel do reduction (bar : j) !$omp parallel do reduction (bar : j)
do i = 1, 100 do i = 1, 100
j = j + 4 * i j = j + 4 * i
end do end do
if (any(j .ne. (5050 * 4 + 3))) STOP 2 if (any(j .ne. (5050 * 4 + 3))) stop 2
!$omp parallel do reduction (+ : d) !$omp parallel do reduction (+ : d)
do i = 1, 100 do i = 1, 100
if (any(d%y .ne. 9)) STOP 3 if (any(d%y .ne. 9)) stop 3
d%x = d%x + 8 * i d%x = d%x + 8 * i
end do end do
if (any(d%x .ne. (5050 * 8 + 7)) .or. any(d%y .ne. 9)) STOP 4 if (any(d%x .ne. (5050 * 8 + 7)) .or. any(d%y .ne. 9)) stop 4
d = dt (5, 21) d = dt (5, 21)
!$omp parallel do reduction (foo : d) !$omp parallel do reduction (foo : d)
do i = 1, 100 do i = 1, 100
if (any(d%y .ne. 21)) STOP 5 if (any(d%y .ne. 21)) stop 5
d%x = d%x + 8 * i d%x = d%x + 8 * i
end do end do
if (any(d%x .ne. (5050 * 8 + 5)) .or. any(d%y .ne. 21)) STOP 6 if (any(d%x .ne. (5050 * 8 + 5)) .or. any(d%y .ne. 21)) stop 6
end end
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
& // char (ichar (f(2:2)) + mod (i, 3)) & // char (ichar (f(2:2)) + mod (i, 3))
end do end do
do i = 1, 64 do i = 1, 64
if (index (c, char (ichar ('0') + i)) .eq. 0) STOP 1 if (index (c, char (ichar ('0') + i)) .eq. 0) stop 1
if (index (d, char (ichar ('0') + i)) .eq. 0) STOP 2 if (index (d, char (ichar ('0') + i)) .eq. 0) stop 2
end do end do
if (e.ne.char (ichar ('0') + 64)) STOP 3 if (e.ne.char (ichar ('0') + 64)) stop 3
if (f(1:1).ne.char (ichar ('0') + 32)) STOP 4 if (f(1:1).ne.char (ichar ('0') + 32)) stop 4
if (f(2:2).ne.char (ichar ('0') + 64)) STOP 5 if (f(2:2).ne.char (ichar ('0') + 64)) stop 5
end end
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
& // char (ichar (f(:,:)(2:2)) + mod (i, 3)) & // char (ichar (f(:,:)(2:2)) + mod (i, 3))
end do end do
do i = 1, 64 do i = 1, 64
if (any (index (c, char (ichar ('0') + i)) .eq. 0)) STOP 1 if (any (index (c, char (ichar ('0') + i)) .eq. 0)) stop 1
if (any (index (d, char (ichar ('0') + i)) .eq. 0)) STOP 2 if (any (index (d, char (ichar ('0') + i)) .eq. 0)) stop 2
end do end do
if (any (e.ne.char (ichar ('0') + 64))) STOP 3 if (any (e.ne.char (ichar ('0') + 64))) stop 3
if (any (f(:,:)(1:1).ne.char (ichar ('0') + 32))) STOP 4 if (any (f(:,:)(1:1).ne.char (ichar ('0') + 32))) stop 4
if (any (f(:,:)(2:2).ne.char (ichar ('0') + 64))) STOP 5 if (any (f(:,:)(2:2).ne.char (ichar ('0') + 64))) stop 5
end end
elemental function fn (x, y) elemental function fn (x, y)
character (len=64), intent (in) :: x, y character (len=64), intent (in) :: x, y
......
...@@ -52,6 +52,6 @@ program udr5 ...@@ -52,6 +52,6 @@ program udr5
r4 = r4 + 1.0 r4 = r4 + 1.0
call dp_add (dp, 1.0d0) call dp_add (dp, 1.0d0)
!$omp end parallel !$omp end parallel
if (xdt%r .ne. r) STOP 1 if (xdt%r .ne. r) stop 1
if (i4.ne.r.or.i8.ne.r.or.r4.ne.r.or.dp.ne.r) STOP 2 if (i4.ne.r.or.i8.ne.r.or.r4.ne.r.or.dp.ne.r) stop 2
end program udr5 end program udr5
...@@ -62,8 +62,8 @@ program udr6 ...@@ -62,8 +62,8 @@ program udr6
call dp_add (dp(i), 1.0d0) call dp_add (dp(i), 1.0d0)
end do end do
!$omp end parallel !$omp end parallel
if (any (xdt%r .ne. r)) STOP 1 if (any (xdt%r .ne. r)) stop 1
if (any (i4.ne.r).or.any(i8.ne.r)) STOP 2 if (any (i4.ne.r).or.any(i8.ne.r)) stop 2
if (any(r4.ne.r).or.any(dp.ne.r)) STOP 3 if (any(r4.ne.r).or.any(dp.ne.r)) stop 3
deallocate (xdt, i4, i8, r4, dp) deallocate (xdt, i4, i8, r4, dp)
end program udr6 end program udr6
...@@ -22,7 +22,7 @@ program udr7 ...@@ -22,7 +22,7 @@ program udr7
do i = 1, 64 do i = 1, 64
x = x + i x = x + i
end do end do
if (any (x /= 2080.0)) STOP 1 if (any (x /= 2080.0)) stop 1
contains contains
elemental subroutine omp_out (x, y) elemental subroutine omp_out (x, y)
real, intent (out) :: x real, intent (out) :: x
......
...@@ -42,5 +42,5 @@ end module udr8m2 ...@@ -42,5 +42,5 @@ end module udr8m2
j = j.add.iand (i, -4) j = j.add.iand (i, -4)
d = d + dt(i) d = d + dt(i)
end do end do
if (d%x /= 5050 .or. j /= 4903) STOP 1 if (d%x /= 5050 .or. j /= 4903) stop 1
end end
...@@ -23,7 +23,7 @@ contains ...@@ -23,7 +23,7 @@ contains
end subroutine end subroutine
subroutine initializer1 (x, y) subroutine initializer1 (x, y)
integer :: x, y integer :: x, y
if (y .ne. 3) STOP 1 if (y .ne. 3) stop 1
x = y x = y
end subroutine end subroutine
end module udr9m1 end module udr9m1
...@@ -61,5 +61,5 @@ end module udr9m2 ...@@ -61,5 +61,5 @@ end module udr9m2
j = j.add.iand (i, -4) j = j.add.iand (i, -4)
d = d + dt(i) d = d + dt(i)
end do end do
if (d%x /= 5050 .or. j /= 4903) STOP 2 if (d%x /= 5050 .or. j /= 4903) stop 2
end end
...@@ -156,7 +156,7 @@ contains ...@@ -156,7 +156,7 @@ contains
call check (size (k, 3), 3, l) call check (size (k, 3), 3, l)
call check (size (k), 15, l) call check (size (k), 15, l)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine foo end subroutine foo
subroutine test subroutine test
......
...@@ -124,7 +124,7 @@ contains ...@@ -124,7 +124,7 @@ contains
call check (size (k, 3), 3, l) call check (size (k, 3), 3, l)
call check (size (k), 15, l) call check (size (k), 15, l)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine foo end subroutine foo
subroutine test subroutine test
......
...@@ -162,7 +162,7 @@ contains ...@@ -162,7 +162,7 @@ contains
call check (size (k, 3), 3, l) call check (size (k, 3), 3, l)
call check (size (k), 15, l) call check (size (k), 15, l)
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine foo end subroutine foo
subroutine test subroutine test
......
...@@ -166,7 +166,7 @@ contains ...@@ -166,7 +166,7 @@ contains
call check (size (k), 15, l) call check (size (k), 15, l)
110 continue 110 continue
!$omp end parallel do !$omp end parallel do
if (l) STOP 1 if (l) stop 1
if (z2 == 6) then if (z2 == 6) then
x = 5 x = 5
w = 'thread5thr_number_5THREAD5THR_NUMBER_5' w = 'thread5thr_number_5THREAD5THR_NUMBER_5'
...@@ -202,7 +202,7 @@ contains ...@@ -202,7 +202,7 @@ contains
do 115, q = 4, 6 do 115, q = 4, 6
l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q
115 continue 115 continue
if (l) STOP 2 if (l) stop 2
end if end if
end subroutine foo end subroutine foo
......
...@@ -138,7 +138,7 @@ contains ...@@ -138,7 +138,7 @@ contains
call check (size (k), 15, l) call check (size (k), 15, l)
110 continue 110 continue
!$omp end parallel do !$omp end parallel do
if (l) STOP 1 if (l) stop 1
if (z2 == 6) then if (z2 == 6) then
x = 5 x = 5
w = 'thread5thr_number_5THREAD5THR_NUMBER_5' w = 'thread5thr_number_5THREAD5THR_NUMBER_5'
...@@ -174,7 +174,7 @@ contains ...@@ -174,7 +174,7 @@ contains
do 115, q = 4, 6 do 115, q = 4, 6
l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q
115 continue 115 continue
if (l) STOP 2 if (l) stop 2
end if end if
end subroutine foo end subroutine foo
......
...@@ -173,7 +173,7 @@ contains ...@@ -173,7 +173,7 @@ contains
l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q
115 continue 115 continue
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine foo end subroutine foo
subroutine test subroutine test
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
character (6) :: c, f2 character (6) :: c, f2
character (6) :: d(2) character (6) :: d(2)
c = f1 (6) c = f1 (6)
if (c .ne. 'opqrst') STOP 1 if (c .ne. 'opqrst') stop 1
c = f2 (6) c = f2 (6)
if (c .ne. '_/!!/_') STOP 2 if (c .ne. '_/!!/_') stop 2
d = f3 (6) d = f3 (6)
if (d(1) .ne. 'opqrst' .or. d(2) .ne. 'a') STOP 3 if (d(1) .ne. 'opqrst' .or. d(2) .ne. 'a') stop 3
d = f4 (6) d = f4 (6)
if (d(1) .ne. 'Opqrst' .or. d(2) .ne. 'A') STOP 4 if (d(1) .ne. 'Opqrst' .or. d(2) .ne. 'A') stop 4
contains contains
function f1 (n) function f1 (n)
use omp_lib use omp_lib
...@@ -40,7 +40,7 @@ contains ...@@ -40,7 +40,7 @@ contains
!$omp barrier !$omp barrier
l = l .or. f1 .ne. 'def' l = l .or. f1 .ne. 'def'
!$omp end parallel !$omp end parallel
if (l) STOP 5 if (l) stop 5
f1 = 'opqrst' f1 = 'opqrst'
end function f1 end function f1
function f3 (n) function f3 (n)
...@@ -71,7 +71,7 @@ contains ...@@ -71,7 +71,7 @@ contains
!$omp barrier !$omp barrier
l = l .or. any (f3 .ne. 'def') l = l .or. any (f3 .ne. 'def')
!$omp end parallel !$omp end parallel
if (l) STOP 6 if (l) stop 6
f3(1) = 'opqrst' f3(1) = 'opqrst'
f3(2) = 'a' f3(2) = 'a'
end function f3 end function f3
...@@ -105,7 +105,7 @@ contains ...@@ -105,7 +105,7 @@ contains
l = l .or. any (f4 .ne. 'def') l = l .or. any (f4 .ne. 'def')
l = l .or. size (f4) .ne. 2 l = l .or. size (f4) .ne. 2
!$omp end parallel !$omp end parallel
if (l) STOP 7 if (l) stop 7
f4(1) = 'Opqrst' f4(1) = 'Opqrst'
f4(2) = 'A' f4(2) = 'A'
end function f4 end function f4
...@@ -138,6 +138,6 @@ function f2 (n) ...@@ -138,6 +138,6 @@ function f2 (n)
!$omp barrier !$omp barrier
l = l .or. f2 .ne. 'def' l = l .or. f2 .ne. 'def'
!$omp end parallel !$omp end parallel
if (l) STOP 8 if (l) stop 8
f2 = '_/!!/_' f2 = '_/!!/_'
end function f2 end function f2
...@@ -237,7 +237,7 @@ contains ...@@ -237,7 +237,7 @@ contains
l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q l = l .or. k(p, 1, q - 3) .ne. 19 + x + p + 7 + 3 * q
125 continue 125 continue
!$omp end parallel !$omp end parallel
if (l) STOP 1 if (l) stop 1
end subroutine foo end subroutine foo
subroutine test subroutine test
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
b = 20 b = 20
a(1:5) = max (a(1:5), b(1:5)) a(1:5) = max (a(1:5), b(1:5))
!$omp end parallel workshare !$omp end parallel workshare
if (any (a(1:5) .ne. 20)) STOP 1 if (any (a(1:5) .ne. 20)) stop 1
if (any (a(6:10) .ne. 10)) STOP 2 if (any (a(6:10) .ne. 10)) stop 2
if (.not. foo_seen .or. .not. bar_seen) STOP 3 if (.not. foo_seen .or. .not. bar_seen) stop 3
end end
...@@ -4,7 +4,7 @@ subroutine f1 ...@@ -4,7 +4,7 @@ subroutine f1
!$omp parallel workshare !$omp parallel workshare
a(:,:) = 17 a(:,:) = 17
!$omp end parallel workshare !$omp end parallel workshare
if (any (a.ne.17)) STOP 1 if (any (a.ne.17)) stop 1
end subroutine f1 end subroutine f1
subroutine f2 subroutine f2
integer a(20:50,70:90),d(15),e(15),f(15) integer a(20:50,70:90),d(15),e(15),f(15)
...@@ -21,14 +21,14 @@ subroutine f2 ...@@ -21,14 +21,14 @@ subroutine f2
f = 7 f = 7
where (e.ge.5) f = f + 1 where (e.ge.5) f = f + 1
!$omp end parallel workshare !$omp end parallel workshare
if (any (a.ne.17)) STOP 2 if (any (a.ne.17)) stop 2
if (c.ne.5.or.b.ne.4) STOP 3 if (c.ne.5.or.b.ne.4) stop 3
if (any(d.ne.0)) STOP 4 if (any(d.ne.0)) stop 4
do i = 1, 15 do i = 1, 15
if (e(i).ge.5) then if (e(i).ge.5) then
if (f(i).ne.8) STOP 5 if (f(i).ne.8) stop 5
else else
if (f(i).ne.7) STOP 6 if (f(i).ne.7) stop 6
end if end if
end do end do
end subroutine f2 end subroutine f2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment