CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
217 lines
5.5 KiB
Fortran
217 lines
5.5 KiB
Fortran
! RUN: %python %S/../test_errors.py %s %flang -fopenacc
|
|
|
|
! Check OpenACC reduction validity.
|
|
|
|
program openacc_reduction_validity
|
|
implicit none
|
|
|
|
integer :: i
|
|
real :: r
|
|
complex :: c
|
|
logical :: l
|
|
|
|
!$acc parallel reduction(+:i)
|
|
!$acc end parallel
|
|
|
|
!WARNING: The minus '-' reduction operator is non-standard and is treated as '+' [-Wopenacc-usage]
|
|
!$acc parallel reduction(-:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(*:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(min:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(max:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(iand:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(ior:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(ieor:i)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for integer type
|
|
!$acc parallel reduction(.and.:i)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for integer type
|
|
!$acc parallel reduction(.or.:i)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for integer type
|
|
!$acc parallel reduction(.eqv.:i)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for integer type
|
|
!$acc parallel reduction(.neqv.:i)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(+:r)
|
|
!$acc end parallel
|
|
|
|
!WARNING: The minus '-' reduction operator is non-standard and is treated as '+' [-Wopenacc-usage]
|
|
!$acc parallel reduction(-:r)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(*:r)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(min:r)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(max:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(iand:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(ior:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(ieor:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(.and.:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(.or.:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(.eqv.:r)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for real type
|
|
!$acc parallel reduction(.neqv.:r)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(+:c)
|
|
!$acc end parallel
|
|
|
|
!WARNING: The minus '-' reduction operator is non-standard and is treated as '+' [-Wopenacc-usage]
|
|
!$acc parallel reduction(-:c)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(*:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(min:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(max:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(iand:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(ior:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(ieor:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(.and.:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(.or.:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(.eqv.:c)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for complex type
|
|
!$acc parallel reduction(.neqv.:c)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(.and.:l)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(.or.:l)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(.eqv.:l)
|
|
!$acc end parallel
|
|
|
|
!$acc parallel reduction(.neqv.:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(+:l)
|
|
!$acc end parallel
|
|
|
|
!WARNING: The minus '-' reduction operator is non-standard and is treated as '+' [-Wopenacc-usage]
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(-:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(*:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(min:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(max:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(iand:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(ior:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: reduction operator not supported for logical type
|
|
!$acc parallel reduction(ieor:l)
|
|
!$acc end parallel
|
|
|
|
!ERROR: No explicit type declared for 'xyz'
|
|
!$acc parallel reduction(+:xyz)
|
|
!$acc end parallel
|
|
|
|
|
|
end program
|
|
|
|
subroutine sum()
|
|
!ERROR: 'sum' is already declared in this scoping unit
|
|
integer :: i,sum
|
|
sum = 0
|
|
!$acc parallel
|
|
!ERROR: Only variables are allowed in data clauses on the LOOP directive
|
|
!$acc loop independent gang reduction(+:sum)
|
|
do i=1,10
|
|
sum = sum + i
|
|
enddo
|
|
!$acc end parallel
|
|
end subroutine
|
|
|
|
subroutine reduce()
|
|
integer :: red = 0, ii
|
|
!$acc parallel loop default(none) reduction(+:red)
|
|
do ii = 1, 10
|
|
red = red + ii
|
|
end do
|
|
!$acc end parallel
|
|
end subroutine
|