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:
993 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 | !Two-dimensional array computation:
|
|---|
| 9 | !collapse(2) is used to associate two loops with omp for.
|
|---|
| 10 | !The corresponding loop iteration variables are private. No data race pairs.
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | module DRB093
|
|---|
| 14 | implicit none
|
|---|
| 15 | integer, dimension(:,:), allocatable :: a
|
|---|
| 16 | end module
|
|---|
| 17 |
|
|---|
| 18 | program DRB093_doall2_collapse_orig_no
|
|---|
| 19 | use omp_lib
|
|---|
| 20 | use DRB093
|
|---|
| 21 | implicit none
|
|---|
| 22 |
|
|---|
| 23 | integer :: len, i, j
|
|---|
| 24 | len = 100
|
|---|
| 25 |
|
|---|
| 26 | allocate (a(len,len))
|
|---|
| 27 |
|
|---|
| 28 | !$omp parallel do collapse(2)
|
|---|
| 29 | do i = 1, len
|
|---|
| 30 | do j = 1, len
|
|---|
| 31 | a(i,j) = a(i,j)+1
|
|---|
| 32 | end do
|
|---|
| 33 | end do
|
|---|
| 34 | !$omp end parallel do
|
|---|
| 35 | end program
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.