File1: #include <stdio.h>\nint main()\n{\n  int i,error;\n  int len = 1000;\n  int a[len], b=5;\n\n  for (i=0; i<len; i++)\n    a[i]= i;\n \n#pragma omp parallel shared(b, error) \n  {\n#pragma omp for nowait\n    for(i = 0; i < len; i++)\n      a[i] = b + a[i]*5;\n\n#pragma omp single\n    error = a[9] + 1;\n  }\n\n  printf ("error = %d\n", error);\n  return 0;\n}  \n
File2: program DRB013_nowait_orig_yes\n    use omp_lib\n    implicit none\n\n    integer i, error, len, b\n    integer, dimension (:), allocatable :: a\n\n    b = 5\n    len = 1000\n\n    allocate (a(len))\n\n    do i = 1, len\n        a(i) = i\n    end do\n\n    !$omp parallel shared(b, error)\n        !$omp parallel\n            !$omp do\n            do i = 1, len\n                a(i) = b + a(i)*5\n            end do\n            !$omp end do nowait\n            !$omp single\n            error = a(10) + 1;\n            !$omp end single\n        !$omp end parallel\n    !$omp end parallel\n\n    print*,"error =",error\n\n    deallocate(a)\nend program