- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does it set the 64-bit integer type for indexing these arrays on both linux and MacOS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try -heap-arrays

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page