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.3 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 | !A loop with loop-carried anti-dependence.
|
|---|
| 9 | !Data race pair: a[i+1]@36:9 vs. a[i]@36:16
|
|---|
| 10 |
|
|---|
| 11 | !!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -!!
|
|---|
| 12 | !! NOTE by WenhaoWu (wuwenhao@udel.edu) !!
|
|---|
| 13 | !! This example is modified so that the bound can be adjusted !!
|
|---|
| 14 | !! by defining 'N' and if it is not defined then the bound value !!
|
|---|
| 15 | !! in the original example is used as the default value of 'N' !!
|
|---|
| 16 | !!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -!!
|
|---|
| 17 |
|
|---|
| 18 | #ifndef N
|
|---|
| 19 | #define N 10
|
|---|
| 20 | #endif
|
|---|
| 21 |
|
|---|
| 22 | program DRB001_antidep1_orig_yes
|
|---|
| 23 | use omp_lib
|
|---|
| 24 | implicit none
|
|---|
| 25 | integer :: i, len
|
|---|
| 26 | integer :: a(N)
|
|---|
| 27 |
|
|---|
| 28 | len = N
|
|---|
| 29 |
|
|---|
| 30 | do i = 1, len
|
|---|
| 31 | a(i) = i
|
|---|
| 32 | end do
|
|---|
| 33 |
|
|---|
| 34 | !$omp parallel do
|
|---|
| 35 | do i = 1, len-1
|
|---|
| 36 | a(i) = a(i+1) + 1
|
|---|
| 37 | end do
|
|---|
| 38 | !$omp end parallel do
|
|---|
| 39 |
|
|---|
| 40 | 100 format ('a(N/2)=',i3)
|
|---|
| 41 | print 100, a(N/2)
|
|---|
| 42 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.