source: CIVL/examples/omp/dataracebench-1.3.2/micro-benchmarks-fortran/DRB073-doall2-orig-yes.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.1 KB
Line 
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 using loops: missing private(j).
9!References to j in the loop cause data races.
10!Data race pairs (we allow multiple ones to preserve the pattern):
11! Write_set = {j@28, j@28:implicit step function +1}
12! Read_set = {j@29:17, j@29:26, j@28:12, j28@:22 (implicit step by +1)}
13! Any pair from Write_set vs. Write_set and Write_set vs. Read_set is a data race pair.
14
15
16program DRB073_doall2_orig_yes
17 use omp_lib
18 implicit none
19
20 integer :: i, j, len
21 integer, dimension(:,:), allocatable :: a
22 len = 100
23
24 allocate (a(len,len))
25
26 !$omp parallel do
27 do i = 1, 100
28 do j = 1, 100
29 a(i,j) = a(i,j)+1
30 end do
31 end do
32 !$omp end parallel do
33
34
35 deallocate(a)
36end program
Note: See TracBrowser for help on using the repository browser.