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.

fortcom: Warning,because of COMMON

wengh
初学者
727 次查看

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 项奖励
1 回复
mecej4
名誉分销商 III
727 次查看
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 项奖励
回复