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

Crash during assignment of large array

jd_weeks
Beginner
482 Views

I am getting a crash on Mac OS X during an assignment of a large array:

WORK(1:LENWORK) = LWORK(1:LENWORK)

The crash does not occur when LENWORK is 290638; it does occur when LENWORK is 1451115 (these are values that are convenient to test using the code that crashes).

The arrays are real*8, so the large, crashing array represents over 10 MBytes. That's large but not huge.

ifort -logo
Intel Fortran Compiler Professional for applications running on Intel 64, Version 11.0 Build 20090609 Package ID: m_cprof_p_11.0.066

code compiled with flags -O1 -heap_arrays -assume underscore -m32

The -O1 could be -O3.

I'm working on Mac OS X 10.5.8.

Thanks!

0 Kudos
8 Replies
Ron_Green
Moderator
482 Views

read this article that is under "Useful Links"

http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/

and use -heap-arrays option. Note in the article the comments about stacksize on Mac OS (default stack is pretty small for Mac OS compared to Linux).

0 Kudos
jd_weeks
Beginner
482 Views

Thanks, Ron. I was about to complain "but I AM using -heap-arrays" when I noticed that I misspelled it! I quote from my original post:

code compiled with flags -O1 -heap_arrays -assume underscore -m32

Note "-heap_arrays" with an underscore!

This brings up the question of why the compiler didn't complain about an unknown flag...

0 Kudos
Steven_L_Intel1
Employee
482 Views
Either should work.
0 Kudos
jd_weeks
Beginner
482 Views
Changing the spelling of the flag fixes the problem.
0 Kudos
Steven_L_Intel1
Employee
482 Views
Lorri informs me that in the case of heap-arrays, the underscore version is not recognized. Instead, it is treated as the ld switch -h which names a .so file. We may change this in the future to either recognize the underscore version or give an error.
0 Kudos
jd_weeks
Beginner
482 Views

Thanks, Steve. An error would have saved me a day!

John Weeks

WaveMetrics, Inc.

0 Kudos
Steven_L_Intel1
Employee
482 Views
-heap_arrays will now give an error as of 11.1 Update 6.
0 Kudos
jd_weeks
Beginner
482 Views
That's great, Steve. Thanks!

-John Weeks
WaveMetrics, Inc.
0 Kudos
Reply