cpp: #include <stdio.h>\n#if (_OPENMP<201511)\n#error "An OpenMP 4.5 compiler is needed to compile this test."\n#endif\n#include <stdio.h>\nint a[100][100];\nint main()\n{\n  int i, j;\n#pragma omp parallel for ordered(2)\n  for (i = 0; i < 100; i++)\n    for (j = 0; j < 100; j++)\n    {\n      a[i][j] = a[i][j] + 1;\n#pragma omp ordered depend(sink:i-1,j) depend (sink:i,j-1)\n      printf ("test i=%d j=%d\n",i,j);\n#pragma omp ordered depend(source)\n    }\n  return 0;\n}\n\n
fortran: program DRB094_doall2_ordered_orig_no\n    use omp_lib\n    use DRB094\n    implicit none\n\n    integer :: len, i, j\n    len = 100\n\n    allocate (a(len,len))\n\n    !$omp parallel do ordered(2)\n    do i = 1, len\n        do j = 1, len\n            a(i,j) = a(i,j)+1\n            !$omp ordered depend(sink:i-1,j) depend (sink:i,j-1)\n            print*,'test i =',i,'  j =',j\n            !$omp ordered depend(source)\n        end do\n    end do\n    !$omp end parallel do\n\n\nend program