- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.'
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.'

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page