source: CIVL/examples/omp/dataracebench-1.3.2/micro-benchmarks-fortran/DRB094-doall2-ordered-orig-no.f95

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100755
File size: 1.2 KB
RevLine 
[e3f356c]1!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
2!!! Copyright (c) 2017-20, Lawrence Livermore National Security, LLC
3!!! and DataRaceBench project contributors. See the DataRaceBench/COPYRIGHT file for details.
4!!!
5!!! SPDX-License-Identifier: (BSD-3-Clause)
6!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!
7
8!Two-dimensional array computation:
9!ordered(2) is used to associate two loops with omp for.
10!The corresponding loop iteration variables are private.
11!
12!ordered(n) is an OpenMP 4.5 addition. No data race pairs.
13
14
15module DRB094
16 implicit none
17 integer, dimension(:,:), allocatable :: a
18end module
19
20program DRB094_doall2_ordered_orig_no
21 use omp_lib
22 use DRB094
23 implicit none
24
25 integer :: len, i, j
26 len = 100
27
28 allocate (a(len,len))
29
30 !$omp parallel do ordered(2)
31 do i = 1, len
32 do j = 1, len
33 a(i,j) = a(i,j)+1
34 !$omp ordered depend(sink:i-1,j) depend (sink:i,j-1)
35 print*,'test i =',i,' j =',j
36 !$omp ordered depend(source)
37 end do
38 end do
39 !$omp end parallel do
40
41
42end program
Note: See TracBrowser for help on using the repository browser.