Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Record alignment move from 7.1 to 8.1

ereisch
新分销商 II
516 次查看

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 arguments but to no avail. Since this option was not present in the 7.1 release, what was the behavior of that version with regards to aligning structures and common blocks?

TIA!

0 项奖励
3 回复数
Steven_L_Intel1
516 次查看
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.
0 项奖励
TimP
名誉分销商 III
516 次查看
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?
0 项奖励
Steven_L_Intel1
516 次查看
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.
0 项奖励
回复