File1: #include <stdio.h>\n#include <omp.h>\n#define N 100\n\nint var = 0;\n\nint main(){\n  #pragma omp target map(tofrom:var) device(0)\n  #pragma omp teams distribute parallel for reduction(+:var)\n  for (int i=0; i<N; i++){\n    var++;\n  }\n\n  printf("%d\n",var);\n  return 0;\n}\n
File2: program DRB145_atomiccritical_orig_gpu_no\n    use omp_lib\n    implicit none\n\n    integer :: var, i\n    var = 0\n\n    !$omp target map(tofrom:var) device(0)\n    !$omp teams distribute parallel do reduction(+:var)\n        do i = 1, 200\n            if (var<101) then\n                var = var+1\n            end if\n        end do\n    !$omp end teams distribute parallel do\n    !$omp end target\n\nend program