source: CIVL/examples/omp/dataracebench-1.3.2/micro-benchmarks-fortran/DRB102-copyprivate-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: 887 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!threadprivate+copyprivate: no data races
9
10module DRB102
11 implicit none
12 integer y
13 integer, parameter :: dp = kind(1.0d0)
14 real(dp) :: x
15 !$omp threadprivate(x,y)
16end module
17
18program DRB102_copyprivate_orig_no
19 use omp_lib
20 use DRB102
21 implicit none
22
23 !$omp parallel
24 !$omp single
25 x=1.0
26 y=1
27 !$omp end single copyprivate(x,y)
28 !$omp end parallel
29
30 print 100, x, y
31 100 format ('x =',F3.1,2x,'y =',i3)
32
33end program
Note: See TracBrowser for help on using the repository browser.