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
80 lines
2.5 KiB
Fortran
80 lines
2.5 KiB
Fortran
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -Werror -pedantic
|
|
|
|
! OpenMP Version 5.0
|
|
! Check OpenMP construct validity for the following directives:
|
|
! 2.12.5 Target Construct
|
|
|
|
program main
|
|
integer :: i, j, N = 10, n1, n2, res(100)
|
|
real :: a, arrayA(512), arrayB(512), ai(10)
|
|
real, allocatable :: B(:)
|
|
|
|
!$omp target
|
|
!PORTABILITY: If TARGET UPDATE directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!$omp target update from(arrayA) to(arrayB)
|
|
do i = 1, 512
|
|
arrayA(i) = arrayB(i)
|
|
end do
|
|
!$omp end target
|
|
|
|
!$omp parallel
|
|
!$omp target
|
|
!$omp parallel
|
|
!PORTABILITY: If TARGET UPDATE directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!$omp target update from(arrayA) to(arrayB)
|
|
do i = 1, 512
|
|
arrayA(i) = arrayB(i)
|
|
end do
|
|
!$omp end parallel
|
|
!$omp end target
|
|
!$omp end parallel
|
|
|
|
!$omp target
|
|
!PORTABILITY: If TARGET DATA directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!$omp target data map(to: a)
|
|
do i = 1, N
|
|
a = 3.14
|
|
end do
|
|
!$omp end target data
|
|
!$omp end target
|
|
|
|
allocate(B(N))
|
|
!$omp target
|
|
!PORTABILITY: If TARGET ENTER DATA directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!$omp target enter data map(alloc:B)
|
|
!$omp end target
|
|
|
|
!$omp target
|
|
!PORTABILITY: If TARGET EXIT DATA directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!$omp target exit data map(delete:B)
|
|
!$omp end target
|
|
deallocate(B)
|
|
|
|
n1 = 10
|
|
n2 = 10
|
|
!$omp target teams map(to:a)
|
|
!PORTABILITY: If TARGET DATA directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!ERROR: Only `DISTRIBUTE`, `PARALLEL`, or `LOOP` regions are allowed to be strictly nested inside `TEAMS` region.
|
|
!$omp target data map(n1,n2)
|
|
do i=1, n1
|
|
do j=1, n2
|
|
res((i-1)*10+j) = i*j
|
|
end do
|
|
end do
|
|
!$omp end target data
|
|
!$omp end target teams
|
|
|
|
!$omp target teams map(to:a) map(from:n1,n2)
|
|
!PORTABILITY: If TARGET TEAMS DISTRIBUTE PARALLEL DO directive is nested inside TARGET region, the behaviour is unspecified [-Wopenmp-usage]
|
|
!ERROR: Only `DISTRIBUTE`, `PARALLEL`, or `LOOP` regions are allowed to be strictly nested inside `TEAMS` region.
|
|
!$omp target teams distribute parallel do
|
|
do i=1, n1
|
|
do j=1, n2
|
|
res((i-1)*10+j) = i*j
|
|
end do
|
|
end do
|
|
!$omp end target teams distribute parallel do
|
|
!$omp end target teams
|
|
|
|
end program main
|