1.23
2.0
acw/focus-triggers
main
test-branch
| 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 | !The assignment to a@21:9 is not synchronized with the update of a@29:11 as a result of the
|
|---|
| 9 | !reduction computation in the for loop.
|
|---|
| 10 | !Data Race pair: a@21:9 and a@24:30
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | program DRB140_reduction_barrier_orig_yes
|
|---|
| 14 | use omp_lib
|
|---|
| 15 | implicit none
|
|---|
| 16 |
|
|---|
| 17 | integer :: a, i
|
|---|
| 18 |
|
|---|
| 19 | !$omp parallel shared(a) private(i)
|
|---|
| 20 | !$omp master
|
|---|
| 21 | a = 0
|
|---|
| 22 | !$omp end master
|
|---|
| 23 |
|
|---|
| 24 | !$omp do reduction(+:a)
|
|---|
| 25 | do i = 1, 10
|
|---|
| 26 | a = a+i
|
|---|
| 27 | end do
|
|---|
| 28 | !$omp end do
|
|---|
| 29 |
|
|---|
| 30 | !$omp single
|
|---|
| 31 | print*, "Sum is ", A
|
|---|
| 32 | !$omp end single
|
|---|
| 33 |
|
|---|
| 34 | !$omp end parallel
|
|---|
| 35 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.