I have written a program & threaded it with openMP. Now program runs absolutely well when it is run on single thread. However it doesnot run on mutithread, actually goes into infinite loop. I have Intel fortran compiler attached to Visual Studio 2005. Now when I debugged the program, it gives that some of the array pointers as 'UNDEFINED ADDRESS'.
My code goes something like this:
DO I=1, COUNTER
!$OMP PARALLEL DO NUM_THREADS(1) PRIVATE(VARIABLE_LIST) COPYIN(L,GRID)
DO J=1, GRID(L)
Here statements starting with > mark are the breakpoints.
Now problem is that at first break point, the value of L is as expected. However, when control reaches the second breakpoint,there value of L changes and it becomes so large that it completely goes outofBound.
Can somebody tell me why is it so?