File1: #include <stdio.h> \nint main(int argc, char* argv[])\n{\n  int i;\n  int len = 1000;\n  int a[1000];\n\n  for (i=0; i<len; i++)\n    a[i]= i;\n\n#pragma omp target map(a[0:len])\n#pragma omp parallel for\n  for (i=0;i< len -1 ;i++)\n    a[i]=a[i+1]+1;\n\n  return 0;\n}\n
File2: program DRB026_targetparallelfor_orig_yes\n    use omp_lib\n    implicit none\n\n    integer :: i, len\n    integer, dimension(:), allocatable :: a\n\n    len = 1000\n\n    allocate (a(len))\n\n    do i = 1, len\n        a(i) = i\n    end do\n\n    !$omp target map(a)\n        !$omp parallel do\n        do i = 1, len-1\n            a(i) = a(i+1) + 1\n        end do\n        !$omp end parallel do\n    !$omp end target\n\n    do i = 1, len\n        write(6,*) 'Values for i and a(i) are:', i, a(i)\n    end do\n\n    deallocate(a)\nend program