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
65 lines
2.2 KiB
Fortran
65 lines
2.2 KiB
Fortran
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=50
|
|
! OpenMP Version 5.0
|
|
! 2.10.1 use_device_ptr clause
|
|
! List item in USE_DEVICE_PTR clause must not be structure element.
|
|
! List item in USE_DEVICE_PTR clause must be of type C_PTR.
|
|
! List items that appear in a use_device_ptr clause can not appear in
|
|
! use_device_addr clause.
|
|
! Same list item can not be present multiple times or in multipe
|
|
! USE_DEVICE_PTR clauses.
|
|
|
|
subroutine omp_target_data
|
|
use iso_c_binding
|
|
integer :: a(1024)
|
|
type(C_PTR) :: b
|
|
integer, pointer :: arrayB
|
|
type my_type
|
|
type(C_PTR) :: my_cptr
|
|
end type my_type
|
|
|
|
type(my_type) :: my_var
|
|
a = 1
|
|
|
|
!ERROR: A variable that is part of another variable cannot appear on the USE_DEVICE_PTR clause
|
|
!$omp target data map(tofrom: a, arrayB) use_device_ptr(my_var%my_cptr)
|
|
allocate(arrayB)
|
|
call c_f_pointer(my_var%my_cptr, arrayB)
|
|
a = arrayB
|
|
!$omp end target data
|
|
|
|
!WARNING: Use of non-C_PTR type 'a' in USE_DEVICE_PTR is deprecated, use USE_DEVICE_ADDR instead [-Wopenmp-usage]
|
|
!$omp target data map(tofrom: a) use_device_ptr(a)
|
|
a = 2
|
|
!$omp end target data
|
|
|
|
!ERROR: List item 'b' present at multiple USE_DEVICE_PTR clauses
|
|
!$omp target data map(tofrom: a, arrayB) use_device_ptr(b) use_device_ptr(b)
|
|
allocate(arrayB)
|
|
call c_f_pointer(b, arrayB)
|
|
a = arrayB
|
|
!$omp end target data
|
|
|
|
!ERROR: List item 'b' present at multiple USE_DEVICE_PTR clauses
|
|
!$omp target data map(tofrom: a, arrayB) use_device_ptr(b,b)
|
|
allocate(arrayB)
|
|
call c_f_pointer(b, arrayB)
|
|
a = arrayB
|
|
!$omp end target data
|
|
|
|
!ERROR: Variable 'b' may not appear on both USE_DEVICE_PTR and USE_DEVICE_ADDR clauses on a TARGET DATA construct
|
|
!$omp target data map(tofrom: a, arrayB) use_device_addr(b) use_device_ptr(b)
|
|
allocate(arrayB)
|
|
call c_f_pointer(b, arrayB)
|
|
a = arrayB
|
|
!$omp end target data
|
|
|
|
!ERROR: Variable 'b' may not appear on both USE_DEVICE_PTR and USE_DEVICE_ADDR clauses on a TARGET DATA construct
|
|
!$omp target data map(tofrom: a, arrayB) use_device_ptr(b) use_device_addr(b)
|
|
allocate(arrayB)
|
|
call c_f_pointer(b, arrayB)
|
|
a = arrayB
|
|
!$omp end target data
|
|
|
|
end subroutine omp_target_data
|
|
|