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

compiler option to map the relative addresses of arguments passed in the subroutines

vtuneuser
Beginner
536 Views

I am trying to understand a fortran program that has many multidimensional arrays passed as subroutines' parameters. for example,

subroutine s1

integer nx,ny,nz

real *8 a(5,nx,ny,nz), b(5,nx,ny,nz), c(5,nx,ny,nz),d (5,nx,ny,nz)

real *8 e(5,nx,ny,nz), f(5,nx,ny,nz), g(5,nx,ny,nz), h(5,nx,ny,nz)

:

call s2 (a,b,c,d,e,f,g,h,nx,ny,nz)

:

end

subroutine s2 (a,b,c,d,e,f,g,h,nx,ny,nz)

real *8 a(5,nx,ny,nz), b(5,nx,ny,nz), c(5,nx,ny,nz),d (5,nx,ny,nz)

real *8 e(5,nx,ny,nz), f(5,nx,ny,nz), g(5,nx,ny,nz), h(5,nx,ny,nz)

:

:

end

Is there any compiler option that can print theaddresses of these arrays on the stack relative to the stack pointer or the size of the arrays? nx, ny, nz areintegers read in from a input file.

Thanks.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
536 Views
There's no option to do this automatically. I sometimes put in prints of LOC(var) if I'm interested in addresses. You can also type in variable names in the Memory window in the debugger.
0 Kudos
Reply