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.1 KB
|
| Rev | Line | |
|---|
| [e3f356c] | 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 scheduling constraints prohibit a thread in the team from executing
|
|---|
| 9 | !!a new task that modifies tp while another such task region tied to
|
|---|
| 10 | !!the same thread is suspended. Therefore, the value written will
|
|---|
| 11 | !!persist across the task scheduling point.
|
|---|
| 12 | !!No Data Race
|
|---|
| 13 |
|
|---|
| 14 | module DRB128
|
|---|
| 15 | integer :: tp, var
|
|---|
| 16 | !$omp threadprivate(tp)
|
|---|
| 17 | contains
|
|---|
| 18 | subroutine foo
|
|---|
| 19 | !$omp task
|
|---|
| 20 | !$omp task
|
|---|
| 21 | tp = 1
|
|---|
| 22 | !$omp task
|
|---|
| 23 | !$omp end task
|
|---|
| 24 | var = tp
|
|---|
| 25 | !$omp end task
|
|---|
| 26 | !$omp end task
|
|---|
| 27 | end subroutine
|
|---|
| 28 | end module
|
|---|
| 29 |
|
|---|
| 30 | program DRB128_tasking_threadprivate2_orig_no
|
|---|
| 31 | use omp_lib
|
|---|
| 32 | use DRB128
|
|---|
| 33 | implicit none
|
|---|
| 34 |
|
|---|
| 35 | call foo()
|
|---|
| 36 | print*,var
|
|---|
| 37 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.