CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   PSLDLT error (http://www.cfd-online.com/Forums/main/6013-psldlt-error.html)

m malik April 21, 2003 10:33

PSLDLT error
 
Running Fortran 90 code on SGI, I sometimes get the following message: PSLDLT Error: Index out of range (-1) and the program execution terminates. Can anyone familiar with this error explain me what is it? Thanks

Praveen April 21, 2003 11:11

Re: PSLDLT error
 
Thats simple. You probably have some arrays and you are exceeding the array limits, i.e., going below IMIN which is usually 1, or going above IMAX.

m malik April 21, 2003 11:21

Re: PSLDLT error
 
Thanks, Praveen. That doesn't seem to be the problem because I am using dynamic memmory allocation for all the arrays and matrices. Or, you mean some other thing! -Malik

Praveen April 21, 2003 11:54

Re: PSLDLT error
 
Its not a problem with memory allocation. You are probably trying to access the array beyond its limits. This usually happens if you have some loop, look for things like

for i=1 to imax

and inside you might be trying to access array(i-1) or array(i+1)

endfor


Praveen April 21, 2003 12:00

Re: PSLDLT error
 
This can be quite a headache sometimes. If by mistake you try to access ARRAY(0) or ARRAY(imax+1) which are out of the range, then some compilers just dont give any warning. This is terrible because you wont even know that there is a mistake. I once discovered this problem while tring to run my code on SGI; it did not give any error on a linux pc. I think there are compilation flags which will check for array bounds. There is a flag -fbounds-check on g77. Check your man pages.


All times are GMT -4. The time now is 23:17.