File1: #include <stdio.h>\n#include <stdlib.h>\n#include <omp.h>\n#define N 100\n#define C 8\n\n\nint a;\nint b[C];\nint c[C];\nint temp[C];\n\nint main(){\n  for(int i=0; i<C; i++){\n    b[i]=0;\n    c[i]=2;\n    temp[i]=0;\n  }\n  a=2;\n\n  #pragma omp target map(tofrom:b[0:C]) map(to:c[0:C],temp[0:C],a) device(0)\n  #pragma omp parallel\n  {\n    for(int i=0; i<N ;i++){\n      #pragma omp for\n      for(int i=0; i<C; i++){\n        temp[i] = b[i] + c[i];\n      }\n\n      #pragma omp for\n      for(int i=C-1; i>=0; i--){\n        b[i] = temp[i] * a;\n      }\n    }\n  }\n\n  int val = 0;\n\n  for(int i=0; i<N; i++){\n    val = val + 2;\n    val = val * 2;\n  }\n\n  for(int i=0; i<C; i++){\n    if(b[i]!=val){\n      printf("expected %d real %d \n",val, b[i]);\n      return 0;\n    }\n  }\n\n  return 0;\n}\n
File2: program DRB159_nobarrier_orig_gpu_no\n    use omp_lib\n    use DRB159\n    implicit none\n\n    do i = 1, 8\n        b(i) = 0\n        c(i) = 2\n        temp(i) = 0\n    end do\n\n    a = 2\n\n    !$omp target map(tofrom:b) map(to:c,temp,a) device(0)\n    !$omp parallel\n    do i = 1, 100\n        !$omp do\n        do j = 1, 8\n            temp(j) = b(j)+c(j)\n        end do\n        !$omp end do\n\n        !$omp do\n        do j = 8, 1, k-1\n            b(j) = temp(j)*a\n        end do\n        !$omp end do\n    end do\n    !$omp end parallel\n    !$omp end target\n\n    do i = 1, 100\n        val = val+2\n        val = val*2\n    end do\n\n    do i = 1, 8\n        if (val /= b(i)) then\n            print*,b(i),val\n        end if\n    end do\n\nend program