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!
链接已复制
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).
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...