source: CIVL/examples/omp/dataracebench-1.3.2/micro-benchmarks-fortran/DRB157-missingorderedsimd-orig-gpu-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: 971 bytes
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!Due to distribute parallel for simd directive at line 23, there is a data race at line 25.
9!Data Rae Pairs, var@25:9 and var@25:15
10
11program DRB157_missingorderedsimd_orig_gpu_yes
12 use omp_lib
13 implicit none
14
15 integer :: var(100)
16 integer :: i
17
18 do i = 1, 100
19 var(i) = 1
20 end do
21
22 !$omp target map(tofrom:var) device(0)
23 !$omp teams distribute parallel do simd safelen(16)
24 do i = 17, 100
25 var(i) = var(i-16)+1
26 end do
27 !$omp end teams distribute parallel do simd
28 !$omp end target
29
30 print*,var(98)
31end program
Note: See TracBrowser for help on using the repository browser.