Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29246 Discussions

Inconsistent vector Problem fortran 9.0 linux

24689753x
Beginner
548 Views
I have written a subroutine using intel fc 9.0 for linux

in a 3 loop section I am setting a value for each location of a vector , lines below i print the values previously set and these are differrent (that occurs with large vectors) with vector of 10 000 or less seems to be ok with vectors of hundrens of thousands it is ok only in the last positions

I think is a memory or stack problem for big problems I was having seg fault , then i set ulimit -s unlimited and works but with the errors i just described

How come this print soemthing different ?

J=1
ia(1)=1
DO I=1,nz*nx*ny
DO K=1,7
IF (JCOEFF(I,K) .NE. -1)THEN
a(J)=COEFF(I,K)
ja(J)=JCOEFF(I,K)
print *,J, a(J) // J from 1 to 700 000 f.e.
J=J+1
ENDIF
ia(I+1)=J
ENDDO
ENDDO

DO p=1, J -1
print *, p,a(p) // p from 1 to 700 000
ENDDO

the 2 lines in red do basically the same , nothing in between, the values are different form K =1 , 60000+- , any idea ,explanation ?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
548 Views
Difficult if not impossible to say from a code snippet. The only thing that comes to mind is illegal aliasing, but it could be something else. Please send a buildable and runnable example to Intel Premier Support and we'll take a look.
0 Kudos
Reply