cpp: #include <stdio.h>\n#include <stdlib.h>\n\nvoid load_from_input(int *data, int size)\n{\n  for(int i = 0; i < size; i++) {\n    data[i] = size-i;\n  } \n}\n\n\nint main(int argc, char *argv[]) {\n\n  int *A; \n  int N = 100;\n\n  if (argc>1)\n    N = atoi(argv[1]);\n\n  A = (int*) malloc(sizeof(int) * N);\n\n  load_from_input(A, N);\n  \n#pragma omp parallel for shared(A)\n  for(int i = 0; i < N; i++) {\n    A[i] = i;\n    if (N > 10000) \n    { \n      A[0] = 1; \n    }\n  }\n\n  free(A);\n  return 0;\n}\n
fortran: program DRB171_input_dependence_var_yes\n    use omp_lib\n    implicit none\n\n    integer :: i, N, argCount, allocStatus, rdErr, ix\n    character(len=80), dimension(:), allocatable :: args\n    integer, dimension(:), allocatable :: a\n\n    N = 100\n\n    argCount = command_argument_count()\n    if (argCount == 0) then\n        write (*,'(a)') "No command line arguments provided."\n    end if\n\n    allocate(args(argCount), stat=allocStatus)\n    if (allocStatus > 0) then\n        write (*,'(a)') "Allocation error, program terminated."\n        stop\n    end if\n\n    do ix = 1, argCount\n        call get_command_argument(ix,args(ix))\n    end do\n\n    if (argCount >= 1) then\n        read (args(1), '(i10)', iostat=rdErr) N\n        if (rdErr /= 0 ) then\n            write (*,'(a)') "Error, invalid integer value."\n        end if\n    end if\n\n    allocate (a(N))\n\n    call load_from_input(a, N)\n\n    \n    !$omp parallel do shared(a)\n    do i = 1, N\n        a(i) = i\n        if(N .gt. 10000) a(1) = 1\n    end do\n    !$omp end parallel do\n\nend program