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

Undefined address/ Undefined variable

Seyhan_Emre_G_
Beginner
2,110 Views

Hello,

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,

Emre

0 Kudos
3 Replies
Simon_Geard
New Contributor I
2,109 Views

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

Simon

0 Kudos
Seyhan_Emre_G_
Beginner
2,109 Views

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.

0 Kudos
mecej4
Honored Contributor III
2,109 Views

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.

0 Kudos
Reply