brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 79ded3e Raw
61 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang -fopenmp2! OpenMP Version 4.53! 2.7.1 Ordered Clause4 5program omp_doOrdered6  integer:: i,j7  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.8  !$omp do ordered(3)9  do i = 1,1010    do j = 1, 1011      print *, "hello"12    end do13  end do14  !$omp end do15 16  do i = 1,1017    do j = 1, 1018      !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.19      !$omp do ordered(2)20      do k = 1, 1021        print *, "hello"22      end do23      !$omp end do24    end do25  end do26 27  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.28  !$omp do ordered(2)29  do i = 1,1030    !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter31    !$omp ordered32    do j = 1, 1033       print *, "hello"34    end do35    !$omp end ordered36  end do37  !$omp end do38 39  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.40  !$omp do collapse(1) ordered(3)41  do i = 1,1042    do j = 1, 1043       print *, "hello"44    end do45  end do46  !$omp end do47 48  !$omp parallel num_threads(4)49  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.50  !$omp do ordered(2) collapse(1)51  do i = 1,1052    !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter53    !$omp ordered54    do j = 1, 1055       print *, "hello"56    end do57    !$omp end ordered58  end do59  !$omp end parallel60end program omp_doOrdered61