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
87 lines
3.0 KiB
Fortran
87 lines
3.0 KiB
Fortran
! REQUIRES: openmp_runtime
|
|
|
|
! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=51
|
|
|
|
! Check OpenMP 5.0 - 2.17.8 flush Construct
|
|
! Restriction -
|
|
! If memory-order-clause is release, acquire, or acq_rel, list items must not be specified on the flush directive.
|
|
|
|
use omp_lib
|
|
implicit none
|
|
|
|
TYPE someStruct
|
|
REAL :: rr
|
|
end TYPE
|
|
integer :: i, a, b
|
|
real, DIMENSION(10) :: array
|
|
TYPE(someStruct) :: structObj
|
|
|
|
a = 1.0
|
|
!$omp parallel num_threads(4)
|
|
!No list flushes all.
|
|
if (omp_get_thread_num() == 1) THEN
|
|
!$omp flush
|
|
END IF
|
|
|
|
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
|
!Only memory-order-clauses.
|
|
if (omp_get_thread_num() == 1) THEN
|
|
! Not allowed clauses.
|
|
!$omp flush seq_cst
|
|
!ERROR: RELAXED clause is not allowed on the FLUSH directive
|
|
!$omp flush relaxed
|
|
|
|
! Not allowed more than once.
|
|
!ERROR: At most one ACQ_REL clause can appear on the FLUSH directive
|
|
!$omp flush acq_rel acq_rel
|
|
!ERROR: At most one RELEASE clause can appear on the FLUSH directive
|
|
!$omp flush release release
|
|
!ERROR: At most one ACQUIRE clause can appear on the FLUSH directive
|
|
!$omp flush acquire acquire
|
|
|
|
! Mix of allowed and not allowed.
|
|
!$omp flush seq_cst acquire
|
|
END IF
|
|
|
|
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
|
! No memory-order-clause only list-items.
|
|
if (omp_get_thread_num() == 2) THEN
|
|
!$omp flush (a)
|
|
!$omp flush (i, a, b)
|
|
!$omp flush (array, structObj%rr)
|
|
! Too many flush with repeating list items.
|
|
!$omp flush (i, a, b, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, b, b, b, b)
|
|
!ERROR: No explicit type declared for 'notpresentitem'
|
|
!$omp flush (notPresentItem)
|
|
END IF
|
|
|
|
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
|
if (omp_get_thread_num() == 3) THEN
|
|
!ERROR: If memory-order-clause is RELEASE, ACQUIRE, or ACQ_REL, list items must not be specified on the FLUSH directive
|
|
!$omp flush acq_rel (array)
|
|
!ERROR: If memory-order-clause is RELEASE, ACQUIRE, or ACQ_REL, list items must not be specified on the FLUSH directive
|
|
!$omp flush acq_rel (array, a, i)
|
|
|
|
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
|
!ERROR: If memory-order-clause is RELEASE, ACQUIRE, or ACQ_REL, list items must not be specified on the FLUSH directive
|
|
!$omp flush release (array)
|
|
!ERROR: If memory-order-clause is RELEASE, ACQUIRE, or ACQ_REL, list items must not be specified on the FLUSH directive
|
|
!$omp flush release (array, a)
|
|
|
|
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
|
!ERROR: If memory-order-clause is RELEASE, ACQUIRE, or ACQ_REL, list items must not be specified on the FLUSH directive
|
|
!$omp flush acquire (array)
|
|
!ERROR: If memory-order-clause is RELEASE, ACQUIRE, or ACQ_REL, list items must not be specified on the FLUSH directive
|
|
!$omp flush acquire (array, a, structObj%rr)
|
|
END IF
|
|
!$omp end parallel
|
|
|
|
!$omp parallel num_threads(4)
|
|
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
|
!$omp master
|
|
!$omp flush (array)
|
|
!$omp end master
|
|
!$omp end parallel
|
|
end
|
|
|