Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26736 Discussions

Module variable is shown to be undefined in the "watch" window

dimdol10
New Contributor I
85 Views

Hello,

I'm using the intel parallel studio (XE2018 update 1 cluster edition).

I found that a variable globally defined in a module is shown as undefined variable in the "watch" window, as depicted below, even though the module is declared as "USE" in the subroutine.

test_fig.jpg

I attached a sample code illustrating this issue.

If I use this variable in the subroutine, then the "watch" window shows the variable properly. But, if it is not used explicitly, it is declared as undefined variable.

In my opinion, even though the variable ("m_tot" in the attached code) is not explicitly used in the subroutine, it needs to be a defined variable since the subroutine use the module where the variable is defined.

I hope to get some comments on this.

Thanks.

Below is the sample code.

===========================================================

      MODULE test_module
     
      DOUBLE PRECISION M_TOT
   
      END MODULE

      PROGRAM Module_test
     
      USE test_module
     
      INTEGER a,b,c
     
      a=10
      b=11
      c = a + b  
               
      continue
             
      END

 

 

0 Kudos
1 Reply
andrew_4619
Honored Contributor I
85 Views

The debugger only shows module variables that are actually used in a subprogram you can explicitly watch modulename::varname if you want to. IMO to show all module vars would in many cases be too much information.

Reply