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

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

syang
初学者
1,846 次查看

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!

0 项奖励
5 回复数
Casey
初学者
1,846 次查看

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

0 项奖励
jimdempseyatthecove
名誉分销商 III
1,846 次查看

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

0 项奖励
Ron_Green
主持人
1,846 次查看

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. 

0 项奖励
IGNASI_A_
初学者
1,846 次查看

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.

 

 

0 项奖励
Ron_Green
主持人
1,846 次查看

Xcode integration is not as functional as Visual Studio integrations.

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

0 项奖励
回复