Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 Discussions

How can you view FORTRAN arrays of variable dimension?

Tony_Garratt
Beginner
630 Views

I am using FORTRAN 9.1 and VS 2003 .net and debugging some FORTRAN.

In the watch or locals window of visual studio I can expand arrays to see all elements for arrays that are have a hardwired dimension. But for arrays that have variable dimension (the size is passed into the FORTRAN subroutine as an integer) I cannot see the array elements - and in fact VS doesnt seem to release that its an array at all.

Is this a known issue or do I need to install a service pack?

Thanks.

Tony

0 Kudos
2 Replies
Steven_L_Intel1
Employee
630 Views

Well, that's odd. You mean you have something like this?

subroutine sub (a,n)
real a(n)

I just tried an experiment and I could see the array, though not when I first stepped into the routine when looking at Locals. I could however type the array name into the Watch window and it found it.

If you have an array dimensioned as (*), then what you have to do is enter a(1:10) or something like that in the watch window, as otherwise all you get is one element.

0 Kudos
Tony_Garratt
Beginner
630 Views

Thanks Steve.

Ihave managed to fix it! What happened is that the intel expression evaluator was not installed. On a new PC, I had created a VS project that was producing just a FORTRAN lib for a C++ to link against. In VS, "hovering" over variables in the debugger didnt work and I could not see variable dimension arrays in FORTRAN as actual arrays.

Ithen created a new FORTRAN project - a console .exe - and this time VS asked me if I wanted to install the expression evaluator. I said yes and then rebooted.

After that, "hovering" worked in the debugger and I could also see variable dimension FORTRAN arrays properly.

I didnt install VS and Intel FORTRAN on the PC - our IT person did, but the PC was certainly in a state where the evaluator was not installed and this was causing me my problems.

0 Kudos
Reply