Closed JiaweiZhuang closed 4 years ago
BTW I did a quick performance comparison of gfortran7.2.0 vs ifort18 on EC2 r5.2xlarge
:
With gfortran, FV3 is slower by 70%, other components are as fast, and the entire model is slower by 10%. Pretty acceptable. Once gfortran is more robust (say, used in our official benchmark) I will switch back to it.
I am closing this issue since the GNU makefiles will be retired in 13.0.0.
(I am using my Intel student license on AWS; this allows me to skip #15 for now and test high-resolution multi-node runs as quickly as possible.)
Problem
I got this compile error when using ifort18 + gcc5.4.0 on Ubuntu 16.04:
Full log: compile_ifort_icc_bug.log
Suggested fix
fe5e863 fixes the same issue for gfortran, but the intel block remains unchanged:
https://github.com/geoschem/gchp/blob/7a4589c276876b6674800f4e4137b575e4def4f5/Shared/Config/ESMA_base.mk#L301-L313
I made the same change for intel, and then the compile error was gone:
Note that it doesn't matter whether
icc
orgcc
is set as$CC
. The preprocessor is hard-coded asgcc
:https://github.com/geoschem/gchp/blob/7a4589c276876b6674800f4e4137b575e4def4f5/ESMF/build/common.mk#L611
After changing
CPPANSIX
, GCHP can compile correctly with eitherCC=icc
orCC=gcc
(both failed originally):On Odyssey, the default gcc version is 4.8.5, so there is no such problem. I expect that gcc5+ will all have this issue.
Additional info
I found an old email from Daniel Rothenberg, which explained this issue well: