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?