Undefined address/ Undefined variable

Undefined address/ Undefined variable


I got undefined variable for a vector for some reason. I am not using pointers or assigning any address to the variables. I did not allocate any dimension either. I am surprised it gave this error for such a small system. Eventually, I deleted that subroutine and wrote a similar one. This time, it is working but could you please let me know what causes undefined address in fortran? You can also give me reference/link on that?

Thank you,


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It would be very useful if you could post the code that exhibited the problem rather than leave others to spend their time speculating. A couple of ways of getting this message:

  1. referencing an unallocated allocatable array
  2. referencing an unspecified optional argument


Thank you for the reply. The first option can't be because that array was not allocatable. I allocated all the allocatable arrays. I have received the problem only after I defined that array.

I used implicit none and I defined the variable as real*8 variable(size). The size was defined as an integer before.I don't understand exactly what the second was is but I specified it at the beginning of the routine.

Seyhan Emre G.: You have not displayed any source code or exact error message numbers or text, and I do not think that any specific response can be given based on the vague description that you have provided.  Your description does not distinguish between variable declaration and variable definition. Please try to keep in mind that, unlike you, we have not seen even a piece of the program.

Leave a Comment

Please sign in to add a comment. Not a member? Join today