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.4 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 | !There is no completion restraint on the second child task. Hence, immediately after the first
|
|---|
| 9 | !taskwait it is unsafe to access the y variable since the second child task may still be
|
|---|
| 10 | !executing.
|
|---|
| 11 | !Data Race at y@34:8 and y@41:23
|
|---|
| 12 |
|
|---|
| 13 | program DRB131_taskdep4_orig_yes_omp_45
|
|---|
| 14 | use omp_lib
|
|---|
| 15 | implicit none
|
|---|
| 16 |
|
|---|
| 17 | !$omp parallel
|
|---|
| 18 | !$omp single
|
|---|
| 19 | call foo()
|
|---|
| 20 | !$omp end single
|
|---|
| 21 | !$omp end parallel
|
|---|
| 22 | contains
|
|---|
| 23 | subroutine foo()
|
|---|
| 24 | implicit none
|
|---|
| 25 | integer :: x, y
|
|---|
| 26 | x = 0
|
|---|
| 27 | y = 2
|
|---|
| 28 |
|
|---|
| 29 | !$omp task depend(inout: x) shared(x)
|
|---|
| 30 | x = x+1 !!1st Child Task
|
|---|
| 31 | !$omp end task
|
|---|
| 32 |
|
|---|
| 33 | !$omp task shared(y)
|
|---|
| 34 | y = y-1 !!2nd child task
|
|---|
| 35 | !$omp end task
|
|---|
| 36 |
|
|---|
| 37 | !$omp task depend(in: x) if(.FALSE.) !!1st taskwait
|
|---|
| 38 | !$omp end task
|
|---|
| 39 |
|
|---|
| 40 | print*, "x=", x
|
|---|
| 41 | print*, "y=", y
|
|---|
| 42 |
|
|---|
| 43 | !$omp taskwait !!2nd taskwait
|
|---|
| 44 | end subroutine foo
|
|---|
| 45 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.