Questions: XCode Watch Allocated Arrays & More than 7-dimensional arrays?

Questions: XCode Watch Allocated Arrays & More than 7-dimensional arrays?

hi guys,

I am new to the forum and new to fortran allocated arrays as well:-) I use fortran for my thesis research project.

I have 2 quick questions regarding using xcode with ifort under mountain lion:

1) When I declare an array with fixed dimensions, such as

real(4), dimension(2,3,4,5,6), save::foo1

xcode watch will display foo1 as float[2][3][4][5][6].

But instead, if I allocate an array with some dimensions later, such as

real(4), allocatable, dimension(:, :, :) :: foo2

allocate(foo2(2, 3, 4, 5, 6))

Then xcode watch will display foo2 as float[10][10][10][10][11].

I tested that the memory is allocated correctly using "print". But the watch does NOT show correct values of array elements. I am wondering if there is a way to make xcode watch work for allocated fortran arrays. Otherwise, it's virtually impossible to debug:-(

2) Fortran supports maximum 7-dimensional arrays. I am curious if ifort compiler supports more than that.

Many thanks in advance!

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

2) ifort will take up to 31 dimensions in an array. (tested in v 13.1.1)

It looks like xcode watch is not properly interpreting the array descriptor for allocated arrays.

Using IDB (Intel Debugger), what does the watch show?

Jim Dempsey

Intel Fortran integration into Xcode is what we term a "Limited Feature".  This means that it is not fully functional.  you hit one of those limitations, the debugger in Xcode does not work well with Fortran. Unfortunately it may never work well. We recommend using our command line debugger IDB which is fully Fortran aware. 

Mr. Ronal W Green;

Since I got my Apple machines (previously with Leopard & Xcode 3.2.5) I have been using Xcode basically as a Fortran editor  and as a environment to edit & build & debug small code. Basically because when it came to debug applications with modules/subroutines the I wasn't able to watch the local variables defined in those modules/subroutines. I'm sad to say that I was able to when I used Intel Visual Studio or Visual Compaq.

So my question basically is: Now that I work with Mavericks & Xcode 5 will this be possible? or what is the way to do it in the MacOs?

Thank you.



Xcode integration is not as functional as Visual Studio integrations.

I would recommend using the command line Intel debugger 'idb' which is Fortran aware.

Leave a Comment

Please sign in to add a comment. Not a member? Join today