Skip to content

Commit

Permalink
Initialize values in OpenMP values checking routines
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPincus committed Apr 30, 2021
1 parent aca56b7 commit f6cc7c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rte/mo_rte_util_array.F90
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ logical function any_vals_less_than_3D(array, check_value)
dim1 = size(array,1)
dim2 = size(array,2)
dim3 = size(array,3)
minValue = array(1,1,1) ! initialize to some value
minValue = check_value + epsilon(check_value) ! initialize to some value
!$omp target teams map(to:array) &
!$omp defaultmap(tofrom:scalar) reduction(min:minValue)
!$omp distribute parallel do simd reduction(min:minValue)
Expand Down Expand Up @@ -207,8 +207,8 @@ logical function any_vals_outside_3D(array, checkMin, checkMax)
dim1 = size(array,1)
dim2 = size(array,2)
dim3 = size(array,3)
minValue = array(1,1,1) ! initialize to some value
maxValue = array(1,1,1) ! initialize to some value
minValue = checkMin + epsilon(checkMin) ! initialize to some value
maxValue = checkMax - epsilon(checkMax) ! initialize to some value
!$omp target teams map(to:array) &
!$omp defaultmap(tofrom:scalar) reduction(min:minValue) reduction(max:maxValue)
!$omp distribute parallel do simd reduction(min:minValue) reduction(max:maxValue)
Expand Down Expand Up @@ -370,7 +370,7 @@ subroutine zero_array_1D(ni, array) bind(C, name="zero_array_1D")
integer :: i
! -----------------------
!$acc parallel loop copyout(array)
!$omp target teams distribute parallel do simd map(from:array)
!$omp target teams distribute parallel do simd map(from:array)
do i = 1, ni
array(i) = 0.0_wp
end do
Expand Down

0 comments on commit f6cc7c7

Please sign in to comment.