I have recently moved from the 7.1 compiler to the latest 8.1 release, but I'm having repeated segv crashes in my program from what would appear to be memory access violations caused by data alignment issues. I never had a problem with my program (which is a multi-language environment that interacts highly with shared memory) under 7.1, however I'm having problems with my common blocks when I compile under 8.1. The pertinent flags I'm passing are:
-vms -align norecords -vms -Zp4 -dyncom "list of common blocks"
I have tried numerous combinations of -align and -Zp
TIA!
链接已复制
3 回复数
One change was that in 7.1, COMMON block elements were aligned on 8-byte boundaries, but that violates the standard to do it as a default. 8.x aligns by default to 4-byte boundaries. If you want 8-byte, use -align dcommons.
What standard would that violate? Not allowing COMMONs to have 16-byte alignment could easily break SSE code. Not to mention the very large performance penalty for mis-alignment of 64-bit data as well as vectorized data.
CVF used to give vociferous warnings if you forced double precision variables to be mis-aligned relative to start of COMMON, implying that COMMON was at least 8-byte aligned. Are we trying to break what worked with CVF?
CVF used to give vociferous warnings if you forced double precision variables to be mis-aligned relative to start of COMMON, implying that COMMON was at least 8-byte aligned. Are we trying to break what worked with CVF?
The ifort 8.x behavior matches CVF's. Note that I am talking about padding of individual components of the common, not the alignment of the start of the common itself. The padding can be up to 8 bytes with -align dcommons, and up to 4 bytes with -align commons, which is what you get with -align. Padding at more than the size of a default arithmetic unit breaks common sequence storage association as specified by the standard.
