diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2017-11-13 17:44:48 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2017-11-13 17:44:48 +0000 |
commit | f902e467b75671d06d1e9ad3663b8aa9366bc14b (patch) | |
tree | d6de4407663a1054506cd8b97d8a047f411e8cd8 /openmp/testsuite/fortran/omp_threadprivate.f | |
parent | 9e3d8f4b39e29e4616e8addb1240530dbdfab2c4 (diff) | |
download | bcm5719-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/omp_threadprivate.f')
-rw-r--r-- | openmp/testsuite/fortran/omp_threadprivate.f | 89 |
1 files changed, 0 insertions, 89 deletions
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> |