- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am just switching over to version 11.1.048 of the compiler (previously using 8.1.xxx). I am now recieving the following errors during compile and have not been able to locate information on them.
corrmod.for(9): warning #6380: The structure length is not a multiple of its lar
gest element; could create misalignments for arrays of this type. [THERMOPROPS]
type ThermoProps
corrmod.for(48): warning #6379: The structure contains one or more misaligned fi
elds. [CORRATDATA]
type CorratData
Here are the two structures in question.
type ThermoProps
sequence
doubleprecision TEMP
doubleprecision PRES
doubleprecision VISCOS
doubleprecision STRENG
doubleprecision WEIGHT
doubleprecision VOLUME
doubleprecision PH
doubleprecision PHNAT
integer NOU
integer JFILM
character(len=16), allocatable :: NAMOU(:)
real(8), allocatable :: EOUT(:)
real(8), allocatable :: AOUT(:)
real(8), allocatable :: GVAL(:)
real(8), allocatable :: DIFFUS(:)
integer, allocatable :: NOUTYP(:)
integer unused
end type ThermoProps
type CorratData
sequence
real(8), allocatable :: RXNSTO(:)
integer, allocatable :: NUMSPC(:)
integer, allocatable :: ICATHO(:)
integer, allocatable :: IANODI(:)
character(len=32), allocatable :: REANAM(:)
character(len=16), allocatable :: RXNSPC(:)
real(8), allocatable :: CALPHA(:)
real(8), allocatable :: CEXCHA(:)
real(8), allocatable :: CREFT(:)
real(8), allocatable :: CREFAC(:)
real(8), allocatable :: CREFPO(:)
real(8), allocatable :: CRXNOR(:)
real(8), allocatable :: CACTIV(:)
integer, allocatable :: ICDIFF(:)
integer, allocatable :: NCHOMO(:)
character(len=16), allocatable :: CLIMSP(:)
character(len=16), allocatable :: CHOMSP(:)
real(8), allocatable :: CHOMST(:)
real(8), allocatable :: CHOMEQ(:)
real(8), allocatable :: CHOMFO(:)
real(8), allocatable :: AALPHA(:)
real(8), allocatable :: AEXCHA(:)
real(8), allocatable :: AREFT(:)
real(8), allocatable :: AREFAC(:)
real(8), allocatable :: AREFPO(:)
real(8), allocatable :: ARXNOR(:)
real(8), allocatable :: AACTIV(:)
integer, allocatable :: IADIFF(:)
character(len=16), allocatable :: ALIMSP(:)
integer, allocatable :: NAHOMO(:)
character(len=16), allocatable :: AHOMSP(:)
real(8), allocatable :: AHOMST(:)
real(8), allocatable :: AHOMEQ(:)
real(8), allocatable :: AHOMFO(:)
integer, allocatable :: NCATTE(:)
character(len=16), allocatable :: CATTES(:,:)
real(8), allocatable :: CATTEC(:,:)
real(8), allocatable :: CATTEE(:,:)
integer, allocatable :: NAATTE(:)
character(len=16), allocatable :: AATTES(:,:)
real(8), allocatable :: AATTEC(:,:)
real(8), allocatable :: AATTEE(:,:)
integer, allocatable :: ICSUPE(:,:)
integer, allocatable :: IASUPE(:,:)
integer, allocatable :: NPASSI(:)
real(8), allocatable :: RPASSI(:)
character(len=16), allocatable :: CPASSI(:)
integer, allocatable :: IPASSI(:)
character(len=16), allocatable :: ADSSPE(:)
character(len=16), allocatable :: ADSSUR(:)
real(8), allocatable :: ADSVEC(:)
real(8), allocatable :: ADSMAT(:,:)
integer, allocatable :: INTADS(:)
integer, allocatable :: IPARTI(:)
real(8), allocatable :: RPARTI(:)
character(len=16), allocatable :: BULKSC(:)
character(len=16), allocatable :: REPACH(:)
real(8), allocatable :: REPARE(:,:)
integer NREACT
real(8) ALPHAP
end type CorratData
corrmod.for(9): warning #6380: The structure length is not a multiple of its lar
gest element; could create misalignments for arrays of this type. [THERMOPROPS]
type ThermoProps
corrmod.for(48): warning #6379: The structure contains one or more misaligned fi
elds. [CORRATDATA]
type CorratData
Here are the two structures in question.
type ThermoProps
sequence
doubleprecision TEMP
doubleprecision PRES
doubleprecision VISCOS
doubleprecision STRENG
doubleprecision WEIGHT
doubleprecision VOLUME
doubleprecision PH
doubleprecision PHNAT
integer NOU
integer JFILM
character(len=16), allocatable :: NAMOU(:)
real(8), allocatable :: EOUT(:)
real(8), allocatable :: AOUT(:)
real(8), allocatable :: GVAL(:)
real(8), allocatable :: DIFFUS(:)
integer, allocatable :: NOUTYP(:)
integer unused
end type ThermoProps
type CorratData
sequence
real(8), allocatable :: RXNSTO(:)
integer, allocatable :: NUMSPC(:)
integer, allocatable :: ICATHO(:)
integer, allocatable :: IANODI(:)
character(len=32), allocatable :: REANAM(:)
character(len=16), allocatable :: RXNSPC(:)
real(8), allocatable :: CALPHA(:)
real(8), allocatable :: CEXCHA(:)
real(8), allocatable :: CREFT(:)
real(8), allocatable :: CREFAC(:)
real(8), allocatable :: CREFPO(:)
real(8), allocatable :: CRXNOR(:)
real(8), allocatable :: CACTIV(:)
integer, allocatable :: ICDIFF(:)
integer, allocatable :: NCHOMO(:)
character(len=16), allocatable :: CLIMSP(:)
character(len=16), allocatable :: CHOMSP(:)
real(8), allocatable :: CHOMST(:)
real(8), allocatable :: CHOMEQ(:)
real(8), allocatable :: CHOMFO(:)
real(8), allocatable :: AALPHA(:)
real(8), allocatable :: AEXCHA(:)
real(8), allocatable :: AREFT(:)
real(8), allocatable :: AREFAC(:)
real(8), allocatable :: AREFPO(:)
real(8), allocatable :: ARXNOR(:)
real(8), allocatable :: AACTIV(:)
integer, allocatable :: IADIFF(:)
character(len=16), allocatable :: ALIMSP(:)
integer, allocatable :: NAHOMO(:)
character(len=16), allocatable :: AHOMSP(:)
real(8), allocatable :: AHOMST(:)
real(8), allocatable :: AHOMEQ(:)
real(8), allocatable :: AHOMFO(:)
integer, allocatable :: NCATTE(:)
character(len=16), allocatable :: CATTES(:,:)
real(8), allocatable :: CATTEC(:,:)
real(8), allocatable :: CATTEE(:,:)
integer, allocatable :: NAATTE(:)
character(len=16), allocatable :: AATTES(:,:)
real(8), allocatable :: AATTEC(:,:)
real(8), allocatable :: AATTEE(:,:)
integer, allocatable :: ICSUPE(:,:)
integer, allocatable :: IASUPE(:,:)
integer, allocatable :: NPASSI(:)
real(8), allocatable :: RPASSI(:)
character(len=16), allocatable :: CPASSI(:)
integer, allocatable :: IPASSI(:)
character(len=16), allocatable :: ADSSPE(:)
character(len=16), allocatable :: ADSSUR(:)
real(8), allocatable :: ADSVEC(:)
real(8), allocatable :: ADSMAT(:,:)
integer, allocatable :: INTADS(:)
integer, allocatable :: IPARTI(:)
real(8), allocatable :: RPARTI(:)
character(len=16), allocatable :: BULKSC(:)
character(len=16), allocatable :: REPACH(:)
real(8), allocatable :: REPARE(:,:)
integer NREACT
real(8) ALPHAP
end type CorratData
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SEQUENCE and ALLOCATABLE both prevent the compiler from inserting padding so as to align the real(8) arrays. It's just a warning, and may have performance impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the compiler is wrong for the first type. I notice that if I comment out the character(16) element, it's happier. I will investigate this.
For the second type, it ends with an integer followed by a REAL(8). The SEQUENCE prevents padding from being inserted, as Tim says, causing field ALPHAP to be misaligned. Even if you swap these two, the total length of CorratData is not a multiple of 8, so if you have an array of type CorratData, some elements will be misaligned.
For the second type, it ends with an integer followed by a REAL(8). The SEQUENCE prevents padding from being inserted, as Tim says, causing field ALPHAP to be misaligned. Even if you swap these two, the total length of CorratData is not a multiple of 8, so if you have an array of type CorratData, some elements will be misaligned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did some more investigation. The compiler is not wrong, but I can see what is happening.
The size of the descriptor for a CHARACTER, ALLOCATABLE array is 36 bytes (on an IA-32 system). This is not a multple of 8, so if you have any REAL(8) or DOUBLE PRECISION, non-allocatable components, it is possible that these elements may be misaligned, or the total length of the type may not be a multiple of 8. This is, as Tim says, mainly harmless and I already showed how you can disable the warning.
I don't see what we can do about this without breaking applications, so we'll just have to live with it.
The size of the descriptor for a CHARACTER, ALLOCATABLE array is 36 bytes (on an IA-32 system). This is not a multple of 8, so if you have any REAL(8) or DOUBLE PRECISION, non-allocatable components, it is possible that these elements may be misaligned, or the total length of the type may not be a multiple of 8. This is, as Tim says, mainly harmless and I already showed how you can disable the warning.
I don't see what we can do about this without breaking applications, so we'll just have to live with it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
I did some more investigation. The compiler is not wrong, but I can see what is happening.
The size of the descriptor for a CHARACTER, ALLOCATABLE array is 36 bytes (on an IA-32 system). This is not a multple of 8, so if you have any REAL(8) or DOUBLE PRECISION, non-allocatable components, it is possible that these elements may be misaligned, or the total length of the type may not be a multiple of 8. This is, as Tim says, mainly harmless and I already showed how you can disable the warning.
I don't see what we can do about this without breaking applications, so we'll just have to live with it.
The size of the descriptor for a CHARACTER, ALLOCATABLE array is 36 bytes (on an IA-32 system). This is not a multple of 8, so if you have any REAL(8) or DOUBLE PRECISION, non-allocatable components, it is possible that these elements may be misaligned, or the total length of the type may not be a multiple of 8. This is, as Tim says, mainly harmless and I already showed how you can disable the warning.
I don't see what we can do about this without breaking applications, so we'll just have to live with it.
Thanks for looking into this, I will just have to live with the warnings.
Regards
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops - I had deleted the part where I showed you how to eliminate the warnings.
Bracket the TYPE declarations in:
!DEC$ OPTIONS /NOWARN
...
!DEC$ END OPTIONS
Bracket the TYPE declarations in:
!DEC$ OPTIONS /NOWARN
...
!DEC$ END OPTIONS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The traditional method of ordering the components in decreasing order of KIND should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not when the variables are ALLOCATABLE or POINTER. Then, the size is not correlated with the variable KIND.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
Not when the variables are ALLOCATABLE or POINTER. Then, the size is not correlated with the variable KIND.
Could pad out where needed to make them allign....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or not use SEQUENCE.

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