File1: #include <stdio.h>\n#include <omp.h>\n#include <stdlib.h>\n#define N 100\n\nint main(){\n\n  int var[N];\n\n  for(int i=0; i<N; i++){\n    var[i]=0;\n  }\n\n  #pragma omp target map(tofrom:var[0:N]) device(0)\n    #pragma omp parallel for ordered\n    for (int i=1; i<N; i++){\n      #pragma omp ordered\n      {\n        var[i]=var[i-1]+1;\n      }\n    }\n\n  for(int i=0; i<N; i++){\n    if(var[i]!=i){\n      printf("Data Race Present");\n      return 0;\n    }\n  }\n\n  return 0;\n}\n
File2: program DRB155_missingordered_orig_gpu_no\n    use omp_lib\n    implicit none\n\n    integer :: var(100)\n    integer :: i\n\n    do i = 1, 100\n        var(i) = 1\n    end do\n\n    !$omp target map(tofrom:var) device(0)\n    !$omp parallel do ordered\n    do i = 2, 100\n        !$omp ordered\n        var(i) = var(i-1)+1\n        !$omp end ordered\n    end do\n    !$omp end parallel do\n    !$omp end target\n\n    do i = 1, 100\n        if (var(i)/=i) then\n            print*,"Data Race Present"\n        end if\n    end do\n\nend program