summaryrefslogtreecommitdiffstats
path: root/openmp/testsuite/fortran
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2017-11-13 17:44:48 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2017-11-13 17:44:48 +0000
commitf902e467b75671d06d1e9ad3663b8aa9366bc14b (patch)
treed6de4407663a1054506cd8b97d8a047f411e8cd8 /openmp/testsuite/fortran
parent9e3d8f4b39e29e4616e8addb1240530dbdfab2c4 (diff)
downloadbcm5719-llvm-f902e467b75671d06d1e9ad3663b8aa9366bc14b.tar.gz
bcm5719-llvm-f902e467b75671d06d1e9ad3663b8aa9366bc14b.zip
[OpenMP] Remove the unused testsuite/ directory
The testsuite directory is not used or updated and confuses new users to the OpenMP project. These tests were rewritten using the lit format and put under the runtime/test directory. This patch removes the entire testsuite/ directory. Differential Revision: https://reviews.llvm.org/D39767 llvm-svn: 318056
Diffstat (limited to 'openmp/testsuite/fortran')
-rw-r--r--openmp/testsuite/fortran/OMP1_TEST36
-rw-r--r--openmp/testsuite/fortran/OMP2_TEST5
-rw-r--r--openmp/testsuite/fortran/common_utility.f57
-rw-r--r--openmp/testsuite/fortran/do_collapse.f67
-rw-r--r--openmp/testsuite/fortran/do_firstprivate.f56
-rw-r--r--openmp/testsuite/fortran/do_lastprivate.f39
-rw-r--r--openmp/testsuite/fortran/do_ordered.f73
-rw-r--r--openmp/testsuite/fortran/do_private.f67
-rw-r--r--openmp/testsuite/fortran/do_reduction.f514
-rw-r--r--openmp/testsuite/fortran/do_schedule_dynamic.f90
-rw-r--r--openmp/testsuite/fortran/do_schedule_guided.f174
-rw-r--r--openmp/testsuite/fortran/do_schedule_static.f70
-rw-r--r--openmp/testsuite/fortran/has_openmp.f25
-rw-r--r--openmp/testsuite/fortran/omp_atomic.f588
-rw-r--r--openmp/testsuite/fortran/omp_barrier.f50
-rw-r--r--openmp/testsuite/fortran/omp_copyin.f47
-rw-r--r--openmp/testsuite/fortran/omp_critical.f59
-rw-r--r--openmp/testsuite/fortran/omp_flush.f49
-rw-r--r--openmp/testsuite/fortran/omp_get_num_threads.f37
-rw-r--r--openmp/testsuite/fortran/omp_get_wticks.f28
-rw-r--r--openmp/testsuite/fortran/omp_in_parallel.f41
-rw-r--r--openmp/testsuite/fortran/omp_lock.f58
-rw-r--r--openmp/testsuite/fortran/omp_master.f39
-rw-r--r--openmp/testsuite/fortran/omp_master_3.f49
-rw-r--r--openmp/testsuite/fortran/omp_nest_lock.f59
-rw-r--r--openmp/testsuite/fortran/omp_nested.f53
-rw-r--r--openmp/testsuite/fortran/omp_num_threads.f60
-rw-r--r--openmp/testsuite/fortran/omp_single.f40
-rw-r--r--openmp/testsuite/fortran/omp_task.f50
-rw-r--r--openmp/testsuite/fortran/omp_task_firstprivate.f54
-rw-r--r--openmp/testsuite/fortran/omp_task_if.f45
-rw-r--r--openmp/testsuite/fortran/omp_task_private.f55
-rw-r--r--openmp/testsuite/fortran/omp_task_shared.f47
-rw-r--r--openmp/testsuite/fortran/omp_task_untied.f63
-rw-r--r--openmp/testsuite/fortran/omp_taskwait.f83
-rw-r--r--openmp/testsuite/fortran/omp_test_nest_lock.f61
-rw-r--r--openmp/testsuite/fortran/omp_testlock.f57
-rw-r--r--openmp/testsuite/fortran/omp_testsuite.f2
-rw-r--r--openmp/testsuite/fortran/omp_threadprivate.f89
-rw-r--r--openmp/testsuite/fortran/omp_workshare.f142
-rw-r--r--openmp/testsuite/fortran/omp_workshare_default.f36
-rw-r--r--openmp/testsuite/fortran/omp_wtime.f43
-rw-r--r--openmp/testsuite/fortran/par_do_firstprivate.f26
-rw-r--r--openmp/testsuite/fortran/par_do_if.f32
-rw-r--r--openmp/testsuite/fortran/par_do_lastprivate.f28
-rw-r--r--openmp/testsuite/fortran/par_do_ordered.f67
-rw-r--r--openmp/testsuite/fortran/par_do_private.f46
-rw-r--r--openmp/testsuite/fortran/par_do_reduction.f415
-rw-r--r--openmp/testsuite/fortran/par_section_firstprivate.f34
-rw-r--r--openmp/testsuite/fortran/par_section_lastprivate.f51
-rw-r--r--openmp/testsuite/fortran/par_section_private.f86
-rw-r--r--openmp/testsuite/fortran/par_section_reduct.f631
-rw-r--r--openmp/testsuite/fortran/section_firstprivate.f41
-rw-r--r--openmp/testsuite/fortran/section_lastprivate.f62
-rw-r--r--openmp/testsuite/fortran/section_private.f55
-rw-r--r--openmp/testsuite/fortran/section_reduction.f743
-rw-r--r--openmp/testsuite/fortran/single_copyprivate.f41
-rw-r--r--openmp/testsuite/fortran/single_nowait.f50
-rw-r--r--openmp/testsuite/fortran/single_private.f51
-rw-r--r--openmp/testsuite/fortran/testlist-f.txt45
60 files changed, 0 insertions, 5861 deletions
diff --git a/openmp/testsuite/fortran/OMP1_TEST b/openmp/testsuite/fortran/OMP1_TEST
deleted file mode 100644
index a164ce05556..00000000000
--- a/openmp/testsuite/fortran/OMP1_TEST
+++ /dev/null
@@ -1,36 +0,0 @@
-has_openmp
-omp_nested
-omp_get_num_threads
-omp_in_parallel
-do_ordered
-do_reduction
-do_private
-do_firstprivate
-do_lastprivate
-section_reduction
-section_private
-section_firstprivate
-section_lastprivate
-single
-single_private
-single_nowait
-par_do_ordered
-par_do_reduction
-par_do_private
-par_do_firstprivate
-par_do_lastprivate
-par_section_reduction
-par_section_private
-par_section_firstprivate
-par_section_lastprivate
-omp_master_thread
-omp_critical
-omp_atomic
-omp_barrier
-omp_flush
-omp_threadprivate
-omp_copyin
-omp_lock
-omp_testlock
-omp_nest_lock
-omp_nest_testlock
diff --git a/openmp/testsuite/fortran/OMP2_TEST b/openmp/testsuite/fortran/OMP2_TEST
deleted file mode 100644
index 2e47665ca44..00000000000
--- a/openmp/testsuite/fortran/OMP2_TEST
+++ /dev/null
@@ -1,5 +0,0 @@
-omp_num_threads
-omp_workshare
-omp_time
-omp_ticks_time
-single_copyprivate
diff --git a/openmp/testsuite/fortran/common_utility.f b/openmp/testsuite/fortran/common_utility.f
deleted file mode 100644
index f6d1078a3c1..00000000000
--- a/openmp/testsuite/fortran/common_utility.f
+++ /dev/null
@@ -1,57 +0,0 @@
- subroutine print_result(s,crossfailed,M,name)
- implicit none
- character (len=*)::name
- real cert
- integer M,crossfailed
- integer s
- character (len=11) :: c
- character (len=18) :: c2
- cert=100.0*crossfailed/M
-! print *, "cert", cert, "cross ", crossfailed
-! test1=hundred*crossfailed
- c="% certainty"
- c2=" ... verified with "
- if(s.eq.1) then
- write (*,"(A, A, F7.2, A)") name, c2, cert, c
- else
- write (*,"(A,A)") name," ... FAILED"
- endif
- end
-
- subroutine do_test(test_func,cross_test_func,name,N,failed,
- x num_tests,crosschecked)
- implicit none
- integer succeed
- integer crossfail
- integer failed
- integer, external::test_func
- integer, external::cross_test_func
- character (len=*)::name
- integer fail
- integer N,i
- integer num_tests,crosschecked
- num_tests=num_tests+1
- succeed=1
- crossfail=0
- fail=0
- do i=1,N
- if(test_func().eq.0) then
- succeed=0
- fail=fail+1
- exit
- end if
- if(cross_test_func().eq.0) then
-! print *, crossfail
- crossfail=crossfail+1.0
- end if
- enddo
-
- if (fail .ne. 0) then
- failed=failed+1
- else
- if(crossfail .ne. 0) then
- crosschecked=crosschecked+1
- end if
- endif
- call print_result(succeed,crossfail,N,name)
- end
diff --git a/openmp/testsuite/fortran/do_collapse.f b/openmp/testsuite/fortran/do_collapse.f
deleted file mode 100644
index 1817250c1bc..00000000000
--- a/openmp/testsuite/fortran/do_collapse.f
+++ /dev/null
@@ -1,67 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test with omp for collapse clause. Bind with two loops. Without the collapse clause, the first loop will not be ordered</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp do collapse</ompts:directive>
-<ompts:dependences>omp critical,omp do schedule</ompts:dependences>
-<ompts:testcode>
- LOGICAL FUNCTION check_is_larger(i)
- implicit none
- INTEGER :: i
- INTEGER, save :: last_i
- LOGICAL :: is_larger
-
- if (i .eq. 1) last_i = 0
-
- is_larger = (i .ge. last_i) .and. ((i-last_i) .le. 1)
- last_i = i
-
- check_is_larger = is_larger
-
- END FUNCTION check_is_larger
-
- INTEGER FUNCTION <ompts:testcode:functionname>do_collapse</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER i, j
-<ompts:orphan:vars>
- LOGICAL check_is_larger
- LOGICAL my_is_larger
- LOGICAL is_larger
- COMMON /orphvars/ is_larger
-</ompts:orphan:vars>
-
- INCLUDE "omp_testsuite.f"
-
- is_larger = .true.
-
-!$omp parallel private(my_is_larger)
-<ompts:orphan>
- my_is_larger = .true.
-!$omp do private(i,j) schedule(static,1) <ompts:check>collapse(2)</ompts:check>
-!$omp+ ordered
- DO i=1,100
- <ompts:crosscheck>
- my_is_larger = check_is_larger(i) .and. my_is_larger
- </ompts:crosscheck>
- DO j=1,00
- <ompts:check>
-!$omp ordered
- my_is_larger = check_is_larger(i) .and. my_is_larger
-!$omp end ordered
- </ompts:check>
- END DO
- END DO
-!$omp end do
-!$omp critical
- is_larger = is_larger .and. my_is_larger
-!$omp end critical
-</ompts:orphan>
-!$omp end parallel
-
- if (is_larger) then
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_firstprivate.f b/openmp/testsuite/fortran/do_firstprivate.f
deleted file mode 100644
index 0792361be38..00000000000
--- a/openmp/testsuite/fortran/do_firstprivate.f
+++ /dev/null
@@ -1,56 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp do firstprivate clause by counting up a variable in a parallelized loop. Each thread has a firstprivate variable (1) and an variable (2) declared by do firstprivate. First it stores the result of its last iteration in variable (2). Then it stores the value of the variable (2) in its firstprivate variable (1). At the end all firstprivate variables (1) are added to a total sum in a critical section and compared with the correct result.</ompts:testdescription>
-<ompts:version>2.0</ompts:version>
-<ompts:directive>omp do firstprivate</ompts:directive>
-<ompts:dependences>omp parallel private, omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>do_firstprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, known_sum
- INTEGER numthreads
- INTEGER omp_get_num_threads
-<ompts:orphan:vars>
- INTEGER sum0, sum1, i
- COMMON /orphvars/ sum0, sum1, i
-</ompts:orphan:vars>
-
- INCLUDE "omp_testsuite.f"
-
- sum = 0
- sum0 = 12345
- sum1 = 0
-
-
-!$omp parallel firstprivate(sum1)
-!$omp single
- numthreads = omp_get_num_threads()
-!$omp end single
-
-
-<ompts:orphan>
-!$omp do <ompts:check>firstprivate(sum0)</ompts:check><ompts:crosscheck>private (sum0)</ompts:crosscheck>
- DO i=1,LOOPCOUNT
- sum0 = sum0 + i
- sum1 = sum0
- END DO
-!$omp end do
-</ompts:orphan>
-
-
-!$omp critical
- WRITE (1,*) sum0
- sum = sum + sum1
-!$omp end critical
-!$omp end parallel
-
-
- known_sum=12345*numthreads+ (LOOPCOUNT*(LOOPCOUNT+1))/2
- IF ( known_sum .EQ. sum ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- WRITE (1,*) "Found sum was", sum, "instead of", known_sum
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_lastprivate.f b/openmp/testsuite/fortran/do_lastprivate.f
deleted file mode 100644
index 4202e501388..00000000000
--- a/openmp/testsuite/fortran/do_lastprivate.f
+++ /dev/null
@@ -1,39 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp do lastprivate clause by counting up a variable in a parallelized loop. Each thread saves the next summand in a lastprivate variable i0. At the end i0 is compared to the value of the expected last summand.</ompts:testdescription>
-<ompts:version>2.0</ompts:version>
-<ompts:directive>omp do private</ompts:directive>
-<ompts:dependences>omp parallel firstprivate, omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>do_lastprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum,known_sum
-<ompts:orphan:vars>
- INTEGER sum0,i0,i
- COMMON /orphvars/ sum0,i0,i
-</ompts:orphan:vars>
- INCLUDE "omp_testsuite.f"
- sum = 0
- sum0 = 0
- i0 = -1
-!$omp parallel firstprivate(sum0)
-<ompts:orphan>
-!$omp do schedule(static,7) <ompts:check>lastprivate(i0)</ompts:check>
- DO i=1, LOOPCOUNT
- sum0 = sum0 + i
- i0 = i
- END DO
-<ompts:check>!$omp end do</ompts:check>
-</ompts:orphan>
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end parallel
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
- IF ( known_sum .EQ. sum .AND. i0 .EQ. LOOPCOUNT ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_ordered.f b/openmp/testsuite/fortran/do_ordered.f
deleted file mode 100644
index b087f8154d2..00000000000
--- a/openmp/testsuite/fortran/do_ordered.f
+++ /dev/null
@@ -1,73 +0,0 @@
-<ompts:test>
-<ompts:directive>do ordered</ompts:directive>
-<ompts:version>2.0</ompts:version>
-<ompts:dependences>parallel private, critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION i_islarger(i)
- IMPLICIT NONE
- INTEGER i, islarger
- INTEGER last_i
- COMMON /mycom/ last_i
- IF ( i .GT. last_i) THEN
- islarger = 1
- ELSE
- islarger = 0
- END If
- last_i = i
- i_islarger = islarger
- END
-
- INTEGER FUNCTION <ompts:testcode:functionname>do_ordered</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER known_sum, is_larger
- INTEGER last_i
- INTEGER i_islarger
- COMMON /mycom/ last_i
-
-<ompts:orphan:parms> i </ompts:orphan:parms>
-
-<ompts:orphan:vars>
- INTEGER sum, i, my_islarger
- COMMON /orphvars/ my_islarger, sum
-</ompts:orphan:vars>
-
- sum = 0
- is_larger = 1
- last_i = 0
-!$omp parallel private(my_islarger)
- my_islarger = 1
-!$omp do schedule(static,1) ordered
- DO i=1, 99
-<ompts:orphan>
-<ompts:check>
-!$omp ordered
-</ompts:check>
- IF (i_islarger(i) .EQ. 1 .AND. my_islarger .EQ. 1) THEN
- my_islarger = 1
- ELSE
- my_islarger = 0
- END IF
- sum = sum + i
-<ompts:check>
-!$omp end ordered
-</ompts:check>
-</ompts:orphan>
- END DO
-!$omp end do
-!$omp critical
- IF (is_larger .EQ. 1 .AND. my_islarger .EQ. 1 ) THEN
- is_larger = 1
- ELSE
- is_larger = 0
- END IF
-!$omp end critical
-!$omp end parallel
- known_sum = (99*100)/2
- IF ( known_sum .EQ. sum .AND. is_larger .EQ. 1) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_private.f b/openmp/testsuite/fortran/do_private.f
deleted file mode 100644
index 2e587cf52da..00000000000
--- a/openmp/testsuite/fortran/do_private.f
+++ /dev/null
@@ -1,67 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp do private clause by counting up a variable in a parallelized loop. Each thread has a private variable (1) and an variable (2) declared by for private. First it stores the result of its last iteration in variable (2). Then this thread waits some time before it stores the value of the variable (2) in its private variable (1). At the beginning of the next iteration the value of (1) is assigned to (2). At the end all private variables (1) are added to a total sum in a critical section and compared with the correct result.</ompts:testdescription>
-<ompts:version>2.0</ompts:version>
-<ompts:directive>omp do private</ompts:directive>
-<ompts:dependences>omp parallel private, omp flush, omp critical</ompts:dependences>
-<ompts:testcode>
- SUBROUTINE do_some_work()
- IMPLICIT NONE
- INTEGER i
- INTRINSIC sqrt
- DOUBLE PRECISION sum
-
- INCLUDE "omp_testsuite.f"
- sum=0.0
- DO i=0, LOOPCOUNT-1
- sum = sum + sqrt(REAL(i))
- ENDDO
-
- END
-
- INTEGER FUNCTION <ompts:testcode:functionname>do_private</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, known_sum
-<ompts:orphan:vars>
- INTEGER sum0, sum1, i
- COMMON /orphvars/ sum0, sum1, i
-</ompts:orphan:vars>
-
- INCLUDE "omp_testsuite.f"
-
- sum = 0
- sum0 = 0
- sum1 = 0
-
-!$omp parallel private(sum1)
- sum0 = 0
- sum1 = 0
-
-<ompts:orphan>
-!$omp do <ompts:check>private(sum0)</ompts:check> schedule(static,1)
- DO i=1, LOOPCOUNT
- sum0 = sum1
-!$omp flush
- sum0 = sum0 + i
- CALL do_some_work()
-!$omp flush
-! print *, sum0
- sum1 = sum0
- END DO
-!$omp end do
-</ompts:orphan>
-
-!$omp critical
- sum = sum + sum1
-!$omp end critical
-!$omp end parallel
-
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
-! print *, "sum:", sum, "known_sum", known_sum
- IF ( known_sum .EQ. sum) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_reduction.f b/openmp/testsuite/fortran/do_reduction.f
deleted file mode 100644
index 2b25a457b2d..00000000000
--- a/openmp/testsuite/fortran/do_reduction.f
+++ /dev/null
@@ -1,514 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp do reduction directive wich all its options.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp do reduction</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>do_reduction</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum2, known_sum
- INTEGER known_product
- DOUBLE PRECISION rounding_error, dpt
- INTEGER double_DIGITS
- DOUBLE PRECISION dknown_sum
- INTEGER result
- INCLUDE "omp_testsuite.f"
- PARAMETER (known_product=3628800)
- PARAMETER (rounding_error=1.E-6)
-<ompts:orphan:vars>
- INTEGER sum,diff,product,i
- DOUBLE PRECISION dsum,ddiff,dt
- LOGICAL logic_and, logic_or, logic_eqv,logic_neqv
- LOGICAL logics(LOOPCOUNT)
- INTEGER bit_and, bit_or
- INTEGER exclusiv_bit_or
- INTEGER min_value, max_value
- INTEGER int_array(LOOPCOUNT)
- DOUBLE PRECISION d_array(LOOPCOUNT)
- DOUBLE PRECISION dmin, dmax
- COMMON /orphvars/ sum,product,diff,i,dsum,ddiff,dt,logic_and,
- & logic_or,logic_eqv,logic_neqv,logics,bit_and,bit_or,int_array,
- & exclusiv_bit_or,min_value,dmin,dmax,d_array,max_value
- INTEGER MAX_FACTOR
- PARAMETER (double_DIGITS=20,MAX_FACTOR=10)
-</ompts:orphan:vars>
-
- dt = 1./3.
- known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
- product = 1
- sum2 = 0
- sum = 0
- dsum = 0.
- result =0
- logic_and = .true.
- logic_or = .false.
- bit_and = 1
- bit_or = 0
- exclusiv_bit_or = 0
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic, 1) <ompts:check>reduction(+:sum)</ompts:check>
- DO i = 1, LOOPCOUNT
- sum = sum + i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (known_sum .NE. sum) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with integers: Result was ",
- & sum,"instead of ", known_sum
- END IF
-
-
- diff = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic, 1) <ompts:check>reduction (-: diff)</ompts:check>
- DO i = 1, LOOPCOUNT
- diff = diff - i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( diff .NE. 0 ) THEN
- result = result + 1
- WRITE(1,*) "Error in difference with integers: Result was ",
- & sum,"instead of 0."
- END IF
-
-!... Test for doubles
- dsum =0.
- dpt = 1
-
- DO i=1, DOUBLE_DIGITS
- dpt= dpt * dt
- END DO
- dknown_sum = (1-dpt)/(1-dt)
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(+:dsum)</ompts:check>
- DO i=0,DOUBLE_DIGITS-1
- dsum = dsum + dt**i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
-
- IF(dsum .NE. dknown_sum .AND.
- & ABS(dsum - dknown_sum) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with doubles: Result was ",
- & dsum,"instead of ",dknown_sum,"(Difference: ",
- & dsum - dknown_sum,")"
- END IF
- dpt = 1
-
-
-
- DO i=1, DOUBLE_DIGITS
- dpt = dpt*dt
- END DO
- ddiff = ( 1-dpt)/(1-dt)
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(-:ddiff)</ompts:check>
- DO i=0, DOUBLE_DIGITS-1
- ddiff = ddiff - dt**i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( ABS(ddiff) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in Difference with doubles: Result was ",
- & ddiff,"instead of 0.0"
- END IF
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(*:product)</ompts:check>
- DO i=1,MAX_FACTOR
- product = product * i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (known_product .NE. product) THEN
- result = result + 1
- write(1,*) "Error in Product with integers: Result was ",
- & product," instead of",known_product
- END IF
-
- DO i=1,LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.AND.:logic_and)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (.NOT. logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND part 1"
- END IF
-
-
- logic_and = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.AND.:logic_and)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND pass 2"
- END IF
-
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.OR.:logic_or)</ompts:check>
- DO i = 1, LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (logic_or) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 1"
- END IF
-
- logic_or = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.OR.:logic_or)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( .NOT. logic_or ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 2"
- END IF
-
-!... Test logic EQV, unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
- logic_eqv = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.EQV.:logic_eqv)</ompts:check>
- DO i = 1, LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (.NOT. logic_eqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 1"
- END IF
-
- logic_eqv = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.EQV.:logic_eqv)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( logic_eqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 2"
- END IF
-
-!... Test logic NEQV, which is unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
- logic_neqv = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.NEQV.:logic_neqv)</ompts:check>
- DO i = 1, LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (logic_neqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 1"
- END IF
-
- logic_neqv = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(.neqv.:logic_neqv)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( .NOT. logic_neqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 1
- END DO
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(IAND:bit_and)</ompts:check>
- DO i=1, LOOPCOUNT
-!... iand(I,J): Returns value resulting from boolean AND of
-!... pair of bits in each of I and J.
- bit_and = IAND(bit_and,int_array(i))
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( bit_and .LT. 1 ) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 1"
- END IF
-
- bit_and = 1
- int_array(LOOPCOUNT/2) = 0
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(IAND:bit_and)</ompts:check>
- DO i=1, LOOPCOUNT
- bit_and = IAND ( bit_and, int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF( bit_and .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(IOR:bit_or)</ompts:check>
- DO i=1, LOOPCOUNT
-!... Ior(I,J): Returns value resulting from boolean OR of
-!... pair of bits in each of I and J.
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 1"
- END IF
-
-
- bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(IOR:bit_or)</ompts:check>
- DO i=1, LOOPCOUNT
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(IEOR:exclusiv_bit_or)</ompts:check>
- DO i = 1, LOOPCOUNT
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( exclusiv_bit_or .ge. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 1"
- END IF
-
- exclusiv_bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(IEOR:exclusiv_bit_or)</ompts:check>
- DO i = 1, LOOPCOUNT
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( exclusiv_bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 2"
- END IF
-
- DO i=1,LOOPCOUNT
- int_array(i) = 10 - i
- END DO
-
- min_value = 65535
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(MIN:min_value)</ompts:check>
- DO i = 1, LOOPCOUNT
- min_value = MIN(min_value,int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( min_value .GT. (10-LOOPCOUNT) )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- int_array(i) = i
- END DO
-
- max_value = -32768
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(MAX:max_value)</ompts:check>
- DO i = 1, LOOPCOUNT
- max_value = MAX(max_value,int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( max_value .LT. LOOPCOUNT )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MAX"
- END IF
-
-!... test double min, max
- DO i=1,LOOPCOUNT
- d_array(i) = 10 - i*dt
- END DO
-
- dmin = 2**10
- dt = 0.5
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(MIN:dmin)</ompts:check>
- DO i = 1, LOOPCOUNT
- dmin= MIN(dmin,d_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( dmin .GT. (10-dt) )THEN
- result = result + 1
- WRITE(1,*) "Error in double MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- d_array(i) = i * dt
- END DO
-
- dmax= - (2**10)
-
-!$omp parallel
-<ompts:orphan>
-!$omp do schedule(dynamic,1) <ompts:check>reduction(MAX:dmax)</ompts:check>
- DO i = 1, LOOPCOUNT
- dmax= MAX(dmax,d_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( dmax .LT. LOOPCOUNT*dt )THEN
- result = result + 1
- WRITE(1,*) "Error in double MAX"
- END IF
-
- IF ( result .EQ. 0 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_schedule_dynamic.f b/openmp/testsuite/fortran/do_schedule_dynamic.f
deleted file mode 100644
index 18f8ba74752..00000000000
--- a/openmp/testsuite/fortran/do_schedule_dynamic.f
+++ /dev/null
@@ -1,90 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the dynamic option of the omp do schedule directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp do schedule(dynamic)</ompts:directive>
-<ompts:dependences>omp flush,omp do nowait,omp critical,omp single</ompts:dependences>
-<ompts:testcode>
-
-
- INTEGER FUNCTION <ompts:testcode:functionname>do_schedule_dynamic</ompts:testcode:functionname>()
- IMPLICIT NONE
- CHARACTER*30 logfile
- INTEGER omp_get_thread_num,omp_get_num_threads
- INTEGER threads
- INTEGER count, tmp_count
- INTEGER,ALLOCATABLE:: tmp(:)
- INTEGER ii
- INTEGER result
-
-<ompts:orphan:vars>
- INTEGER CFDMAX_SIZE
- PARAMETER (CFDMAX_SIZE = 1000)
- INTEGER i,tids(0:CFDMAX_SIZE-1),tid,chunk_size
- COMMON /orphvars/ i,tids,tid,chunk_size
-</ompts:orphan:vars>
-
- chunk_size = 7
- count = 0
- tmp_count = 0
- result = 0
- ii = 0
-
-!$omp parallel private(tid)
- tid = omp_get_thread_num()
-<ompts:orphan>
-!$omp do <ompts:check>schedule(dynamic,chunk_size)</ompts:check>
- DO i=0, CFDMAX_SIZE-1
- tids(i) = tid
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- DO i=0, CFDMAX_SIZE - 2
- IF ( tids(i) .ne. tids(i+1) ) THEN
- count = count + 1
- END IF
- END DO
-
- ALLOCATE( tmp(0:count) )
- tmp(0) = 1
-
- DO i = 0, CFDMAX_SIZE - 2
- IF ( tmp_count .GT. count ) THEN
- WRITE(*,*) "--------------------"
- WRITE(*,*) "Testinternal Error: List too small!!!"
- WRITE(*,*) "--------------------"
- GOTO 10
- END If
- IF ( tids(i) .NE. tids(i+1) ) then
- tmp_count = tmp_count + 1
- tmp(tmp_count) = 1
- ELSE
- tmp(tmp_count) = tmp(tmp_count) +1
- END IF
- END DO
-
-!... is dynamic statement working?
-
- 10 DO i=0, count -1
- IF ( MOD(tmp(i),chunk_size) .ne. 0 ) THEN
-! ... it is possible for 2 adjacent chunks assigned to a same thread
- result = result + 1
- WRITE(1,*) "The intermediate dispatch has wrong chunksize."
- END IF
- END DO
-
- IF ( MOD(tmp(count), chunk_size) .NE.
- & MOD (CFDMAX_SIZE, chunk_size) ) THEN
- result = result + 1
- WRITE(1,*) "the last dispatch has wrong chunksize."
- END IF
-
- IF ( result .eq. 0) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/do_schedule_guided.f b/openmp/testsuite/fortran/do_schedule_guided.f
deleted file mode 100644
index 5d0e7edb71b..00000000000
--- a/openmp/testsuite/fortran/do_schedule_guided.f
+++ /dev/null
@@ -1,174 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the guided option of the omp do schedule directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp do schedule(guided)</ompts:directive>
-<ompts:dependences>omp flush,omp do nowait,omp critical,omp single</ompts:dependences>
-<ompts:testcode>
- ! TODO:
- ! C. Niethammer:
- ! Find check to decide if the test was run as schedule(static) because
- ! this also can pass the test if the work is divided into thread-counts
- INTEGER FUNCTION <ompts:testcode:functionname>do_schedule_guided</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER omp_get_thread_num,omp_get_num_threads
- CHARACTER*20 logfile
- INTEGER threads
- INTEGER tmp_count
- INTEGER, allocatable :: tmp(:)
- INTEGER ii, flag
- INTEGER result
- INTEGER expected
- INTEGER openwork
- DOUBLE PRECISION c
-
- <ompts:orphan:vars>
- INTEGER i
- INTEGER tid
- INTEGER count
-
- INTEGER DELAY
- INTEGER MAX_TIME
- INTEGER CFSMAX_SIZE
-
-! ... choose small iteration space for small sync. overhead
- PARAMETER (DELAY = 1)
- PARAMETER (MAX_TIME = 5)
- PARAMETER (CFSMAX_SIZE = 150)
-
- INTEGER notout
- INTEGER maxiter
- INTEGER tids(0:CFSMAX_SIZE-1)
-
- COMMON /orphvars/ notout,maxiter,tids
- </ompts:orphan:vars>
-
- result = 0
- notout = 1
- maxiter = 0
- count = 0
- tmp_count = 0
- openwork = CFSMAX_SIZE
-<ompts:check>
-
-! Determine the number of available threads
-!$omp parallel
-!$omp single
- threads = omp_get_num_threads()
-!$omp end single
-!$omp end parallel
- IF ( threads .LT. 2) THEN
- PRINT *,"This test only works with at least two threads"
- WRITE(1,*) "This test only works with at least two threads"
- <testfunctionname></testfunctionname> = 0
- STOP
- END IF
-
-! ... Now the real parallel work:
-! ... Each thread will start immediately with the first chunk.
-
-!$omp parallel private(tid,count) shared(tids,maxiter)
- tid = omp_get_thread_num()
- <ompts:orphan>
-!$omp do schedule(guided)
- DO i = 0 , CFSMAX_SIZE-1
- count = 0
-!$omp flush(maxiter)
- IF ( i .GT. maxiter ) THEN
-!$omp critical
- maxiter = i
-!$omp end critical
- END IF
-
-!.. if it is not our turn we wait
-! a) until another thread executed an iteration
-! with a higher iteration count
-! b) we are at the end of the loop (first thread finished
-! and set notout=0 OR
-! c) timeout arrived
-
-!$omp flush(maxiter,notout)
- IF ( notout .GE. 1 .AND. count .LT. MAX_TIME
- & .AND. maxiter .EQ. i ) THEN
- DO WHILE ( notout .GE. 1 .AND. count .LT. MAX_TIME
- & .AND. maxiter .EQ. i )
- CALL sleep(DELAY)
- count = count + DELAY
- END DO
- END IF
- tids(i) = tid
- END DO
-!$omp end do nowait
- </ompts:orphan>
-
- notout = 0
-!$omp flush(notout)
-
-!$omp end parallel
-
-!*******************************************************!
-! evaluation of the values
-!*******************************************************!
- count = 0
-
- DO i=0, CFSMAX_SIZE - 2
- IF ( tids(i) .NE. tids(i+1) ) THEN
- count = count + 1
- END IF
- END DO
-
- ALLOCATE( tmp(0:count) )
- tmp_count = 0
- tmp(0) = 1
-! ... calculate the chunksize for each dispatch
-
- DO i=0, CFSMAX_SIZE - 2
- IF ( tids(i) .EQ. tids(i+1) ) THEN
- tmp(tmp_count) = tmp(tmp_count) + 1
- ELSE
- tmp_count = tmp_count + 1
- tmp(tmp_count) = 1
- END IF
- END DO
-
-! ... Check if chunk sizes are decreased until equals to
-! ... the specified one, ignore the last dispatch
-! ... for possible smaller remainder
-
-! Determine the constant
- expected = openwork / threads
- c = real(tmp(0)) / real(expected)
- WRITE(1,*) "Found constant to be ", c
-
- DO i = 0, count - 2
- WRITE(1,*) "open:", openwork, "size:", tmp(i)
- IF (expected .GT. 1) THEN
- expected = c * openwork / threads
- END IF
-
- IF (abs(tmp(i) - expected) .GE. 2 ) THEN
- result = 1
- WRITE(1,*) "Chunksize differed from expected ",
- & "value: ",tmp(i), "instead ", expected
- END IF
-
- IF (i .GT. 0 .AND. (tmp(i-1) - tmp(i)) .LT. 0) THEN
- WRITE(1,*) "Chunksize did not decrease: ", tmp(i),
- & "instead",tmp(i-1)
- END IF
-
- openwork = openwork - tmp(i)
- END DO
-
- IF ( result .EQ. 0 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:check>
-<ompts:crosscheck>
- <testfunctionname></testfunctionname> = 0
- END
-</ompts:crosscheck>
-</ompts:testcode>
-</omtps:test>
diff --git a/openmp/testsuite/fortran/do_schedule_static.f b/openmp/testsuite/fortran/do_schedule_static.f
deleted file mode 100644
index 7ab02f8ef00..00000000000
--- a/openmp/testsuite/fortran/do_schedule_static.f
+++ /dev/null
@@ -1,70 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the static option of the omp do schedule directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp do schedule(static)</ompts:directive>
-<ompts:dependences>omp do nowait,omp flush,omp critical,omp single</ompts:dependences>
-<ompts:testcode>
-
- INTEGER FUNCTION <ompts:testcode:functionname>do_schedule_static</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER omp_get_thread_num,omp_get_num_threads
- CHARACTER*30 logfile
- INTEGER threads
- INTEGER count
- INTEGER ii
- INTEGER result
-<ompts:orphan:vars>
- INTEGER CFSMAX_SIZE
- PARAMETER (CFSMAX_SIZE = 1000)
- INTEGER i,tids(0:CFSMAX_SIZE-1), tid, chunk_size
- COMMON /orphvars/ i,tid,tids,chunk_size
-</ompts:orphan:vars>
-
- chunk_size = 7
- result = 0
- ii = 0
-
-!$omp parallel
-!$omp single
- threads = omp_get_num_threads()
-!$omp end single
-!$omp end parallel
-
- IF ( threads .LT. 2) THEN
- PRINT *,"This test only works with at least two threads"
- WRITE(1,*) "This test only works with at least two threads"
- <testfunctionname></testfunctionname> = 0
- STOP
- ELSE
- WRITE(1,*) "Using an internal count of ",CFSMAX_SIZE
- WRITE(1,*) "Using a specified chunksize of ",chunk_size
-
-!$omp parallel private(tid) shared(tids)
- tid = omp_get_thread_num()
-<ompts:orphan>
-!$omp do <ompts:check>schedule(static,chunk_size)</ompts:check>
- DO i = 0 ,CFSMAX_SIZE -1
- tids(i) = tid
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- DO i = 0, CFSMAX_SIZE-1
-!... round-robin for static chunk
- ii = mod( i/chunk_size,threads)
- IF (tids(i) .NE. ii ) THEN
- result = result + 1
- WRITE(1,*)"Iteration ",i,"should be assigned to ",
- & ii,"instead of ",tids(i)
- END IF
- END DO
- IF ( result .EQ. 0 )THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/has_openmp.f b/openmp/testsuite/fortran/has_openmp.f
deleted file mode 100644
index 5585ef21a6c..00000000000
--- a/openmp/testsuite/fortran/has_openmp.f
+++ /dev/null
@@ -1,25 +0,0 @@
-<ompts:test>
-<ompts:version>2.0</ompts:version>
-<ompts:testdescription>Testing if the conditional compilation is supported or not.
-Yi Wen at 05032004: Do we want to write two versions of has_omp? both C23456789
-and #ifdef formats are supposed to work. At least Sun's compiler cannot deal with
-the second format (#ifdef)</ompts:testdescription>
-
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>has_openmp</ompts:testcode:functionname>()
- <testfunctionname></testfunctionname> = 0
-
-<ompts:check>
-!version 1.
-!C23456789
-!$ <testfunctionname></testfunctionname> = 1
-
-! version 2.
-!#ifdef _OPENMP
- <testfunctionname></testfunctionname> = 1
-!#endif
-</ompts:check>
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_atomic.f b/openmp/testsuite/fortran/omp_atomic.f
deleted file mode 100644
index ee74450ae84..00000000000
--- a/openmp/testsuite/fortran/omp_atomic.f
+++ /dev/null
@@ -1,588 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp atomic directive by counting up a variable in a parallelized loop with an atomic directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp atomic</ompts:directive>
-<ompts:testcode>
-!********************************************************************
-! Functions: omp_atomic
-! change "character*20" into "character (LEN=20)::"
-! get rid of the "tab" key by Zhenying Liu, on Oct. 16, 2005.
-!********************************************************************
- INTEGER FUNCTION <ompts:testcode:functionname>omp_atomic</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- INTEGER sum2, known_sum
- INTEGER known_product, int_const
- DOUBLE PRECISION rounding_error, dpt
- INTEGER double_DIGITS
- DOUBLE PRECISION dknown_sum
- INTEGER result
- PARAMETER (int_const=10,known_product=3628800)
- PARAMETER (rounding_error=1.E-2)
-<ompts:orphan:vars>
- INTEGER sum,i,diff,product
- DOUBLE PRECISION dsum,dt,ddiff
- LOGICAL logic_and, logic_or, logic_eqv,logic_neqv
- INTEGER bit_and, bit_or
- INTEGER exclusiv_bit_or
- INTEGER min_value, max_value
- DOUBLE PRECISION dmin, dmax
- LOGICAL logics(LOOPCOUNT)
- INTEGER int_array(LOOPCOUNT)
- DOUBLE PRECISION d_array(LOOPCOUNT)
- COMMON /orphvars/ sum,product,diff,i,dsum,ddiff,dt,logic_and,
- & logic_or,logic_eqv,logic_neqv,logics,bit_and,bit_or,int_array,
- & exclusiv_bit_or,min_value,dmin,dmax,d_array,max_value
- INTEGER MAX_FACTOR
- PARAMETER (double_DIGITS=20,MAX_FACTOR=10)
-</ompts:orphan:vars>
-
- dt = 1./3.
- known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
- product = 1
- sum2 = 0
- sum = 0
- dsum = 0.
- result =0
- logic_and = .true.
- logic_or = .false.
- bit_and = 1
- bit_or = 0
- exclusiv_bit_or = 0
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i =1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- sum = sum + i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (known_sum .NE. sum) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with integers: Result was ",
- & sum,"instead of ", known_sum
- END If
-
- diff = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
-
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i =1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- diff = diff - i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( diff .NE. 0 ) THEN
- result = result + 1
- WRITE(1,*) "Error in difference with integers: Result was ",
- & diff,"instead of 0."
- END IF
-
-!... Test for doubles
- dsum = 0.
- dpt = 1
-
- DO i=1, DOUBLE_DIGITS
- dpt= dpt * dt
- END DO
- dknown_sum = (1-dpt)/(1-dt)
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=0,DOUBLE_DIGITS-1
-<ompts:check>
-!$omp atomic
-</ompts:check>
- dsum = dsum + dt**i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
-
- IF (dsum .NE. dknown_sum .AND.
- & ABS(dsum - dknown_sum) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with doubles: Result was ",
- & dsum,"instead of ",dknown_sum,"(Difference: ",
- & dsum - dknown_sum,")"
- END IF
- dpt = 1
-
-
- DO i=1, DOUBLE_DIGITS
- dpt = dpt*dt
- END DO
-
- ddiff = ( 1-dpt)/(1-dt)
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=0, DOUBLE_DIGITS-1
-<ompts:check>
-!$omp atomic
-</ompts:check>
- ddiff = ddiff - dt**i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( ABS(ddiff) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in Difference with doubles: Result was ",
- & ddiff,"instead of 0.0"
- END IF
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1,MAX_FACTOR
-<ompts:check>
-!$omp atomic
-</ompts:check>
- product = product * i
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (known_product .NE. product) THEN
- result = result + 1
- WRITE(1,*) "Error in Product with integers: Result was ",
- & product," instead of",known_product
- END IF
-
- DO i=1,LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1,LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (.NOT. logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND part 1"
- END IF
-
-
- logic_and = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1,LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND pass 2"
- END IF
-
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (logic_or) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 1"
- END IF
-
- logic_or = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1,LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( .NOT. logic_or ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 2"
- END IF
-
-!... Test logic EQV, unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
- logic_eqv = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (.NOT. logic_eqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 1"
- END IF
-
- logic_eqv = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1,LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( logic_eqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 2"
- END IF
-
-!... Test logic NEQV, which is unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
- logic_neqv = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_neqv = logic_neqv .OR. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF (logic_neqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 1"
- END IF
-
- logic_neqv = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1,LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- logic_neqv = logic_neqv .OR. logics(i)
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( .NOT. logic_neqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 1
- END DO
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1, LOOPCOUNT
-!... iand(I,J): Returns value resulting from boolean AND of
-!... pair of bits in each of I and J.
-<ompts:check>
-!$omp atomic
-</ompts:check>
- bit_and = IAND(bit_and,int_array(i))
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( bit_and .LT. 1 ) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 1"
- END If
-
- bit_and = 1
- int_array(LOOPCOUNT/2) = 0
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- bit_and = IAND ( bit_and, int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF( bit_and .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1, LOOPCOUNT
-!... Ior(I,J): Returns value resulting from boolean OR of
-!... pair of bits in each of I and J.
-<ompts:check>
-!$omp atomic
-</ompts:check>
- bit_or = Ior(bit_or, int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 1"
- END IF
-
-
- bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i=1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( bit_or .le. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( exclusiv_bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 1"
- END IF
-
- exclusiv_bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( exclusiv_bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 2"
- END IF
-
- DO i=1,LOOPCOUNT
- int_array(i) = 10 - i
- END DO
-
- min_value = 65535
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- min_value = min(min_value,int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( min_value .GT. (10-LOOPCOUNT) )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- int_array(i) = i
- END DO
-
- max_value = -32768
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- max_value = max(max_value,int_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( max_value .LT. LOOPCOUNT )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MAX"
- END IF
-
-!... test double min, max
- DO i=1,LOOPCOUNT
- d_array(i) = 10 - i*dt
- END DO
-
- dmin = 2**10
- dt = 0.5
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- dmin= MIN(dmin,d_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( dmin .GT. (10-dt) )THEN
- result = result + 1
- WRITE(1,*) "Error in double MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- d_array(i) = i * dt
- END DO
-
- dmax= - (2**10)
-
-!$omp parallel
-<ompts:orphan>
-!$omp do
- DO i = 1, LOOPCOUNT
-<ompts:check>
-!$omp atomic
-</ompts:check>
- dmax= max(dmax,d_array(i) )
- END DO
-!$omp end do
-</ompts:orphan>
-!$omp end parallel
-
- IF ( dmax .LT. LOOPCOUNT*dt )THEN
- result = result + 1
- WRITE(1,*) "Error in double MAX"
- END IF
-
- IF ( result .EQ. 0 ) THEN
- <testfunctionname></testfunctionname>= 1
- ELSE
- <testfunctionname></testfunctionname>= 0
- END IF
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_barrier.f b/openmp/testsuite/fortran/omp_barrier.f
deleted file mode 100644
index 5125994149e..00000000000
--- a/openmp/testsuite/fortran/omp_barrier.f
+++ /dev/null
@@ -1,50 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp barrier directive. The test creates several threads and sends one of them sleeping before setting a flag. After the barrier the other ones do some little work depending on the flag.</ ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp barrier</ompts:directive>
-<ompts:testcode>
-
- SUBROUTINE do_some_work3()
- REAL i
- INTRINSIC sqrt
- DOUBLE PRECISION sum
- INCLUDE "omp_testsuite.f"
- sum = 0.0
- DO WHILE (i < LOOPCOUNT-1)
- sum = sum + sqrt(i)
- i = i + 1
- END DO
- END
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_barrier</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sleeptime
- INTEGER omp_get_thread_num
- INTEGER result1, result2, rank
- result1 = 0
- result2 = 0
- sleeptime = 1
-!$omp parallel private(rank)
- rank = omp_get_thread_num()
-! PRINT *, "rank", rank
- IF ( rank .EQ. 1 ) THEN
- CALL sleep(sleeptime)
- result2 = 3
- END IF
- <ompts:orphan>
- <ompts:check>
-!$omp barrier
- </ompts:check>
- </ompts:orphan>
- IF ( rank .EQ. 0 ) THEN
- result1 = result2
- END IF
-!$omp end parallel
- IF ( result1 .EQ. 3 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_copyin.f b/openmp/testsuite/fortran/omp_copyin.f
deleted file mode 100644
index 714f149a925..00000000000
--- a/openmp/testsuite/fortran/omp_copyin.f
+++ /dev/null
@@ -1,47 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel copyin directive.</ ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel copyin</ompts:directive>
-<ompts:dependences>omp critical,omp threadprivate</ompts:dependences>
-<ompts:testcode>
-! Changelog:
- INTEGER FUNCTION <ompts:testcode:functionname>omp_copyin</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER known_sum
- <ompts:orphan:vars>
-! INTEGER, SAVE::sum1
-! implicitly by omp_threadprivate, see spec25 Chap. 2.8.2
- INTEGER sum1
- COMMON /csum1/ sum1
- INTEGER sum, i, threads
- COMMON /orphvars/ sum, i, threads
-! C. Niethammer 30.11.06: moved threadprivate statement into the orphaned
-! function
-!$omp threadprivate(/csum1/)
- </ompts:orphan:vars>
-
- sum = 0
- sum1 = 7
- threads = 0
- <ompts:orphan>
-!$omp parallel <ompts:check>copyin(sum1)</ompts:check>
-! print *,"sum1",sum1
-!$omp do
- DO i=1, 999
- sum1 = sum1 + i
- END DO
-!$omp critical
- sum = sum + sum1
- threads = threads + 1
-!$omp end critical
-!$omp end parallel
- </ompts:orphan>
- known_sum = 999*1000/2 + 7*threads
- IF ( known_sum .EQ. sum ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_critical.f b/openmp/testsuite/fortran/omp_critical.f
deleted file mode 100644
index 892dd2b767c..00000000000
--- a/openmp/testsuite/fortran/omp_critical.f
+++ /dev/null
@@ -1,59 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp critical directive by counting up a variable in a parallelized region within a critical section.
-
-</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp critical</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_critical</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER known_sum
- <ompts:orphan:vars>
- INTEGER i,j,myi,myj, sum
- COMMON /orphvars/ sum, myi, myj
- </ompts:orphan:vars>
- sum = 0
- myi = 0
- myj = 500
-!$omp parallel
-!$omp sections
-
-!$omp section
- DO i = 0 , 499
- <ompts:orphan>
- <ompts:check>
-!$omp critical
- </ompts:check>
- sum = sum + myi
- myi = myi + 1
- <ompts:check>
-!$omp end critical
- </ompts:check>
- </ompts:orphan>
- END DO
-
-!$omp section
- DO j = 500 , 999
- <ompts:orphan>
- <ompts:check>
-!$omp critical
- </ompts:check>
- sum = sum + myj
- myj = myj + 1
- <ompts:check>
-!$omp end critical
- </ompts:check>
- </ompts:orphan>
- END DO
-!$omp end sections
-!$omp end parallel
- known_sum = 999*1000/2
- IF ( known_sum .EQ. sum ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- WRITE (1,*) "Found sum was", sum, "instead", known_sum
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_flush.f b/openmp/testsuite/fortran/omp_flush.f
deleted file mode 100644
index 30daf509e62..00000000000
--- a/openmp/testsuite/fortran/omp_flush.f
+++ /dev/null
@@ -1,49 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp flush directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp flush</ompts:directive>
-<ompts:dependences>omp barrier</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_flush</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER result1, dummy, rank
- INTEGER omp_get_thread_num
- <ompts:orphan:vars>
- INTEGER result2
- COMMON /orphvars/ result2
- </ompts:orphan:vars>
- result1=0
- result2=0
-!$omp parallel private(rank)
- rank = omp_get_thread_num()
-!$omp barrier
- IF ( rank .EQ. 1 ) THEN
- result2 = 3
- <ompts:orphan>
- <ompts:check>
-!$omp flush(result2)
- </ompts:check>
- </ompts:orphan>
- dummy = result2
- END IF
- IF ( rank .EQ. 0 ) THEN
- call sleep(1)
- <ompts:orphan>
- <ompts:check>
-!$omp flush(result2)
- </ompts:check>
- </ompts:orphan>
- result1 = result2
- END IF
-!$omp end parallel
-
-! PRINT *,"1:", result1, "2:", result2, "dummy", dummy
- IF ( (result1 .EQ. result2) .AND. (result2 .EQ. dummy) .AND.
- & (result2 .EQ. 3) ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_get_num_threads.f b/openmp/testsuite/fortran/omp_get_num_threads.f
deleted file mode 100644
index 467ad9f82e4..00000000000
--- a/openmp/testsuite/fortran/omp_get_num_threads.f
+++ /dev/null
@@ -1,37 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks that the omp_get_num_threads returns the correct number of threads. Therefor it counts up a variable in a parallelized section and compars this value with the result of the omp_get_num_threads function.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_get_num_threads</ompts:directive>
-<ompts:dependences>omp critical,somp single</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_get_num_threads</ompts:testcode:functionname>()
- INTEGER nthreads
- INTEGER omp_get_num_threads
- <ompts:orphan:vars>
- INTEGER nthreads_lib
- COMMON /orphvars/ nthreads_lib
- </ompts:orphan:vars>
- nthreads=0
- nthreads_lib=-1
-
-!$omp parallel
-!shared(nthreads,nthreads_lib)
-!$omp critical
- nthreads = nthreads + 1
-!$omp end critical
-!$omp single
- <ompts:orphan>
- <ompts:check>
- nthreads_lib=omp_get_num_threads()
- </ompts:check>
- </ompts:orphan>
-!$omp end single
-!$omp end parallel
- IF (nthreads .EQ. nthreads_lib) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_get_wticks.f b/openmp/testsuite/fortran/omp_get_wticks.f
deleted file mode 100644
index 762d03da27a..00000000000
--- a/openmp/testsuite/fortran/omp_get_wticks.f
+++ /dev/null
@@ -1,28 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp_get_wtick function.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_get_wtick</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_get_wticks</ompts:testcode:functionname>()
- IMPLICIT NONE
-<ompts:orphan:vars>
- DOUBLE PRECISION tick
- COMMON /orphvars/ tick
- include "omp_lib.h"
-</ompts:orphan:vars>
-! DOUBLE PRECISION omp_get_wtick
- tick = 1
- <ompts:orphan>
-<ompts:check>
- tick=omp_get_wticK()
-</ompts:check>
- </ompts:orphan>
- WRITE(1,*) "work took",tick,"sec. time."
- IF(tick .GT. 0. .AND. tick .LT. 0.01) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_in_parallel.f b/openmp/testsuite/fortran/omp_in_parallel.f
deleted file mode 100644
index 45edff686be..00000000000
--- a/openmp/testsuite/fortran/omp_in_parallel.f
+++ /dev/null
@@ -1,41 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks that omp_in_parallel returns false when called from a serial region and true when called within a parallel region.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_in_parallel</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_in_parallel</ompts:testcode:functionname>()
-! checks that false is returned when called from serial region
-! and true is returned when called within parallel region
- LOGICAL omp_in_parallel
- <ompts:orphan:vars>
-! LOGICAL omp_in_parallel
- LOGICAL serial, parallel
- COMMON /orphvars/ serial, parallel
- </ompts:orphan:vars>
- serial=.TRUE.
- parallel=.FALSE.
-
- <ompts:orphan>
- <ompts:check>
- serial=omp_in_parallel()
- </ompts:check>
- </ompts:orphan>
-
-!$omp parallel
-!$omp single
- <ompts:orphan>
- <ompts:check>
- parallel=omp_in_parallel();
- </ompts:check>
- </ompts:orphan>
-!$omp end single
-!$omp end parallel
-
- IF ( (.NOT. serial) .AND. (parallel) ) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_lock.f b/openmp/testsuite/fortran/omp_lock.f
deleted file mode 100644
index 29026c522e8..00000000000
--- a/openmp/testsuite/fortran/omp_lock.f
+++ /dev/null
@@ -1,58 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp_set_lock and the omp_unset_lock function by counting the threads entering and exiting a single region with locks.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp_lock</ompts:directive>
-<ompts:dependences>omp flush</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_lock</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER result
- INTEGER nr_threads_in_single
- INTEGER nr_iterations
- INTEGER i
-!lock variable
- <ompts:orphan:vars>
- INCLUDE "omp_lib.h"
- INTEGER (KIND=OMP_LOCK_KIND) :: lock
- COMMON /orphvars/ lock
- </ompts:orphan:vars>
- INCLUDE "omp_testsuite.f"
-
-!result is:
-! 0 -- if the test fails
-! 1 -- if the test succeeds
- CALL omp_init_lock(lock)
- nr_iterations=0
- nr_threads_in_single=0
- result=0
-!$omp parallel shared(lock,nr_threads_in_single,nr_iterations,result)
-!$omp do
- DO i=1,LOOPCOUNT
- <ompts:orphan>
- <ompts:check>
- CALL omp_set_lock(lock)
- </ompts:check>
- </ompts:orphan>
-!$omp flush
- nr_threads_in_single=nr_threads_in_single+1
-!$omp flush
- nr_iterations=nr_iterations+1
- nr_threads_in_single=nr_threads_in_single-1
- result=result+nr_threads_in_single
- <ompts:orphan>
- <ompts:check>
- CALL omp_unset_lock(lock)
- </ompts:check>
- </ompts:orphan>
- END DO
-!$omp end do
-!$omp end parallel
- CALL omp_destroy_lock(lock)
- IF(result.EQ.0 .AND. nr_iterations .EQ. LOOPCOUNT) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- ENDIf
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_master.f b/openmp/testsuite/fortran/omp_master.f
deleted file mode 100644
index 65e1f3d07c4..00000000000
--- a/openmp/testsuite/fortran/omp_master.f
+++ /dev/null
@@ -1,39 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp master directive by counting up a variable in a omp master section.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp master</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_master</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER omp_get_thread_num
- <ompts:orphan:vars>
- INTEGER nthreads, executing_thread
- COMMON /orphvars/ nthreads, executing_thread
- </ompts:orphan:vars>
- nthreads=0
- executing_thread=-1
-
-!$omp parallel
- <ompts:orphan>
- <ompts:check>
-!$omp master
- </ompts:check>
-!$omp critical
- nthreads = nthreads + 1
-!$omp end critical
- executing_thread=omp_get_thread_num()
- <ompts:check>
-!$omp end master
- </ompts:check>
- </ompts:orphan>
-!$omp end parallel
-
- IF ( (nthreads .EQ. 1) .AND. (executing_thread .EQ. 0) ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_master_3.f b/openmp/testsuite/fortran/omp_master_3.f
deleted file mode 100644
index a222c48c1b1..00000000000
--- a/openmp/testsuite/fortran/omp_master_3.f
+++ /dev/null
@@ -1,49 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp master directive by counting up a variable in a omp master section. It also checks that the master thread has the thread number 0 as specified in the OpenMP standard version 3.0.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp master</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_master_3</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER omp_get_thread_num
- <ompts:orphan:vars>
- INTEGER nthreads, executing_thread
- INTEGER tid_result ! counts up the number of wrong thread no.
- ! for the master thread
- COMMON /orphvars/ nthreads, executing_thread, tid_result
- </ompts:orphan:vars>
- tid_result = 0
- nthreads=0
- executing_thread=-1
-
-!$omp parallel
- <ompts:orphan>
- <ompts:check>
-!$omp master
- </ompts:check>
- if (omp_get_thread_num() .ne. 0) then
-!$omp critical
- tid_result = tid_result + 1
-!$omp end critical
- end if
-!$omp critical
- nthreads = nthreads + 1
-!$omp end critical
- executing_thread=omp_get_thread_num()
- <ompts:check>
-!$omp end master
- </ompts:check>
- </ompts:orphan>
-!$omp end parallel
-
- IF ( (nthreads .EQ. 1) .AND. (executing_thread .EQ. 0) .AND.
- & (tid_result .EQ. 0) ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
-
diff --git a/openmp/testsuite/fortran/omp_nest_lock.f b/openmp/testsuite/fortran/omp_nest_lock.f
deleted file mode 100644
index 9b9e3aaf1f3..00000000000
--- a/openmp/testsuite/fortran/omp_nest_lock.f
+++ /dev/null
@@ -1,59 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp_set_nest_lock and the omp_unset_nest_lock function.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_nest_lock</ompts:directive>
-<ompts:dependences>omp flush</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_nest_lock</ompts:testcode:functionname>()
- IMPLICIT NONE
-!result is:
-! 0 -- if the test fails
-! 1 -- if the test succeeds
- INTEGER result
- INTEGER nr_threads_in_single
- INTEGER nr_iterations
- INTEGER i
- <ompts:orphan:vars>
- INCLUDE "omp_lib.h"
- INTEGER (KIND=OMP_NEST_LOCK_KIND) :: lock
- COMMON /orphvars/ lock
- </ompts:orphan:vars>
- INCLUDE "omp_testsuite.f"
-
- nr_iterations=0
- nr_threads_in_single=0
- CALL omp_init_nest_lock(lock)
- result=0
-
-!$omp parallel shared(lock,nr_threads_in_single,nr_iterations,result)
-!$omp do
- DO i=1,LOOPCOUNT
- <ompts:orphan>
- <ompts:check>
- CALL omp_set_nest_lock(lock)
- </ompts:check>
- </ompts:orphan>
-!$omp flush
- nr_threads_in_single=nr_threads_in_single+1
-!$omp flush
- nr_iterations=nr_iterations+1
- nr_threads_in_single=nr_threads_in_single-1
- result=result+nr_threads_in_single
- <ompts:orphan>
- <ompts:check>
- CALL omp_unset_nest_lock(lock)
- </ompts:check>
- </ompts:orphan>
- END DO
-!$omp end do
-!$omp end parallel
- CALL omp_destroy_nest_lock(lock)
-! PRINT *, result, nr_iterations
- IF(result.EQ.0 .AND. nr_iterations .EQ. LOOPCOUNT) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_nested.f b/openmp/testsuite/fortran/omp_nested.f
deleted file mode 100644
index 5435151f074..00000000000
--- a/openmp/testsuite/fortran/omp_nested.f
+++ /dev/null
@@ -1,53 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test if the compiler support nested parallelism.</ompts:testdescription>
-<ompts:version>2.5</ompts:version>
-<ompts:directive>nestedtest</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_nested</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
-<ompts:orphan:vars>
- INTEGER counter
- COMMON /orphvars/ counter
-</ompts:orphan:vars>
-
- counter =0
-
- <ompts:check>
-!$ CALL OMP_SET_NESTED(.TRUE.)
-!#ifdef _OPENMP
-! CALL OMP_SET_NESTED(.TRUE.)
-!#endif
- </ompts:check>
- <ompts:crosscheck>
-!$ CALL OMP_SET_NESTED(.FALSE.)
-!#ifdef _OPENMP
-! CALL OMP_SET_NESTED(.FALSE.)
-!#endif
- </ompts:crosscheck>
-
-!$omp parallel
- <ompts:orphan>
-!$omp critical
- counter = counter + 1
-!$omp end critical
-
-!$omp parallel
-!$omp critical
- counter = counter - 1
-!$omp end critical
-!$omp end parallel
- </ompts:orphan>
-!$omp end parallel
-
- IF (counter .EQ. 0 ) THEN
- WRITE (1,*) "Counter was 0"
- <testfunctionname></testfunctionname> = 0
- ELSE
- WRITE (1,*) "Counter was", counter
- <testfunctionname></testfunctionname> = 1
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_num_threads.f b/openmp/testsuite/fortran/omp_num_threads.f
deleted file mode 100644
index a1ede73a6f3..00000000000
--- a/openmp/testsuite/fortran/omp_num_threads.f
+++ /dev/null
@@ -1,60 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks that the omp_get_num_threads returns the correct number of threads. Therefor it counts up a variable in a parallelized section and compars this value with the result of the omp_get_num_threads function.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_get_num_threads</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_num_threads</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER i, max_threads
- INTEGER omp_get_num_threads
-<ompts:orphan:vars>
- INTEGER failed,threads,nthreads,tmp
- COMMON /orphvars/ failed,threads,nthreads
-</ompts:orphan:vars>
-
- failed = 0
- max_threads = 0
-
-!$omp parallel
-!$omp master
- max_threads = OMP_GET_NUM_THREADS()
-!$omp end master
-!$omp end parallel
-! print *, "max threads:",max_threads
-
-!Yi Wen added omp_Set_dynamics here to make sure num_threads clause work
-!Thanks to Dr. Yin Ma in Absoft. should be not be called before the test loop
-!because it allows the dynamic adjustment of the number of threads at runtime
-!instead of using the max_threads set.
-
- !CALL OMP_SET_DYNAMIC(.TRUE.)
- DO threads = 1, max_threads
- nthreads = 0
- <ompts:orphan>
-!$omp parallel num_threads(threads) reduction(+:failed)
-! print *, threads, omp_get_num_threads()
- tmp = omp_get_num_threads()
- IF ( threads .NE. tmp ) THEN
- failed = failed + 1
- WRITE (1,*) "Error: found ", tmp, " instead of ",
- & threads, " threads"
- END IF
-!$omp atomic
- nthreads = nthreads + 1
-!$omp end parallel
- </ompts:orphan>
-! print *, threads, nthreads
- <ompts:check>IF ( nthreads .NE. threads ) THEN</ompts:check>
- <ompts:crosscheck>IF ( nthreads .EQ. threads ) THEN</ompts:crosscheck>
- failed = failed + 1
- END IF
- END DO
-
- IF(failed .NE. 0) THEN
- <testfunctionname></testfunctionname> = 0
- ELSE
- <testfunctionname></testfunctionname> = 1
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_single.f b/openmp/testsuite/fortran/omp_single.f
deleted file mode 100644
index e8821cac730..00000000000
--- a/openmp/testsuite/fortran/omp_single.f
+++ /dev/null
@@ -1,40 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp single directive by controlling how often a directive is called in an omp single region.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp single</ompts:directive>
-<ompts:dependences>omp parallel private,omp flush</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_single</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER i
- <ompts:orphan:vars>
- INTEGER nr_threads_in_single,nr_iterations,result
- COMMON /orphvars/ nr_threads_in_single,nr_iterations,result
- </ompts:orphan:vars>
- INCLUDE "omp_testsuite.f"
- nr_threads_in_single=0
- result=0
- nr_iterations=0
-!$omp parallel
- DO i=0, LOOPCOUNT-1
- <ompts:orphan>
-!$omp single
-!$omp flush
- nr_threads_in_single = nr_threads_in_single + 1
-!$omp flush
- nr_iterations = nr_iterations + 1
- <ompts:check>nr_threads_in_single = nr_threads_in_single - 1</ompts:check>
- <ompts:crosscheck>nr_threads_in_single = nr_threads_in_single + 1</ompts:crosscheck>
- result = result + nr_threads_in_single
-!$omp end single
- </ompts:orphan>
- END DO
-!$omp end parallel
- IF ( result .EQ. 0 .AND. nr_iterations .EQ. LOOPCOUNT ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_task.f b/openmp/testsuite/fortran/omp_task.f
deleted file mode 100644
index 273d7b07ec4..00000000000
--- a/openmp/testsuite/fortran/omp_task.f
+++ /dev/null
@@ -1,50 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp task directive. The idea of the tests is to generate a set of tasks in a single region. We let pause the tasks generated so that other threads get sheduled to the newly opened tasks.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp task</ompts:directive>
-<ompts:dependences>omp single</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_task</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- <ompts:orphan:vars>
- INTEGER omp_get_num_threads, omp_get_thread_num
- EXTERNAL my_sleep
- INTEGER myj
- INTEGER i,j
- INTEGER tids(NUM_TASKS)
- COMMON /orphvars/ j,tids
- </ompts:orphan:vars>
-!$omp parallel private(myj) shared(j)
-!$omp single
- do i=1, NUM_TASKS
- j = i
- <ompts:orphan>
- myj = j
- <ompts:check>
-!$omp task
- </ompts:check>
- call my_sleep(SLEEPTIME)
- tids(myj) = omp_get_thread_num()
- <ompts:check>
-!$omp end task
- </ompts:check>
- </ompts:orphan>
- end do
-!$omp end single
-!$omp end parallel
-
- <testfunctionname></testfunctionname> = 0
-
- ! check if more than one thread executed the tasks.
- do i=1, NUM_TASKS
- if (tids(1) .ne. tids(i)) then
- <testfunctionname></testfunctionname> = 1
- end if
- end do
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_task_firstprivate.f b/openmp/testsuite/fortran/omp_task_firstprivate.f
deleted file mode 100644
index ca7759e5c48..00000000000
--- a/openmp/testsuite/fortran/omp_task_firstprivate.f
+++ /dev/null
@@ -1,54 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the firstprivate clause of the task directive. We create a set of tasks in a single region. We defines a variable named sum unequal zero which gets declared firstprivate for each task. Now each task calcualtes a sum using this private variable. Before each calcualation step we introduce a flush command so that maybe the private variabel gets bad. At the end we check if the calculated sum was right.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp task firstprivate</ompts:directive>
-<ompts:dependences>omp single,omp critical</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_task_firstprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- INTEGER j,i
- <ompts:orphan:vars>
- external my_sleep
- INTEGER my_sum
- INTEGER known_sum
- INTEGER rslt
- COMMON /orphvars/ my_sum, known_sum, rslt
- </ompts:orphan:vars>
-
- my_sum = 1234
- known_sum = 1234 + (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
-
-!$omp parallel private(j)
-!$omp single
- do i=1, NUM_TASKS
- <ompts:orphan>
-!$omp task <ompts:check>firstprivate(my_sum)</ompts:check>
- do j = 0, LOOPCOUNT
-!$omp flush
- my_sum = my_sum + j
- end do
-
- ! check if calculated my_sum was right
- if (my_sum .ne. known_sum) then
-!$omp critical
- rslt = rslt + 1
-!$omp end critical
- end if
-!$omp end task
- </ompts:orphan>
- end do
-!$omp end single
-!$omp end parallel
-
- if (rslt .eq. 0) then
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_task_if.f b/openmp/testsuite/fortran/omp_task_if.f
deleted file mode 100644
index 149f4572187..00000000000
--- a/openmp/testsuite/fortran/omp_task_if.f
+++ /dev/null
@@ -1,45 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the if clause of the omp task directive. The idear of the tests is to generate a tasks in a single region and pause it immediately. The parent thread now shall set a counter variable which the paused task shall evaluate when woke up.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp task if</ompts:directive>
-<ompts:dependences>omp single,omp flush</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_task_if</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- <ompts:orphan:vars>
- external my_sleep
- INTEGER dummy
- LOGICAL condition_false
- INTEGER cnt
- INTEGER rslt
- COMMON /orphvars/ condition_false, cnt, rslt
- </ompts:orphan:vars>
-
- cnt = 0
- condition_false = (dummy .eq. 314159)
-
-!$omp parallel
-!$omp single
- <ompts:orphan>
-!$omp task <ompts:check>if (condition_false)</ompts:check> shared(cnt,rslt)
- call my_sleep(SLEEPTIME_LONG)
-!$omp flush
- if (cnt .eq. 0) then
- rslt = 1
- else
- rslt = 0
- end if
-!$omp end task
- </ompts:orphan>
- cnt = 1
-!$omp end single
-!$omp end parallel
-
- <testfunctionname></testfunctionname> = rslt
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_task_private.f b/openmp/testsuite/fortran/omp_task_private.f
deleted file mode 100644
index 5e44bc5b261..00000000000
--- a/openmp/testsuite/fortran/omp_task_private.f
+++ /dev/null
@@ -1,55 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the private clause of the task directive. We create a set of tasks in a single region. We defines a variable named sum which gets declared private for each task. Now each task calcualtes a sum using this private variable. Before each calcualation step we introduce a flush command so that maybe the private variabel gets bad. At the end we check if the calculated sum was right.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp task private</ompts:directive>
-<ompts:dependences>omp single,omp critical</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_task_firstprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- INTEGER j,i
- <ompts:orphan:vars>
- external my_sleep
- INTEGER my_sum
- INTEGER known_sum
- INTEGER rslt
- COMMON /orphvars/ my_sum, known_sum, rslt
- </ompts:orphan:vars>
-
- my_sum = 0
- rslt = 0
- known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
-
-!$omp parallel private(j)
-!$omp single
- do i=1, NUM_TASKS
- <ompts:orphan>
-!$omp task <ompts:check>private(my_sum)</ompts:check> shared(rslt, known_sum)
- <ompts:check>my_sum = 0</ompts:check>
- do j = 0, LOOPCOUNT
- my_sum = my_sum + j
- end do
-
- ! check if calculated my_sum was right
- if (my_sum .ne. known_sum) then
-!$omp critical
- rslt = rslt + 1
-!$omp end critical
- end if
-!$omp end task
- </ompts:orphan>
- end do
-!$omp end single
-!$omp end parallel
-
- if (rslt .eq. 0) then
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_task_shared.f b/openmp/testsuite/fortran/omp_task_shared.f
deleted file mode 100644
index 58564b31935..00000000000
--- a/openmp/testsuite/fortran/omp_task_shared.f
+++ /dev/null
@@ -1,47 +0,0 @@
-<ompts:test>
-<ompts:testdescription> Test to see if implied shared works correctly</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp task</ompts:directive>
-<ompts:dependences>omp single, omp task firstprivate</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_task_shared</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- <ompts:orphan:vars>
- external my_sleep
- INTEGER i
- COMMON /orphvars/ i
- </ompts:orphan:vars>
- INTEGER rslt
- INTEGER k
-
- i = 0
- k = 0
- rslt = 0
-
-!$omp parallel private(k) shared(i)
-!$omp single
- do k=1, NUM_TASKS
- <ompts:orphan>
-!$omp task <ompts:crosscheck>firstprivate(i)</ompts:crosscheck>
-!$omp+ <ompts:check>shared(i)</ompts:check>
-!$omp atomic
- i = i + 1
-!$omp end task
- </ompts:orphan>
- end do
-!$omp end single
-!$omp end parallel
-
- rslt = i
- if (rslt .eq. NUM_TASKS) then
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_task_untied.f b/openmp/testsuite/fortran/omp_task_untied.f
deleted file mode 100644
index e58e9350941..00000000000
--- a/openmp/testsuite/fortran/omp_task_untied.f
+++ /dev/null
@@ -1,63 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test for untied clause. First generate a set of tasks and pause it immediately. Then we resume half of them and check whether they are scheduled by different threads</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp task untied</ompts:directive>
-<ompts:dependences>omp taskwait</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_task_untied</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- <ompts:orphan:vars>
- EXTERNAL my_sleep
- INTEGER omp_get_num_threads, omp_get_thread_num
- INTEGER myj
- INTEGER i,j
- INTEGER cnt
- INTEGER start_tid(NUM_TASKS)
- INTEGER current_tid(NUM_TASKS)
- COMMON /orphvars/ j, cnt, start_tid, current_tid
- </ompts:orphan:vars>
-
- cnt = 0
- do i = 1, NUM_TASKS
- start_tid(i) = 0
- current_tid(i) = 0
- end do
-
-!$omp parallel private(myj) shared(j)
-!$omp single
- do i=1, NUM_TASKS
- j = i
- <ompts:orphan>
- myj = j
-!$omp task <ompts:check>untied</ompts:check>
- call my_sleep(SLEEPTIME)
- start_tid(myj) = omp_get_thread_num()
-!$omp taskwait
- <ompts:check>if (MOD(start_tid(myj),2) .ne. 0) then</ompts:check>
- call my_sleep(SLEEPTIME)
- current_tid(myj) = omp_get_thread_num()
- <ompts:check>
- else
- current_tid(myj) = omp_get_thread_num()
- end if</ompts:check>
-!$omp end task
- </ompts:orphan>
- end do
-!$omp end single
-!$omp end parallel
-
- <testfunctionname></testfunctionname> = 0
-
- ! check if at least one untied task switched threads
- do i=1, NUM_TASKS
- if (current_tid(i) .ne. start_tid(i)) then
- <testfunctionname></testfunctionname> = 1
- end if
- end do
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_taskwait.f b/openmp/testsuite/fortran/omp_taskwait.f
deleted file mode 100644
index 2aa94c402b5..00000000000
--- a/openmp/testsuite/fortran/omp_taskwait.f
+++ /dev/null
@@ -1,83 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp taskwait directive. First we generate a set of tasks, which set the elements of an array to a specific value. Then we do a taskwait and check if all tasks finished meaning all array elements contain the right value. Then we generate a second set setting the array elements to another value. After the parallel region we check if all tasks of the second set finished and were executed after the tasks of the first set.</ompts:testdescription>
-<ompts:ompversion>3.0</ompts:ompversion>
-<ompts:directive>omp taskwait</ompts:directive>
-<ompts:dependences>omp single,omp task</ompts:dependences>
-<ompts:testcode>
- INCLUDE "omp_my_sleep.f"
-
- INTEGER FUNCTION <ompts:testcode:functionname>omp_taskwait</ompts:testcode:functionname>()
- IMPLICIT NONE
- INCLUDE "omp_testsuite.f"
- INTEGER result1, result2
- INTEGER array(NUM_TASKS)
- INTEGER i, myi
- <ompts:orphan:vars>
- external my_sleep
- </ompts:orphan:vars>
-
- result1 = 0
- result2 = 0
-
- ! fill array
- do i = 1, NUM_TASKS
- array(i) = 0
- end do
-
-!$omp parallel shared(i) private(myi)
-!$omp single
- do i=1, NUM_TASKS
- ! First we have to store the value of the loop index in a new variable
- ! which will be private for each task because otherwise it will be
- ! overwritten if the execution of the task takes longer than the time
- ! which is needed to enter the next step of the loop!
-
- myi = i
-
-!$omp task
- call my_sleep(SLEEPTIME)
- array(myi) = 1
-!$omp end task
- end do
-
- <ompts:orphan>
- <ompts:check>
-!$omp taskwait
- </ompts:check>
- </ompts:orphan>
-
- ! check if all tasks were finished
- do i=1, NUM_TASKS
- if (array(i) .ne. 1) then
- result1 = result1 + 1
- end if
- end do
-
- ! generate some more tasks which now shall overwrite the valuesin the
- ! array
- do i=1, NUM_TASKS
- myi = i
-!$omp task
- array(myi) = 2
-!$omp end task
- end do
-
-!$omp end single
-!$omp end parallel
-
- ! final check, if all array elements contain the right values
- do i=1, NUM_TASKS
- if (array(i) .ne. 2) then
- result2 = result2 + 1
- end if
- end do
-
- if ( (result1 .eq. 0) .and. (result2 .eq. 0) ) then
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_test_nest_lock.f b/openmp/testsuite/fortran/omp_test_nest_lock.f
deleted file mode 100644
index 8396d248575..00000000000
--- a/openmp/testsuite/fortran/omp_test_nest_lock.f
+++ /dev/null
@@ -1,61 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp_test_nest_lock function.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_test_nest_lock</ompts:directive>
-<ompts:dependences>omp flush</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_test_nest_lock</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER result
-!result is:
-! 0 -- if the test fails
-! 1 -- if the test succeeds
- INTEGER nr_threads_in_single
- INTEGER nr_iterations
- INTEGER i
- <ompts:orphan:vars>
- include "omp_lib.h"
- INTEGER (KIND=OMP_NEST_LOCK_KIND) :: lock
- COMMON /orphvars/ lock
- </ompts:orphan:vars>
-! INTEGER lck
- INCLUDE "omp_testsuite.f"
-
- nr_iterations=0
- nr_threads_in_single=0
- CALL OMP_INIT_NEST_LOCK(lock)
- result=0
-
-!$omp parallel shared(lock,nr_threads_in_single,nr_iterations,result)
-!$omp do
- DO i=1,LOOPCOUNT
- <ompts:orphan>
- <ompts:check>
- DO WHILE(OMP_TEST_NEST_LOCK(lock) .EQ. 0)
- END DO
- </ompts:check>
- </ompts:orphan>
-!$omp flush
- nr_threads_in_single=nr_threads_in_single+1
-!$omp flush
- nr_iterations=nr_iterations+1
- nr_threads_in_single=nr_threads_in_single-1
- result=result+nr_threads_in_single
- <ompts:orphan>
- <ompts:check>
- CALL OMP_UNSET_NEST_LOCK(lock)
- </ompts:check>
- </ompts:orphan>
- END DO
-!$omp end do
-!$omp end parallel
- CALL omp_destroy_nest_lock(lock)
-! print *, result, nr_iterations
- IF(result.EQ.0 .AND. nr_iterations .EQ. LOOPCOUNT) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- ENDIF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_testlock.f b/openmp/testsuite/fortran/omp_testlock.f
deleted file mode 100644
index 3b1304dbee9..00000000000
--- a/openmp/testsuite/fortran/omp_testlock.f
+++ /dev/null
@@ -1,57 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp_testlock function. The test counts the threads entering and exiting a single region which is build with a test_lock in an endless loop.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_test_lock</ompts:directive>
-<ompts:dependences>omp flush</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_testlock</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER result
- INTEGER nr_threads_in_single
- INTEGER nr_iterations
- INTEGER i
- <ompts:orphan:vars>
- include "omp_lib.h"
- INTEGER (KIND=OMP_LOCK_KIND)::lock
- COMMON /orphvars/ lock
- </ompts:orphan:vars>
- INCLUDE "omp_testsuite.f"
-
- nr_iterations=0
- nr_threads_in_single=0
- CALL OMP_INIT_LOCK(lock)
- result=0
-
-!$omp parallel shared(lock,nr_threads_in_single,nr_iterations,result)
-!$omp do
- DO i=1,LOOPCOUNT
- <ompts:orphan>
- <ompts:check>
- DO WHILE (.NOT. OMP_TEST_LOCK(lock))
- END DO
- </ompts:check>
- </ompts:orphan>
-!$omp flush
- nr_threads_in_single=nr_threads_in_single+1
-!$omp flush
- nr_iterations=nr_iterations+1
- nr_threads_in_single=nr_threads_in_single-1
- result=result+nr_threads_in_single
- <ompts:orphan>
- <ompts:check>
- CALL OMP_UNSET_LOCK(lock)
- </ompts:check>
- </ompts:orphan>
- END DO
-!$omp end do
-!$omp end parallel
- CALL OMP_DESTROY_LOCK(lock)
-! print *, result, nr_iterations
- IF(result.EQ.0 .AND. nr_iterations .EQ. LOOPCOUNT) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- ENDIF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_testsuite.f b/openmp/testsuite/fortran/omp_testsuite.f
deleted file mode 100644
index 42d4821d9bd..00000000000
--- a/openmp/testsuite/fortran/omp_testsuite.f
+++ /dev/null
@@ -1,2 +0,0 @@
- integer LOOPCOUNT
- parameter (LOOPCOUNT=1000)
diff --git a/openmp/testsuite/fortran/omp_threadprivate.f b/openmp/testsuite/fortran/omp_threadprivate.f
deleted file mode 100644
index c920498fa47..00000000000
--- a/openmp/testsuite/fortran/omp_threadprivate.f
+++ /dev/null
@@ -1,89 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp threadprivate directive by filling an array with random numbers in an parallelised region. Each thread generates one number of the array and saves this in a temporary threadprivate variable. In a second parallelised region the test controls, that the temporary variable contains still the former value by comparing it with the one in the array.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp threadprivate</ompts:directive>
-<ompts:dependences>omp critical,omp_set_dynamic,omp_get_num_threads,omp master</ompts:dependences>
-<ompts:testcode>
-!Yi Wen modified this function from his own understanding of the semantics
-!of C version at 05042004
-!The undeestanding is that sum0 and myvalue can be local static variables
-!of the chk_omp_threadprivate function. There is no need to use common
-!block
- INTEGER FUNCTION <ompts:testcode:functionname>omp_threadprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, known_sum, i , iter, rank,size, failed
- INTEGER omp_get_num_threads, omp_get_thread_num
- REAL my_random
- REAL, ALLOCATABLE:: data(:)
- INTEGER random_size
- INTRINSIC random_number
- INTRINSIC random_seed
- EXTERNAL omp_set_dynamic
-
-!Yi Wen modified at 05042004 : add "save"
- INTEGER, SAVE:: sum0
- REAL, SAVE::myvalue
-!Yi Wen commented two common blocks
-! common/csum0/ sum0
-! common/cmyvalue/ myvalue
-!!!!!!!!!!$omp threadprivate(/csum0/,/cmyvalue/)
- <ompts:check>
-!$omp threadprivate(sum0,myvalue)
- </ompts:check>
- INCLUDE "omp_testsuite.f"
-
- sum = 0
- failed = 0
- sum0=0
- myvalue=0
- random_size=45
- CALL omp_set_dynamic(.FALSE.)
-!$omp parallel
- sum0 = 0
-!$omp do
- DO i=1, LOOPCOUNT
- sum0 = sum0 + i
- END DO
-!$omp end do
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end parallel
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
- IF ( known_sum .NE. sum ) THEN
- PRINT *, ' known_sum =', known_sum, ', sum =',sum
- END IF
-
- CALL omp_set_dynamic(.FALSE.)
-
-!$omp parallel
-!$omp master
- size = omp_get_num_threads()
- ALLOCATE ( data(size) )
-!$omp end master
-!$omp end parallel
- CALL RANDOM_SEED(SIZE=random_size)
- DO iter = 0, 99
- CALL RANDOM_NUMBER(HARVEST=my_random)
-!$omp parallel private(rank)
- rank = omp_get_thread_num()+1
- myvalue = my_random + rank
- data(rank) = myvalue
-!$omp end parallel
-!$omp parallel private(rank)
- rank = omp_get_thread_num()+1
- IF ( myvalue .NE. data(rank) ) THEN
- failed = failed + 1
- PRINT *, ' myvalue =',myvalue,' data(rank)=', data(rank)
- END IF
-!$omp end parallel
- END DO
- DEALLOCATE( data)
- IF ( (known_sum .EQ. sum) .AND. (failed .NE. 1) ) THEN
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_workshare.f b/openmp/testsuite/fortran/omp_workshare.f
deleted file mode 100644
index a8faa27f855..00000000000
--- a/openmp/testsuite/fortran/omp_workshare.f
+++ /dev/null
@@ -1,142 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks if WORKSHARE is present.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp workshare</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
-!********************************************************************
-! Function: omp_workshare
-!
-! by Chunhua Liao, University of Houston
-! Oct. 2005 - First version
-!
-! The idea for the test is that if WORKSHARE is not present,
-! the array assignment in PARALLEL region will be executed by each
-! thread and then wrongfully repeated several times.
-!
-! TODO:Do we need test for WHERE and FORALL?
-! A simple test for WHERE and FORALL is added by Zhenying Liu
-!********************************************************************
- INTEGER FUNCTION <ompts:testcode:functionname>omp_workshare</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER result,i
- INTEGER scalar02,scalar12,scalar22,scalar32,count
- REAL, DIMENSION(1000)::FF
-<ompts:orphan:vars>
- INTEGER scalar0,scalar1,scalar2,scalar3
- INTEGER, DIMENSION(1000)::AA,BB,CC
- REAL, DIMENSION(1000)::DD
- COMMON /orphvars/ scalar0,scalar1,scalar2,scalar3,
- & AA,BB,CC,DD
-</ompts:orphan:vars>
-
- result=0
- scalar0=0
- scalar02=0
- scalar1=0
- scalar12=0
- scalar2=0
- scalar22=0
- scalar3=0
- scalar32=0
-
- count = 0
-
- AA=0
- BB=0
-
- do i=1,1000
- CC(i) = i
- FF(i) = 1.0/i
- end do
-
-!$OMP PARALLEL
-<ompts:orphan>
-<ompts:check>!$OMP WORKSHARE</ompts:check>
-
-! test if work is divided or not for array assignment
- AA=AA+1
-
-! test if scalar assignment is treated as a single unit of work
- scalar0=scalar0+1
-
-! test if atomic is treated as a single unit of work
-!$OMP ATOMIC
- scalar1=scalar1+1
-! test if critical is treated as a single unit of work
-!$OMP CRITICAL
- scalar2=scalar2+1
-!$OMP END CRITICAL
-
-! test if PARALLEL is treated as a single unit of work
-!$OMP PARALLEL
- scalar3=scalar3+1
-!$OMP END PARALLEL
-
- WHERE ( CC .ne. 0 ) DD = 1.0/CC
-
- FORALL (I=1:1000) CC(i) = -i
-
-<ompts:check>!$OMP END WORKSHARE</ompts:check>
-</ompts:orphan>
-!$OMP END PARALLEL
-
-!sequential equivalent statements for comparison
- BB=BB+1
- scalar02=scalar02+1
- scalar12=scalar12+1
- scalar22=scalar22+1
- scalar32=scalar32+1
-
-! write (1,*) "ck:sum of AA is",SUM(AA)," sum of BB is ",sum(BB)
- if (SUM(AA)/=SUM(BB)) then
- write(1,*) "Array assignment has some problem"
- result=result +1
- endif
- if (scalar0/=scalar02) then
- write(1,*) "Scalar assignment has some problem"
- result = result +1
- endif
- if (scalar1/=scalar12) then
- write(1,*) "Atomic inside WORKSHARE has some problem"
- result = result +1
- endif
- if (scalar2/=scalar22) then
- write(1,*) "CRITICAL inside WORKSHARE has some problem"
- result = result +1
- endif
- if (scalar3/=scalar32) then
- write(1,*) "PARALLEL inside WORKSHARE has some problem"
- result = result +1
- endif
- do i=1,1000
- if ( abs( DD(i)- FF(i)) .gt. 1.0E-4 ) then
- count = count + 1
- end if
- end do
- if ( count .ne. 0 ) then
- result = result + 1
- write(1,*) "WHERE has some problem"
- end if
-
- count = 0
- do i=1,1000
- if ( CC(i) .ne. -i ) then
- count = count + 1
- end if
- end do
- if ( count .ne. 0 ) then
- result = result + 1
- write(1,*) "FORALL has some problem"
- end if
-
-
-!if anything is wrong, set return value to 0
- if (result==0) then
- <testfunctionname></testfunctionname> = 1
- else
- <testfunctionname></testfunctionname> = 0
- end if
- end
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_workshare_default.f b/openmp/testsuite/fortran/omp_workshare_default.f
deleted file mode 100644
index f774c43bb41..00000000000
--- a/openmp/testsuite/fortran/omp_workshare_default.f
+++ /dev/null
@@ -1,36 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp master directive by counting up a variable in a omp master section.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp workshare default</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_workshare_default</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum
- INTEGER known_sum
- INTEGER mysum
- INTEGER i
-
- known_sum = 999*1000/2
-
-!$omp parallel default(private) shared(sum)
-!$omp do
- DO i = 1, 999
- mysum = mysum + i
- END DO
-!$omp end do
-
-!$omp critical
- sum = sum + mysum
-!$omp end critical
-
-!$omp end parallel
-
- IF ( (known_sum .EQ. sum) ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/omp_wtime.f b/openmp/testsuite/fortran/omp_wtime.f
deleted file mode 100644
index 557334fea86..00000000000
--- a/openmp/testsuite/fortran/omp_wtime.f
+++ /dev/null
@@ -1,43 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp_get_wtime function. It compares the time with which is called a sleep function with the time it took by messuring the difference between the call of the sleep function and its end.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp_get_wtime</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>omp_wtime</ompts:testcode:functionname>()
- IMPLICIT NONE
- <ompts:orphan:vars>
- DOUBLE PRECISION start
- DOUBLE PRECISION endtime
- COMMON start, endtime
- include "omp_lib.h"
- </ompts:orphan:vars>
- INTEGER wait_time
- DOUBLE PRECISION measured_time
- INTEGER fileunit
- wait_time=1
-
- start = 0;
- endtime = 0;
-
- <ompts:orphan>
- <ompts:check>
- start=omp_get_wtime()
- </ompts:check>
- </ompts:orphan>
- CALL sleep(wait_time)
- <ompts:orphan>
- <ompts:check>
- endtime=omp_get_wtime()
- </ompts:check>
- </ompts:orphan>
- measured_time=endtime-start
- WRITE(1,*) "work took",measured_time,"sec. time."
- IF(measured_time.GT.0.99*wait_time .AND.
- & measured_time .LT. 1.01*wait_time) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_do_firstprivate.f b/openmp/testsuite/fortran/par_do_firstprivate.f
deleted file mode 100644
index 79ae527a3e7..00000000000
--- a/openmp/testsuite/fortran/par_do_firstprivate.f
+++ /dev/null
@@ -1,26 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel do firstprivate directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel for firstprivate</ompts:directive>
-<ompts:dependences>par do reduction,par do private</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_do_firstprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum,known_sum, i2, i
- INCLUDE "omp_testsuite.f"
- sum =0
- i2 = 3
-!$omp parallel do <ompts:check>firstprivate(i2)</ompts:check><ompts:crosscheck>private(i2)</ompts:crosscheck> reduction(+:sum)
- DO i=1, LOOPCOUNT
- sum = sum + ( i+ i2)
- END DO
-!$omp end parallel do
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2+3*LOOPCOUNT
- IF ( known_sum .EQ. sum ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_do_if.f b/openmp/testsuite/fortran/par_do_if.f
deleted file mode 100644
index 0b7fc9af705..00000000000
--- a/openmp/testsuite/fortran/par_do_if.f
+++ /dev/null
@@ -1,32 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel for if directive. Needs at least two threads.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel do if</ompts:directive>
-<ompts:dependences></ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_do_if</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER omp_get_num_threads
- INTEGER sum,known_sum, i, num_threads
- INTEGER control
- INCLUDE "omp_testsuite.f"
- sum = 0
-
- control = 0
-!$omp parallel do <ompts:check>if (control == 1)</ompts:check>
- DO i=1, LOOPCOUNT
- sum = sum + i
- num_threads = omp_get_num_threads ()
- END DO
-!$omp end parallel do
- WRITE (1,*) "Number of threads determined by:"\
- "omg_get_num_threasd:", num_threads
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
- IF ( known_sum .EQ. sum .AND. num_threads .EQ. 1) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_do_lastprivate.f b/openmp/testsuite/fortran/par_do_lastprivate.f
deleted file mode 100644
index 180210c36d2..00000000000
--- a/openmp/testsuite/fortran/par_do_lastprivate.f
+++ /dev/null
@@ -1,28 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel do lastprivate directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel do lastprivate</ompts:directive>
-<ompts:dependences>par do reduction, par do private</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_do_lastprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, known_sum, i , i0
- INCLUDE "omp_testsuite.f"
- sum = 0
- i0 = -1
-
-!$omp parallel do reduction(+:sum) schedule(static,7) <ompts:check>lastprivate(i0)</ompts:check><ompts:crosscheck>private(i0)</ompts:crosscheck>
- DO i=1, LOOPCOUNT
- sum = sum + i
- i0 = i
- END DO
-!$omp end parallel do
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
- IF ( (known_sum .EQ. sum) .AND. (i0 .EQ. LOOPCOUNT) ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_do_ordered.f b/openmp/testsuite/fortran/par_do_ordered.f
deleted file mode 100644
index 33d4cd0c559..00000000000
--- a/openmp/testsuite/fortran/par_do_ordered.f
+++ /dev/null
@@ -1,67 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel do ordered directive</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel do ordered</ompts:directive>
-<ompts:dependences>par schedule stat</ompts:dependences>
-<ompts:testcode>
-! **********************************************************
-! Helper function is_larger
-! **********************************************************
- INTEGER FUNCTION i_islarger2(i)
- IMPLICIT NONE
- INTEGER i
- INTEGER last_i,islarger
- COMMON /com/ last_i
- INCLUDE "omp_testsuite.f"
-! print *, "last_i",last_i, "i", i
-! last_i is a global variable
- IF ( i .GT. last_i ) THEN
- islarger = 1
- ELSE
- islarger = 0
- END IF
- last_i = i
- i_islarger2 = islarger
- END FUNCTION
-
- INTEGER FUNCTION <ompts:testcode:functionname>par_do_ordered</ompts:testcode:functionname>()
- IMPLICIT NONE
- COMMON /com/ last_i
- INTEGER known_sum,i, last_i
-<ompts:orphan:vars>
- INTEGER is_larger,sum,i_islarger2
- COMMON /orphvars/ is_larger,sum,i
-</ompts:orphan:vars>
-
- sum=0
- is_larger=1
- last_i=0
-!$omp parallel do schedule(static, 1) ordered
- DO i=1, 99
- <ompts:orphan>
- <ompts:check>
-!$omp ordered
- </ompts:check>
- IF( i_islarger2(i) .EQ. 1 .AND. is_larger .EQ. 1 ) THEN
- is_larger = 1
- ELSE
- is_larger = 0
- END IF
- sum = sum + i
- <ompts:check>
-!$omp end ordered
- </ompts:check>
- </ompts:orphan>
- END DO
-!$omp end parallel do
- known_sum = (99*100)/2
-!Yi Wen; Sun compiler will fail sometimes
-! print *, "sum", sum, "ks", known_sum, "la", is_larger
- IF ( known_sum .EQ. sum .AND. is_larger .EQ. 1 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_do_private.f b/openmp/testsuite/fortran/par_do_private.f
deleted file mode 100644
index dd39ab98438..00000000000
--- a/openmp/testsuite/fortran/par_do_private.f
+++ /dev/null
@@ -1,46 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel do private directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel do private</ompts:directive>
-<ompts:dependences>par do reduction,omp flush</ompts:dependences>
-<ompts:testcode>
- SUBROUTINE do_some_work2()
- IMPLICIT NONE
- REAL i
- DOUBLE PRECISION sum
- INTRINSIC sqrt
- INCLUDE "omp_testsuite.f"
- sum = 0.0
- i = 0
- DO WHILE (i < LOOPCOUNT)
- sum = sum + sqrt(i)
- i = i + 1
- END DO
- END
-
-!********************************************************************
-
- INTEGER FUNCTION <ompts:testcode:functionname>par_do_private</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum,known_sum, i, i2, i3
- INCLUDE "omp_testsuite.f"
- sum = 0
-
-!$omp parallel do reduction(+:sum) <ompts:check>private(i2)</ompts:check> schedule(static,1)
- DO i=1, LOOPCOUNT
- i2 = i
-!$omp flush
- CALL do_some_work2()
-!$omp flush
- sum = sum + i2
- END DO
-!$omp end parallel do
- known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2
- IF ( known_sum .EQ. sum ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_do_reduction.f b/openmp/testsuite/fortran/par_do_reduction.f
deleted file mode 100644
index 9a3f455b776..00000000000
--- a/openmp/testsuite/fortran/par_do_reduction.f
+++ /dev/null
@@ -1,415 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel do reduction directive with all its options.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel do reduction</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_do_reduction</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, sum2, known_sum, i, i2,diff
- INTEGER product,known_product,int_const
- INTEGER MAX_FACTOR
- DOUBLE PRECISION dsum,dknown_sum,dt,dpt
- DOUBLE PRECISION rounding_error, ddiff
- INTEGER double_DIGITS
- LOGICAL logic_and, logic_or, logic_eqv,logic_neqv
- INTEGER bit_and, bit_or
- INTEGER exclusiv_bit_or
- INTEGER min_value, max_value
- DOUBLE PRECISION dmin, dmax
- INTEGER result
- INCLUDE "omp_testsuite.f"
- LOGICAL logics(LOOPCOUNT)
- INTEGER int_array(LOOPCOUNT)
- DOUBLE PRECISION d_array(LOOPCOUNT)
- PARAMETER (int_const=10,known_product=3628800)
- PARAMETER (double_DIGITS=20,MAX_FACTOR=10)
- PARAMETER (rounding_error=1.E-6)
-
- dt = 1./3.
- known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
- product = 1
- sum2 = 0
- sum = 0
- dsum = 0.
- result =0
- logic_and = .true.
- logic_or = .false.
- bit_and = 1
- bit_or = 0
- exclusiv_bit_or = 0
-!$omp parallel do schedule(dynamic, 1) <ompts:check>reduction(+:sum)</ompts:check>
- DO i =1, LOOPCOUNT
- sum = sum + i
- END DO
-!$omp end parallel do
-
- IF (known_sum .NE. sum) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with integers: Result was ",
- & sum,"instead of ", known_sum
- END IF
-
- diff = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
-
-
-
-!$omp parallel do schedule(dynamic, 1) <ompts:check>reduction (-: diff)</ompts:check>
- DO i =1, LOOPCOUNT
- diff = diff - i
- END DO
-!$omp end parallel do
-
- IF ( diff .NE. 0 ) THEN
- result = result + 1
- WRITE(1,*) "Error in difference with integers: Result was ",
- & sum,"instead of 0."
- END IF
-
-!... Test for doubles
- dsum =0.
- dpt = 1
-
- DO i=1, DOUBLE_DIGITS
- dpt= dpt * dt
- END DO
- dknown_sum = (1-dpt)/(1-dt)
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(+:dsum)</ompts:check>
- DO i=0,DOUBLE_DIGITS-1
- dsum = dsum + dt**i
- END DO
-!$omp end parallel do
-
-
- IF(dsum .NE. dknown_sum .AND.
- & abs(dsum - dknown_sum) .GT. rounding_error ) THEN
- result = result + 1
- write(1,*) "Error in sum with doubles: Result was ",
- & dsum,"instead of ",dknown_sum,"(Difference: ",
- & dsum - dknown_sum,")"
- END IF
- dpt = 1
-
- DO i=1, DOUBLE_DIGITS
- dpt = dpt*dt
- END DO
- ddiff = ( 1-dpt)/(1-dt)
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(-:ddiff)</ompts:check>
- DO i=0, DOUBLE_DIGITS-1
- ddiff = ddiff - dt**i
- END DO
-!$omp end parallel do
-
- IF ( ABS(ddiff) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in Difference with doubles: Result was ",
- & ddiff,"instead of 0.0"
- END IF
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(*:product)</ompts:check>
- DO i=1,MAX_FACTOR
- product = product * i
- END DO
-!$omp end parallel do
-
- IF (known_product .NE. product) THEN
- result = result + 1
- WRITE(1,*) "Error in Product with integers: Result was ",
- & product," instead of",known_product
- END IF
-
- DO i=1,LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.AND.:logic_and)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end parallel do
-
- IF (.NOT. logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND part 1"
- END IF
-
-
- logic_and = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.AND.:logic_and)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end parallel do
-
- IF (logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND pass 2"
- END IF
-
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.OR.:logic_or)</ompts:check>
- DO i = 1, LOOPCOUNT
- logic_or = logic_or .or. logics(i)
- END DO
-!$omp end parallel do
-
- IF (logic_or) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 1"
- END IF
-
- logic_or = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.OR.:logic_or)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end parallel do
-
- IF ( .NOT. logic_or ) THEn
- result = result + 1
- WRITE(1,*) "Error in logic OR part 2"
- END IF
-
-!... Test logic EQV, unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
- logic_eqv = .TRUE.
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.EQV.:logic_eqv)</ompts:check>
- DO i = 1, LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end parallel do
-
- IF (.NOT. logic_eqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 1"
- END IF
-
- logic_eqv = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.EQV.:logic_eqv)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end parallel do
-
- IF ( logic_eqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 2"
- END IF
-
-!... Test logic NEQV, which is unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
- logic_neqv = .FALSE.
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.NEQV.:logic_neqv)</ompts:check>
- DO i = 1, LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp end parallel do
-
- IF (logic_neqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 1"
- END IF
-
- logic_neqv = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(.NEQV.:logic_neqv)</ompts:check>
- DO i=1,LOOPCOUNT
- logic_neqv = logic_neqv .neqv. logics(i)
- END DO
-!$omp end parallel do
-
- IF ( .NOT. logic_neqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 1
- END DO
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(IAND:bit_and)</ompts:check>
- DO i=1, LOOPCOUNT
-!... iand(I,J): Returns value resulting from boolean AND of
-!... pair of bits in each of I and J.
- bit_and = IAND(bit_and,int_array(i))
- END DO
-!$omp end parallel do
-
- IF ( bit_and .LT. 1 ) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 1"
- END IF
-
- bit_and = 1
- int_array(LOOPCOUNT/2) = 0
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(IAND:bit_and)</ompts:check>
- DO i=1, LOOPCOUNT
- bit_and = IAND ( bit_and, int_array(i) )
- END DO
-!$omp end parallel do
-
- IF( bit_and .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-
-!$omp parallel do schedule(dynamic,1) reduction(IOR:bit_or)
- DO i=1, LOOPCOUNT
-!... Ior(I,J): Returns value resulting from boolean OR of
-!... pair of bits in each of I and J.
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end parallel do
-
- IF ( bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 1"
- END IF
-
-
- bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(IOR:bit_or)</ompts:check>
- DO i=1, LOOPCOUNT
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end parallel do
-
- IF ( bit_or .LE. 0) then
- result = result + 1
- WRITE(1,*) "Error in Ior part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(IEOR:exclusiv_bit_or)</ompts:check>
- DO i = 1, LOOPCOUNT
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end parallel do
-
- IF ( exclusiv_bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 1"
- END IF
-
- exclusiv_bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(IEOR:exclusiv_bit_or)</ompts:check>
- DO i = 1, LOOPCOUNT
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end parallel do
-
- IF ( exclusiv_bit_or .le. 0) then
- result = result + 1
- WRITE(1,*) "Error in Ieor part 2"
- END IF
-
- DO i=1,LOOPCOUNT
- int_array(i) = 10 - i
- END DO
-
- min_value = 65535
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(MIN:min_value)</ompts:check>
- DO i = 1, LOOPCOUNT
- min_value = MIN(min_value,int_array(i) )
- END DO
-!$omp end parallel do
-
- IF ( min_value .GT. (10-LOOPCOUNT) )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- int_array(i) = i
- END DO
-
- max_value = -32768
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(MAX:max_value)</ompts:check>
- DO i = 1, LOOPCOUNT
- max_value = MAX(max_value,int_array(i) )
- END DO
-!$omp end parallel do
-
- IF ( max_value .LT. LOOPCOUNT )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MAX"
- END IF
-
-!... test double min, max
- DO i=1,LOOPCOUNT
- d_array(i) = 10 - i*dt
- END DO
-
- dmin = 2**10
- dt = 0.5
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(MIN:dmin)</ompts:check>
- DO i = 1, LOOPCOUNT
- dmin= MIN(dmin,d_array(i) )
- END DO
-!$omp end parallel do
-
- IF ( dmin .GT. (10-dt) )THEN
- result = result + 1
- WRITE(1,*) "Error in double MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- d_array(i) = i * dt
- END DO
-
- dmax= - (2**10)
-
-!$omp parallel do schedule(dynamic,1) <ompts:check>reduction(max:dmax)</ompts:check>
- DO i = 1, LOOPCOUNT
- dmax= max(dmax,d_array(i) )
- END DO
-!$omp end parallel do
-
- IF ( dmax .LT. LOOPCOUNT*dt )THEN
- result = result + 1
- WRITE(1,*) "Error in double MAX"
- END IF
-
- IF ( result .EQ. 0 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_section_firstprivate.f b/openmp/testsuite/fortran/par_section_firstprivate.f
deleted file mode 100644
index b32b85cf31f..00000000000
--- a/openmp/testsuite/fortran/par_section_firstprivate.f
+++ /dev/null
@@ -1,34 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel sections firstprivate clause.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel sections firstprivate</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_section_firstprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, sum0, known_sum
- sum = 7
- sum0 = 11
-!$omp parallel sections <ompts:check>firstprivate(sum0)</ompts:check><ompts:crosscheck>private(sum0)</ompts:crosscheck>
-!$omp section
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-<ompts:crosscheck>!$omp section</ompts:crosscheck>
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-<ompts:crosscheck>!$omp section</ompts:crosscheck>
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end parallel sections
- known_sum = 11*3 + 7
- IF ( known_sum .EQ. sum ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_section_lastprivate.f b/openmp/testsuite/fortran/par_section_lastprivate.f
deleted file mode 100644
index d9c721d0a1c..00000000000
--- a/openmp/testsuite/fortran/par_section_lastprivate.f
+++ /dev/null
@@ -1,51 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel sections lastprivate directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel sections lastprivate</ompts:directive>
-<ompts:dependences>omp critical,omp parallel sections private</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_section_lastprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, sum0, known_sum, i ,i0
- sum = 0
- sum0 = 0
- i0 = -1
-!$omp parallel sections <ompts:check>lastprivate(i0)</ompts:check><ompts:crosscheck>private(i0)</ompts:crosscheck> private(i,sum0)
-!$omp section
- sum0 = 0
- DO i=1, 399
- sum0 = sum0 + i
- i0=i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=400, 699
- sum0 = sum0 + i
- i0 = i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=700, 999
- sum0 = sum0 + i
- i0 = i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end parallel sections
- known_sum = (999*1000)/2
-! print *, "sum", sum, "ks", known_sum, i0
- IF ( known_sum .EQ. sum .AND. i0 .EQ. 999 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/par_section_private.f b/openmp/testsuite/fortran/par_section_private.f
deleted file mode 100644
index fd0ac0e930c..00000000000
--- a/openmp/testsuite/fortran/par_section_private.f
+++ /dev/null
@@ -1,86 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the parallel section private clause.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel section private</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_section_private</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, sum0, known_sum, i
- sum = 7
- sum0 = 0
-!$omp parallel sections<ompts:check>private(sum0,i)</ompts:check><ompts:crosscheck>private(i)</ompts:crosscheck>
-!$omp section
- sum0 = 0
- DO i=1, 399
- sum0 = sum0 + i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=400, 699
- sum0 = sum0 + i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=700, 999
- sum0 = sum0 + i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end parallel sections
- known_sum = (999*1000)/2+7
- IF ( known_sum .eq. sum ) then
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
-
- integer function crschk_par_section_private()
- implicit none
- integer sum, sum0, known_sum, i
- sum = 7
- sum0 = 0
-!$omp parallel sections private(i)
-!$omp section
- sum0 = 0
- do i=1, 399
- sum0 = sum0 + i
- end do
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- do i=400, 699
- sum0 = sum0 + i
- end do
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- do i=700, 999
- sum0 = sum0 + i
- end do
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end parallel sections
- known_sum = (999*1000)/2+7
- if ( known_sum .eq. sum ) then
- crschk_par_section_private = 1
- else
- crschk_par_section_private = 0
- end if
- end
-
diff --git a/openmp/testsuite/fortran/par_section_reduct.f b/openmp/testsuite/fortran/par_section_reduct.f
deleted file mode 100644
index adde304c180..00000000000
--- a/openmp/testsuite/fortran/par_section_reduct.f
+++ /dev/null
@@ -1,631 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp parallel sections reduction directive with all its option.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel sections reduction</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>par_section_reduct</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum, sum2, known_sum, i, i2,diff
- INTEGER product,known_product,int_const
- INTEGER MAX_FACTOR
- DOUBLE PRECISION dsum,dknown_sum,dt,dpt
- DOUBLE PRECISION rounding_error, ddiff
- INTEGER DOUBLE_DIGITS
- LOGICAL logic_and, logic_or, logic_eqv,logic_neqv
- INTEGER bit_and, bit_or
- INTEGER exclusiv_bit_or
- INTEGER min_value, max_value
- DOUBLE PRECISION dmin, dmax
- INTEGER result
- INCLUDE "omp_testsuite.f"
- LOGICAL logics(LOOPCOUNT)
- INTEGER int_array(LOOPCOUNT)
- DOUBLE PRECISION d_array(LOOPCOUNT)
- PARAMETER (int_const=10,known_product=3628800)
- PARAMETER (DOUBLE_DIGITS=20,MAX_FACTOR=10)
- PARAMETER (rounding_error=1.E-6)
-
- INTEGER cut1, cut2, cut3, cut4
-
- dt = 1./3.
- known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
- product = 1
- sum2 = 0
- sum = 0
- dsum = 0.
- result =0
- logic_and = .TRUE.
- logic_or = .FALSE.
- bit_and = 1
- bit_or = 0
- exclusiv_bit_or = 0
- cut1 = NINT(LOOPCOUNT / 3.)
- cut2 = cut1 + 1
- cut3 = 2 * cut1
- cut4 = cut3 + 1
-
-!$omp parallel sections private(i) <ompts:check>reduction(+:sum)</ompts:check>
-!$omp section
- DO i =1, cut1
- sum = sum + i
- END DO
-!$omp section
- DO i =cut2, cut3
- sum = sum + i
- END DO
-!$omp section
- DO i =cut4, LOOPCOUNT
- sum = sum + i
- END DO
-!$omp end parallel sections
-
- IF (known_sum .NE. sum) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with integers: Result was ",
- & sum,"instead of ", known_sum
- END IF
-
- diff = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
-
-
-!$omp parallel sections <ompts:check>reduction (-: diff)</ompts:check>
-!$omp section
- DO i =1, cut1
- diff = diff - i
- END DO
-!$omp section
- DO i =cut2, cut3
- diff = diff - i
- END DO
-!$omp section
- DO i =cut4, LOOPCOUNT
- diff = diff - i
- END DO
-!$omp end parallel sections
-
- IF ( diff .NE. 0 ) THEN
- result = result + 1
- WRITE(1,*) "Error in difference with integers: Result was ",
- & sum,"instead of 0."
- END IF
-
-!... Test for doubles
- dsum =0.
- dpt = 1
-
- DO i=1, DOUBLE_DIGITS
- dpt= dpt * dt
- END DO
- dknown_sum = (1-dpt)/(1-dt)
-!$omp parallel sections <ompts:check>reduction(+:dsum)</ompts:check>
-!$omp section
- DO i=0,6
- dsum = dsum + dt**i
- END DO
-!$omp section
- DO i=7,12
- dsum = dsum + dt**i
- END DO
-!$omp section
- DO i=13,DOUBLE_DIGITS-1
- dsum = dsum + dt**i
- END DO
-!$omp end parallel sections
-
-
- IF(dsum .NE. dknown_sum .AND.
- & ABS(dsum - dknown_sum) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with doubles: Result was ",
- & dsum,"instead of ",dknown_sum,"(Difference: ",
- & dsum - dknown_sum,")"
- END IF
- dpt = 1
-
-
-
- DO i=1, DOUBLE_DIGITS
- dpt = dpt*dt
- END DO
- ddiff = ( 1-dpt)/(1-dt)
-!$omp parallel sections <ompts:check>reduction(-:ddiff)</ompts:check>
-!$omp section
- DO i=0, 6
- ddiff = ddiff - dt**i
- END DO
-!$omp section
- DO i=7, 12
- ddiff = ddiff - dt**i
- END DO
-!$omp section
- DO i=13, DOUBLE_DIGITS-1
- ddiff = ddiff - dt**i
- END DO
-!$omp end parallel sections
-
- IF ( ABS(ddiff) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in Difference with doubles: Result was ",
- & ddiff,"instead of 0.0"
- END IF
-
-!$omp parallel sections <ompts:check>reduction(*:product)</ompts:check>
-!$omp section
- DO i=1,3
- product = product * i
- END DO
-!$omp section
- DO i=4,6
- product = product * i
- END DO
-!$omp section
- DO i=7,10
- product = product * i
- END DO
-!$omp end parallel sections
-
- IF (known_product .NE. product) THEN
- result = result + 1
- WRITE(1,*) "Error in Product with integers: Result was ",
- & product," instead of",known_product
- END IF
-
- DO i=1,LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
-!$omp parallel sections <ompts:check>reduction(.AND.:logic_and)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end parallel sections
-
- if (.not. logic_and) then
- result = result + 1
- write(1,*) "Error in logic AND part 1"
- end if
-
-
- logic_and = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel sections <ompts:check>reduction(.AND.:logic_and)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp end parallel sections
-
- IF (logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND pass 2"
- END IF
-
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
-!$omp parallel sections <ompts:check>reduction(.OR.:logic_or)</ompts:check>
-!$omp section
- DO i = 1, cut1
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i = cut2, cut3
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end parallel sections
-
- IF (logic_or) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 1"
- END IF
-
- logic_or = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel sections <ompts:check>reduction(.OR.:logic_or)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp end parallel sections
-
- IF ( .NOT. logic_or ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 2"
- END IF
-
-!... Test logic EQV, unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
- logic_eqv = .TRUE.
-
-!$omp parallel sections <ompts:check>reduction(.EQV.:logic_eqv)</ompts:check>
-!$omp section
- DO i = 1, cut1
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i = cut2, cut3
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end parallel sections
-
- IF (.NOT. logic_eqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 1"
- END IF
-
- logic_eqv = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel sections <ompts:check>reduction(.EQV.:logic_eqv)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp end parallel sections
-
- IF ( logic_eqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 2"
- END IF
-
-!... Test logic NEQV, which is unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
- logic_neqv = .FALSE.
-
-!$omp parallel sections <ompts:check>reduction(.NEQV.:logic_neqv)</ompts:check>
-!$omp section
- DO i = 1, cut1
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i = cut2, cut3
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp end parallel sections
-
- IF (logic_neqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 1"
- END IF
-
- logic_neqv = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel sections <ompts:check>reduction(.NEQV.:logic_neqv)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp end parallel sections
-
- IF ( .NOT. logic_neqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 1
- END DO
-!$omp parallel sections <ompts:check>reduction(IAND:bit_and)</ompts:check>
-!... iand(I,J): Returns value resulting from boolean AND of
-!... pair of bits in each of I and J.
-!$omp section
- DO i=1, cut1
- bit_and = IAND(bit_and,int_array(i))
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_and = IAND(bit_and,int_array(i))
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_and = IAND(bit_and,int_array(i))
- END DO
-!$omp end parallel sections
-
- IF ( bit_and .LT. 1 ) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 1"
- END IF
-
- bit_and = 1
- int_array(LOOPCOUNT/2) = 0
-
-!$omp parallel sections <ompts:check>reduction(IAND:bit_and)</ompts:check>
-!$omp section
- DO i=1, cut1
- bit_and = IAND ( bit_and, int_array(i) )
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_and = IAND ( bit_and, int_array(i) )
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_and = IAND ( bit_and, int_array(i) )
- END DO
-!$omp end parallel sections
-
- IF( bit_and .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-
-!$omp parallel sections <ompts:check>reduction(IOR:bit_or)</ompts:check>
-!... Ior(I,J): Returns value resulting from boolean OR of
-!... pair of bits in each of I and J.
-!$omp section
- DO i=1, cut1
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end parallel sections
-
- IF ( bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 1"
- END IF
-
-
- bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-!$omp parallel sections <ompts:check>reduction(IOR:bit_or)</ompts:check>
-!$omp section
- DO i=1, cut1
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_or = IOR(bit_or, int_array(i) )
- END DO
-!$omp end parallel sections
-
- IF ( bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-!$omp parallel sections <ompts:check>reduction(IEOR:exclusiv_bit_or)</ompts:check>
-!$omp section
- DO i = 1, cut1
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut2, cut3
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end parallel sections
-
- IF ( exclusiv_bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 1"
- END IF
-
- exclusiv_bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-
-!$omp parallel sections <ompts:check>reduction(IEOR:exclusiv_bit_or)</ompts:check>
-!$omp section
- DO i = 1, cut1
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut2, cut3
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- exclusiv_bit_or = IEOR(exclusiv_bit_or, int_array(i))
- END DO
-!$omp end parallel sections
-
- IF ( exclusiv_bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 2"
- END IF
-
- DO i=1,LOOPCOUNT
- int_array(i) = 10 - i
- END DO
-
- min_value = 65535
-
-!$omp parallel sections <ompts:check>reduction(MIN:min_value)</ompts:check>
-!$omp section
- DO i = 1, cut1
- min_value = MIN(min_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- min_value = MIN(min_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- min_value = MIN(min_value,int_array(i) )
- END DO
-!$omp end parallel sections
-
- IF ( min_value .GT. (10-LOOPCOUNT) )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- int_array(i) = i
- END DO
-
- max_value = -32768
-
-!$omp parallel sections <ompts:check>reduction(MAX:max_value)</ompts:check>
-!$omp section
- DO i = 1, cut1
- max_value = MAX(max_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- max_value = MAX(max_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- max_value = MAX(max_value,int_array(i) )
- END DO
-!$omp end parallel sections
-
- IF ( max_value .LT. LOOPCOUNT )THEN
- result = result + 1
- WRITE(1,*) "Error in integer MAX"
- END IF
-
-!... test double min, max
- DO i=1,LOOPCOUNT
- d_array(i) = 10 - i*dt
- END DO
-
- dmin = 2**10
- dt = 0.5
-
-!$omp parallel sections <ompts:check>reduction(MIN:dmin)</ompts:check>
-!$omp section
- DO i = 1, cut1
- dmin= MIN(dmin,d_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- dmin= MIN(dmin,d_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- dmin= MIN(dmin,d_array(i) )
- END DO
-!$omp end parallel sections
-
- IF ( dmin .GT. (10-dt) )THEN
- result = result + 1
- WRITE(1,*) "Error in double MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- d_array(i) = i * dt
- END DO
-
- dmax= - (2**10)
-
-!$omp parallel sections <ompts:check>reduction(MAX:dmax)</ompts:check>
-!$omp section
- DO i = 1, cut1
- dmax= MAX(dmax,d_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- dmax= MAX(dmax,d_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- dmax= MAX(dmax,d_array(i) )
- END DO
-!$omp end parallel sections
-
- IF ( dmax .lt. LOOPCOUNT*dt )THEN
- result = result + 1
- write(1,*) "Error in double MAX"
- END IF
-
- IF ( result .EQ. 0 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
-
- CLOSE(2)
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/section_firstprivate.f b/openmp/testsuite/fortran/section_firstprivate.f
deleted file mode 100644
index 630058a8d06..00000000000
--- a/openmp/testsuite/fortran/section_firstprivate.f
+++ /dev/null
@@ -1,41 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp section firstprivate directive by adding a variable which is defined before the parallel region.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp firstprivate</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>section_firstprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER known_sum
-<ompts:orphan:vars>
- INTEGER sum,sum0
- COMMON /orphvars/ sum,sum0
-</ompts:orphan:vars>
- sum = 7
- sum0 = 11
-!$omp parallel
- <ompts:orphan>
-!$omp sections <ompts:check>firstprivate(sum0)</ompts:check><ompts:crosscheck>private(sum0)</ompts:crosscheck>
-!$omp section
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end sections
- </ompts:orphan>
-!$omp end parallel
- known_sum = 11*3+7
- IF ( known_sum .EQ. sum) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/section_lastprivate.f b/openmp/testsuite/fortran/section_lastprivate.f
deleted file mode 100644
index 5ba71487e90..00000000000
--- a/openmp/testsuite/fortran/section_lastprivate.f
+++ /dev/null
@@ -1,62 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp section lastprivate directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp section lastprivate</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>section_lastprivate</ompts:testcode:functionname>()
- INTEGER known_sum
-
- <ompts:orphan:vars>
- INTEGER i, i0, sum, sum0
- COMMON /orphvars/ i,i0,sum
- </ompts:orphan:vars>
-
- sum = 0
- sum0 = 0
- i0 = -1
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>lastprivate(i0)</ompts:check><ompts:crosscheck>private(i0)</ompts:crosscheck> private(i,sum0)
-!$omp section
- sum0 = 0
- DO i=1, 399
- sum0 = sum0 + i
- i0 = i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=400, 699
- sum0 = sum0 + i
- i0 = i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=700, 999
- sum0 = sum0 + i
- i0 = i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end sections
-</ompts:orphan>
-!$omp end parallel
-
- known_sum = (999*1000)/2
- IF ( known_sum .EQ. sum .AND. i0 .EQ. 999 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</omts:test>
-
-
diff --git a/openmp/testsuite/fortran/section_private.f b/openmp/testsuite/fortran/section_private.f
deleted file mode 100644
index 28b80901727..00000000000
--- a/openmp/testsuite/fortran/section_private.f
+++ /dev/null
@@ -1,55 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the parallel section private clause.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp parallel section private</ompts:directive>
-<ompts:dependences>omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>section_private</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER known_sum
-<ompts:orphan:vars>
- INTEGER sum,sum0,i
- COMMON /orphvars/ sum,sum0,i
-</ompts:orphan:vars>
-
- sum = 7
- sum0 = 0
-!$omp parallel
- <ompts:orphan>
-!$omp sections <ompts:check>private(sum0,i)</ompts:check><ompts:crosscheck>private(i)</ompts:crosscheck>
-!$omp section
- sum0 = 0
- DO i=1, 399
- sum0 = sum0 + i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=400, 699
- sum0 = sum0 + i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp section
- sum0 = 0
- DO i=700, 999
- sum0 = sum0 + i
- END DO
-!$omp critical
- sum = sum + sum0
-!$omp end critical
-!$omp end sections
- </ompts:orphan>
-!$omp end parallel
- known_sum = (999*1000)/2+7
- IF ( known_sum .EQ. sum) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/section_reduction.f b/openmp/testsuite/fortran/section_reduction.f
deleted file mode 100644
index d7e70f9aa81..00000000000
--- a/openmp/testsuite/fortran/section_reduction.f
+++ /dev/null
@@ -1,743 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp sections reduction directive with all its options.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp sections reduction</ompts:directive>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>section_reduction</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER sum2, known_sum, i2
- INTEGER known_product,int_const
- INTEGER MAX_FACTOR
- DOUBLE PRECISION dknown_sum,dpt
- INTEGER result
- INCLUDE "omp_testsuite.f"
- PARAMETER (int_const=10,known_product=3628800)
-
- <ompts:orphan:vars>
- INTEGER i,dummy
- INTEGER sum, dIFf
- DOUBLE PRECISION dt
- DOUBLE PRECISION dsum, ddIFf
- INTEGER product
- LOGICAL logics(LOOPCOUNT)
- INTEGER int_array(LOOPCOUNT)
- LOGICAL logic_and, logic_or, logic_eqv,logic_neqv
- INTEGER bit_and, bit_or
- INTEGER exclusiv_bit_or
- INTEGER min_value, max_value
- DOUBLE PRECISION d_array(LOOPCOUNT)
- DOUBLE PRECISION dmin, dmax
-
- INTEGER DOUBLE_DIGITS
- INTEGER cut1, cut2, cut3, cut4
- PARAMETER (DOUBLE_DIGITS=20,MAX_FACTOR=10)
- DOUBLE PRECISION rounding_error
- PARAMETER (rounding_error=1.E-6)
-
- COMMON /orphvars/ i,sum,dIFf,product,dt,dsum,ddIFf,logic_and,
- & logic_or,logic_eqv,logic_neqv,logics,int_array,bit_and,bit_or,
- & exclusiv_bit_or,min_value,dmin,dmax,d_array,max_value
-
- cut1 = NINT(LOOPCOUNT / 3.3)
- cut2 = cut1 + 1
- cut3 = cut1 * 2
- cut4 = cut3 + 1
-
- </ompts:orphan:vars>
-
- dt = 1./3.
- known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2
- product = 1
- sum2 = 0
- sum = 0
- dsum = 0.
- result =0
- logic_and = .true.
- logic_or = .false.
- bit_and = 1
- bit_or = 0
- exclusiv_bit_or = 0
- cut1 = NINT(LOOPCOUNT / 3.3)
- cut2 = cut1 + 1
- cut3 = cut1 * 2
- cut4 = cut3 + 1
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections private(i) <ompts:check>reduction(+:sum)</ompts:check>
-!$omp section
- DO i =1, cut1
- sum = sum + i
- END DO
-!$omp section
- DO i =cut2, cut3
- sum = sum + i
- END DO
-!$omp section
- DO i =cut4, LOOPCOUNT
- sum = sum + i
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (known_sum .NE. sum) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with integers: Result was ",
- & sum,"instead of ", known_sum
- END IF
-
- dIFf = known_sum
-
-
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction (-: dIFf)</ompts:check>
-!$omp section
- DO i =1, cut1
- dIFf = dIFf - i
- END DO
-!$omp section
- DO i =cut2, cut3
- dIFf = dIFf - i
- END DO
-!$omp section
- DO i =cut4, LOOPCOUNT
- dIFf = dIFf - i
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( dIFf .NE. 0 ) THEN
- result = result + 1
- WRITE(1,*) "Error in dIFference with integers: Result was ",
- & sum,"instead of 0."
- END IF
-
-!**********************************************************************!
-! Test for DOubles
-!**********************************************************************!
- dsum = 0.
- dpt = 1
-
- DO i=1, DOUBLE_DIGITS
- dpt= dpt * dt
- END DO
- dknown_sum = (1-dpt)/(1-dt)
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(+:dsum)</ompts:check>
-!$omp section
- DO i=0,6
- dsum = dsum + dt**i
- END DO
-!$omp section
- DO i=7,12
- dsum = dsum + dt**i
- END DO
-!$omp section
- DO i=13,DOUBLE_DIGITS-1
- dsum = dsum + dt**i
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
-
- IF (dsum .NE. dknown_sum .AND.
- & abs(dsum - dknown_sum) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in sum with DOubles: Result was ",
- & dsum,"instead of ",dknown_sum,"(DIFference: ",
- & dsum - dknown_sum,")"
- END IF
-
- dpt = 1
- DO i=1, DOUBLE_DIGITS
- dpt = dpt*dt
- END DO
-
- ddIFf = ( 1-dpt)/(1-dt)
-!$omp parallel
-!$omp sections <ompts:check>reduction(-:ddIFf)</ompts:check>
-!$omp section
- DO i=0, 6
- ddIFf = ddIFf - dt**i
- END DO
-!$omp section
- DO i=7, 12
- ddIFf = ddIFf - dt**i
- END DO
-!$omp section
- DO i=13, DOUBLE_DIGITS-1
- ddIFf = ddIFf - dt**i
- END DO
-!$omp END sections
-!$omp END parallel
-
- IF ( abs(ddIFf) .GT. rounding_error ) THEN
- result = result + 1
- WRITE(1,*) "Error in DIFference with DOubles: Result was ",
- & ddIFf,"instead of 0.0"
- END IF
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(*:product)</ompts:check>
-!$omp section
- DO i=1,3
- product = product * i
- END DO
-!$omp section
- DO i=4,6
- product = product * i
- END DO
-!$omp section
- DO i=7,10
- product = product * i
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (known_product .NE. product) THEN
- result = result + 1
- WRITE(1,*) "Error in Product with integers: Result was ",
- & product," instead of",known_product
- END IF
-
- DO i=1,LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.and.:logic_and)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (.NOT. logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND part 1"
- END IF
-
-
- logic_and = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.and.:logic_and)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_and = logic_and .AND. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (logic_and) THEN
- result = result + 1
- WRITE(1,*) "Error in logic AND pass 2"
- END IF
-
- DO i=1, LOOPCOUNT
- logics(i) = .FALSE.
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.or.:logic_or)</ompts:check>
-!$omp section
- DO i = 1, cut1
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i = cut2, cut3
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (logic_or) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 1"
- END IF
-
- logic_or = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.or.:logic_or)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_or = logic_or .OR. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( .NOT. logic_or ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic OR part 2"
- END IF
-
-!... Test logic EQV, unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .TRUE.
- END DO
-
- logic_eqv = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.eqv.:logic_eqv)</ompts:check>
-!$omp section
- DO i = 1, cut1
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i = cut2, cut3
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (.NOT. logic_eqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 1"
- END IF
-
- logic_eqv = .TRUE.
- logics(LOOPCOUNT/2) = .FALSE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.eqv.:logic_eqv)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_eqv = logic_eqv .EQV. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_eqv = logic_eqv .eqv. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_eqv = logic_eqv .eqv. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( logic_eqv ) THEN
- result = result + 1
- WRITE(1,*) "Error in logic EQV part 2"
- END IF
-
-!... Test logic NEQV, which is unique in Fortran
- DO i=1, LOOPCOUNT
- logics(i) = .false.
- END DO
-
- logic_neqv = .false.
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.neqv.:logic_neqv)</ompts:check>
-!$omp section
- DO i = 1, cut1
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i = cut2, cut3
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF (logic_neqv) THEN
- result = result + 1
- WRITE(1,*) "Error in logic NEQV part 1"
- END IF
-
- logic_neqv = .FALSE.
- logics(LOOPCOUNT/2) = .TRUE.
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(.neqv.:logic_neqv)</ompts:check>
-!$omp section
- DO i=1,cut1
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i=cut2,cut3
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp section
- DO i=cut4,LOOPCOUNT
- logic_neqv = logic_neqv .NEQV. logics(i)
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( .NOT. logic_neqv ) THEN
- result = result + 1
- write(1,*) "Error in logic NEQV part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 1
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(iand:bit_and)</ompts:check>
-!... iand(I,J): Returns value resulting from boolean AND of
-!... pair of bits in each of I and J.
-!$omp section
- DO i=1, cut1
- bit_and = iand(bit_and,int_array(i))
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_and = iand(bit_and,int_array(i))
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_and = iand(bit_and,int_array(i))
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( bit_and .lt. 1 ) THEN
- result = result + 1
- write(1,*) "Error in IAND part 1"
- END IF
-
- bit_and = 1
- int_array(LOOPCOUNT/2) = 0
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(iand:bit_and)</ompts:check>
-!$omp section
- DO i=1, cut1
- bit_and = iand ( bit_and, int_array(i) )
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_and = iand ( bit_and, int_array(i) )
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_and = iand ( bit_and, int_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF( bit_and .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in IAND part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(ior:bit_or)</ompts:check>
-!... Ior(I,J): Returns value resulting from boolean OR of
-!... pair of bits in each of I and J.
-!$omp section
- DO i=1, cut1
- bit_or = ior(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_or = ior(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_or = ior(bit_or, int_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 1"
- END IF
-
-
- bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(ior:bit_or)</ompts:check>
-!$omp section
- DO i=1, cut1
- bit_or = Ior(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut2, cut3
- bit_or = Ior(bit_or, int_array(i) )
- END DO
-!$omp section
- DO i=cut4, LOOPCOUNT
- bit_or = Ior(bit_or, int_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ior part 2"
- END IF
-
- DO i=1, LOOPCOUNT
- int_array(i) = 0
- END DO
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(ieor:exclusiv_bit_or)</ompts:check>
-!$omp section
- DO i = 1, cut1
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut2, cut3
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( exclusiv_bit_or .GE. 1) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 1"
- END IF
-
- exclusiv_bit_or = 0
- int_array(LOOPCOUNT/2) = 1
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(ieor:exclusiv_bit_or)</ompts:check>
-!$omp section
- DO i = 1, cut1
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut2, cut3
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- exclusiv_bit_or = ieor(exclusiv_bit_or, int_array(i))
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( exclusiv_bit_or .LE. 0) THEN
- result = result + 1
- WRITE(1,*) "Error in Ieor part 2"
- END IF
-
- DO i=1,LOOPCOUNT
- int_array(i) = 10 - i
- END DO
-
- min_value = 65535
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(min:min_value)</ompts:check>
-!$omp section
- DO i = 1, cut1
- min_value = min(min_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- min_value = min(min_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- min_value = min(min_value,int_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( min_value .GT. (10-LOOPCOUNT) ) THEN
- result = result + 1
- WRITE(1,*) "Error in integer MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- int_array(i) = i
- END DO
-
- max_value = -32768
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(max:max_value)</ompts:check>
-!$omp section
- DO i = 1, cut1
- max_value = max(max_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- max_value = max(max_value,int_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- max_value = max(max_value,int_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( max_value .LT. LOOPCOUNT ) THEN
- result = result + 1
- WRITE(1,*) "Error in integer MAX"
- END IF
-
-!... test DOuble min, max
- DO i=1,LOOPCOUNT
- d_array(i) = 10 - i*dt
- END DO
-
- dmin = 2**10
- dt = 0.5
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(min:dmin)</ompts:check>
-!$omp section
- DO i = 1, cut1
- dmin= min(dmin,d_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- dmin= min(dmin,d_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- dmin= min(dmin,d_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( dmin .GT. (10-dt) ) THEN
- result = result + 1
- WRITE(1,*) "Error in DOuble MIN"
- END IF
-
-
- DO i=1,LOOPCOUNT
- d_array(i) = i * dt
- END DO
-
- dmax= - (2**10)
-
-!$omp parallel
-<ompts:orphan>
-!$omp sections <ompts:check>reduction(max:dmax)</ompts:check>
-!$omp section
- DO i = 1, cut1
- dmax= max(dmax,d_array(i) )
- END DO
-!$omp section
- DO i = cut2, cut3
- dmax= max(dmax,d_array(i) )
- END DO
-!$omp section
- DO i = cut4, LOOPCOUNT
- dmax= max(dmax,d_array(i) )
- END DO
-!$omp END sections
-</ompts:orphan>
-!$omp END parallel
-
- IF ( dmax .LT. LOOPCOUNT*dt ) THEN
- result = result + 1
- WRITE(1,*) "Error in DOuble MAX"
- END IF
-
- IF ( result .EQ. 0 ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
-
- CLOSE(2)
-
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/single_copyprivate.f b/openmp/testsuite/fortran/single_copyprivate.f
deleted file mode 100644
index 0878a66a807..00000000000
--- a/openmp/testsuite/fortran/single_copyprivate.f
+++ /dev/null
@@ -1,41 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp single copyprivate directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp single copyprivate</ompts:directive>
-<ompts:dependences>omp parllel,omp critical</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>single_copyprivate</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER omp_get_thread_num
- INCLUDE "omp_testsuite.f"
-<ompts:orphan:vars>
- INTEGER i,j,thread,nr_iterations,result
- COMMON /orphvars/ nr_iterations,result
-</ompts:orphan:vars>
-
- result=0
- nr_iterations=0
-
-!$omp parallel private(i,j,thread)
- <ompts:orphan>
- DO i=0,LOOPCOUNT-1
- thread=OMP_GET_THREAD_NUM()
-!$omp single
- nr_iterations=nr_iterations+1
- j=i
-!$omp end single <ompts:check>copyprivate(j)</ompts:check>
-!$omp critical
- result=result+j-i;
-!$omp end critical
- END DO
- </ompts:orphan>
-!$omp end parallel
- IF(result .EQ. 0 .AND.
- & nr_iterations .EQ. LOOPCOUNT) THEN
- <testfunctionname></testfunctionname>=1
- ELSE
- <testfunctionname></testfunctionname>=0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/single_nowait.f b/openmp/testsuite/fortran/single_nowait.f
deleted file mode 100644
index f944af503eb..00000000000
--- a/openmp/testsuite/fortran/single_nowait.f
+++ /dev/null
@@ -1,50 +0,0 @@
-<ompts:test>
-<ompts:testdescription></ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp single nowait</ompts:directive>
-<ompts:dependences>omp critical,omp atomic</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>single_nowait</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER result, total_iterations, my_iterations,i
- INCLUDE "omp_testsuite.f"
-<ompts:orphan:vars>
- INTEGER nr_iterations
- COMMON /orphvars/ nr_iterations
-</ompts:orphan:vars>
-
- result=0
- nr_iterations=0
- total_iterations=0
- my_iterations=0
-
-!$omp parallel private(i)
- DO i=0, LOOPCOUNT -1
- <ompts:orphan>
-<ompts:check>!$omp single</ompts:check>
-!$omp atomic
- nr_iterations = nr_iterations + 1
-<ompts:check>!$omp end single nowait</ompts:check>
- </ompts:orphan>
- END DO
-!$omp end parallel
-!$omp parallel private(i,my_iterations)
- my_iterations = 0
- DO i=0, LOOPCOUNT -1
-<ompts:check>!$omp single</ompts:check>
- my_iterations = my_iterations + 1
-<ompts:check>!$omp end single nowait</ompts:check>
- END DO
-!$omp critical
- total_iterations = total_iterations + my_iterations
-!$omp end critical
-!$omp end parallel
- IF ( nr_iterations .EQ. LOOPCOUNT .AND.
- & total_iterations .EQ. LOOPCOUNT ) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END FUNCTION
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/single_private.f b/openmp/testsuite/fortran/single_private.f
deleted file mode 100644
index 7ad4a6a1933..00000000000
--- a/openmp/testsuite/fortran/single_private.f
+++ /dev/null
@@ -1,51 +0,0 @@
-<ompts:test>
-<ompts:testdescription>Test which checks the omp single private directive.</ompts:testdescription>
-<ompts:ompversion>2.0</ompts:ompversion>
-<ompts:directive>omp singel private</ompts:directive>
-<ompts:dependences>omp critical,omp flush,omp single nowait</ompts:dependences>
-<ompts:testcode>
- INTEGER FUNCTION <ompts:testcode:functionname>single_private</ompts:testcode:functionname>()
- IMPLICIT NONE
- INTEGER nr_iterations, i
- <ompts:orphan:vars>
- INTEGER result
- INTEGER nr_threads_in_single, myresult, myit
- COMMON /orphvars/ result,nr_iterations
- </ompts:orphan:vars>
- INCLUDE "omp_testsuite.f"
- nr_threads_in_single=0
- result=0
- myresult=0
- myit=0
- nr_iterations=0
-!$omp parallel private(i, myresult, myit)
-<ompts:orphan>
- myresult = 0
- myit = 0
- nr_threads_in_single=0
-!$omp barrier
- DO i=0, LOOPCOUNT -1
-!$omp single <ompts:check>private(nr_threads_in_single)</ompts:check>
- nr_threads_in_single = 0
-!$omp flush
- nr_threads_in_single = nr_threads_in_single + 1
-!$omp flush
- myit = myit + 1
- myresult = myresult + nr_threads_in_single
-!$omp end single nowait
- END DO
-!$omp critical
- result = result + nr_threads_in_single
- nr_iterations = nr_iterations + myit
-!$omp end critical
-</ompts:orphan>
-!$omp end parallel
- WRITE(1,*) "result is",result,"nr_it is",nr_iterations
- IF ( result .EQ. 0 .AND. nr_iterations .EQ. LOOPCOUNT) THEN
- <testfunctionname></testfunctionname> = 1
- ELSE
- <testfunctionname></testfunctionname> = 0
- END IF
- END
-</ompts:testcode>
-</ompts:test>
diff --git a/openmp/testsuite/fortran/testlist-f.txt b/openmp/testsuite/fortran/testlist-f.txt
deleted file mode 100644
index 41766e0f5a1..00000000000
--- a/openmp/testsuite/fortran/testlist-f.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-do_firstprivate.f
-do_lastprivate
-do_ordered
-do_private
-do_reduction
-#do_schedule_dynamic
-#do_schedule_guided
-#do_schedule_static
-has_openmp
-#omp_atomic
-omp_barrier
-omp_copyin
-omp_critical
-#omp_flush
-omp_get_num_threads
-omp_in_parallel
-omp_lock
-omp_master
-omp_nest_lock
-omp_nest_testlock
-omp_nested
-omp_num_threads
-omp_testlock
-omp_testsuite
-omp_threadprivate
-#omp_ticks_time
-#omp_workshare
-#omp_wtime
-#par_dofirstprivate
-#par_do_lastprivate
-#par_do_ordered
-#par_do_private
-#par_do_reduction
-#par_sectionirstprivate.f
-#par_section_lastprivate
-#par_section_private
-#par_section_reduction
-#sectionirstprivate.f
-#section_lastprivate
-#section_private
-#section_reduction
-#single
-#single_copyprivate
-#single_nowait
-#single_private
OpenPOWER on IntegriCloud