Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

fortcom: Warning,because of COMMON

wengh
Beginner
805 Views

Hi, I am a new learner of intel fortran. I comed up with the warning message when compiling the fortran codes.Howeve, the codeswere compiled sucessfuly.The messages and the codesthatthe warning messagecome from are below.I expect to know what problem is about the codes and the output is right.Thank you for your help.

warning message:
fortcom: Warning: ../CBS/higkon.h, line 4: Because of COMMON, the alignment of object is inconsistent with its type [GH]

2 GQ , GH , EDG , DEGRAD , RADDEG ,

-----------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 4: Because of COMMON, the alignment of object is inconsistent with its type [EDG]

2 GQ , GH , EDG , DEGRAD , RADDEG ,

--------------------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 4: Because of COMMON, the alignment of object is inconsistent with its type [DEGRAD]

2 GQ , GH , EDG , DEGRAD , RADDEG ,

-----------------------------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 4: Because of COMMON, the alignment of object is inconsistent with its type [RADDEG]

2 GQ , GH , EDG , DEGRAD , RADDEG ,

--------------------------------------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 5: Because of COMMON, the alignment of object is inconsistent with its type [RDRD]

3 RDRD , EMRDRD , RDDRM1 ,

--------------------------^

fortcom: Warning: ../CBS/higkon.h, line 5: Because of COMMON, the alignment of object is inconsistent with its type [EMRDRD]

3 RDRD , EMRDRD , RDDRM1 ,

-----------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 5: Because of COMMON, the alignment of object is inconsistent with its type [RDDRM1]

3 RDRD , EMRDRD , RDDRM1 ,

--------------------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 6: Because of COMMON, the alignment of object is inconsistent with its type [WCPR]

4 WCPR , RDWCP , B234W , B234E

--------------------------^

fortcom: Warning: ../CBS/higkon.h, line 6: Because of COMMON, the alignment of object is inconsistent with its type [RDWCP]

4 WCPR , RDWCP , B234W , B234E

-----------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 6: Because of COMMON, the alignment of object is inconsistent with its type [B234W]

4 WCPR , RDWCP , B234W , B234E

--------------------------------------------^

fortcom: Warning: ../CBS/higkon.h, line 6: Because of COMMON, the alignment of object is inconsistent with its type [B234E]

codes
c
COMMON / HIGKON / EDDLAM , EDDPHI , EDADPHI, DLADDPH, DPHDDLA,
1 PI , ED2DT , DT2 , DTDEH , NEHDDT ,
2 GQ , GH , EDG , DEGRAD , RADDEG ,
3 RDRD , EMRDRD , RDDRM1 ,
4 WCPR , RDWCP , B234W , B234E

best regard
wengh

0 Kudos
1 Reply
mecej4
Honored Contributor III
805 Views
Assuming that Fortran implicit typing is in effect, and that the reals are all 8-byte (double precision), the problem may be attributed to the presence of a 4-byte integer (NEHDDT) in the middle of a number of 8-byte reals. Misaligned access can lead to a performance penalty at run time (a stiff penalty on Itanium, but less so on X86).

To fix the problem, place the integer variable at the end, or pad it up to the next 8-byte boundary by adding a dummy (unused) integer.
0 Kudos
Reply