0

All,

I am working on estimation of a physical variable for my research and I ran into an odd issue. I already know the roots and differences between bus error and segmentation fault. But the problem is that, when I am printing a four dimension variable like this somewhere:

PRINT *, RH(1,1,1,1)

I am able to get reasonable value. But, again, the same command in a loop leads to an error. Sometimes it shows me bus error and sometimes SEG one.

  • The variable has never been modified from the first PRINT command until the second one.
  • I am running this on a cluster machine with 32GB RAM. So, RAM capacity should suffice.
  • RH is defined as REAL*8 :: RH(IIPAR,JJPAR,LLPAR,25) !RH

I would be thankful if someone could help on this.

Best, Amir

  • 2
    Try recompiling your code with all run time checks turned on and rerunning. What does that tell you? Almost certainly you've written to memory that you shouldn't have, but without a full program it's impossible to tell. And real*8 isn't, and has never been, standard Fortran, please learn about kinds - see e.g. http://stackoverflow.com/questions/838310/fortran-90-kind-parameter – Ian Bush Mar 31 '17 at 20:50
  • Thanks Ian, I recompiled with -heap-arrays -g -traceback -check bounds – Amir_Loves_Atmosphere Apr 03 '17 at 16:25
  • Other flags are: ifort -w -O2 -auto -noalign -convert big_endian – Amir_Loves_Atmosphere Apr 03 '17 at 16:25
  • But, it doesn't report anything. SEG happened in MAIN_ Line 1 – Amir_Loves_Atmosphere Apr 03 '17 at 16:25
  • 1
    Please edit your question with more info, especially some complete compilable code. Read [ask] and [mcve]. It is important that you edit the question, because it is now hidden among old inactive posts. – Vladimir F Героям слава Apr 04 '17 at 14:08

0 Answers0