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

Array size limits on Max OS X with IFORT 10.1.007 when using atmospheric model?

steven1
Beginner
568 Views
Hi,

I hope somebody can help me with an issue I have -- I'm trying to run the global atmospheric chemical transport model GEOS-CHEM on a Mac Pro (OS X 10.5).

It seems that when I run the code, where there are large arrays the code compiles and initially starts running OK, but then when the arrays are accessed or the subroutine which declares them is entered, a segmentation fault occurs.

I checked this is the case by reducing the array size for some parts of the code where I could get away with this. I need REAL*8 arrays of just over 4.5 million in size.

The simulations work on Linux.

If anyone has a suggestion (perhaps a compiler flag?) on how I can overcome this It'd be great.

Regards,

Steven
0 Kudos
4 Replies
TimP
Honored Contributor III
568 Views
Does it set the 64-bit integer type for indexing these arrays on both linux and MacOS?
0 Kudos
steven1
Beginner
568 Views
Hi,

Thank you for your message.

I'm afraid I don't understand -- I can only successfully compile for 32 bit though?

But I see where you're going, a 32 bit integer can only index a bit under 4.5 million right?

Regards,

Steven
0 Kudos
TimP
Honored Contributor III
568 Views
32-bit mode limits arrays to 2GB. Maybe that is plenty in your case. You must also watch for stack overflow, if local arrays are allocated on stack, which happens by default when using f90 array operations. If the stack size defaults are different between MacOS and linux, or you increased stack size for linux, or you are using different compilers, it could explain a difference.
0 Kudos
Steven_L_Intel1
Employee
568 Views
Try -heap-arrays
0 Kudos
Reply