Warning Message 104

Warning Message 104


I'm getting warning message 104 as follows:

Warning 104 : Alignment of variable MAXHEXFACEWARP in common MAXWPAR may cause performance degradation

My definitions all look fine and i presume that I need padding to align the variables:

But I'm having two problems with this
a) where is this documented ? can I find out more about this or other warning messages

b) can/how do I resolve it by changing the code?

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The message indicates that your common (without padding) mis-aligns some subsequent variable. For example, if you have an odd number of 32 bit data preceding 64-bit data, the 64-bit data will be misaligned. No parallel SSE2 operations on the data will be possible, and scalar double precision floating point operations will incur alignment fixup penalties, which are extremely large if the data should straddle a cache line boundary.

The usual method to avoid this, if you choose to have various types of data in a common, is to place the largest types first, and the smallest last. This is among the reasons for the introduction of alternatives to common, such as module variables.

If you choose to use a compiler option which might fix it up (-pad), you must be careful to use that option consistently throughout. It is documented cryptically, e.g. in 'info ifc.'

Leave a Comment

Please sign in to add a comment. Not a member? Join today