KLUGE: RRTMG FAST + GNU > 6.3.0 is an internal compiler error#503
KLUGE: RRTMG FAST + GNU > 6.3.0 is an internal compiler error#503davegill wants to merge 4 commits intowrf-model:masterfrom davegill:zap_rrtmg_fast
Conversation
TYPE: bug fix
KEYWORDS: RRTMG FAST, GNU
SOURCE: internal
DESCRIPTION OF CHANGES:
With GNU version 6.40, 6.5.0, 7.1.0, 7.2.0, and 7.3.0, the WRF RRTMG FAST LW scheme causes an internal compiler error for some optimization levels. The RRTMG code looks reasonable.
module_ra_rrtmg_swf.f90:5612:0:
use rrsw_kg21_f, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:4920
module_ra_rrtmg_swf.f90:5612:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
The solution is to remove the RRTMG code via an ifdef.
LIST OF MODIFIED FILES:
M phys/module_physics_init.F
M phys/module_ra_rrtmg_lwf.F
M phys/module_ra_rrtmg_swf.F
M phys/module_radiation_driver.F
TESTS CONDUCTED:
- [x] Code builds with GNU/7.2.0 with -D optimization with mods (i.e. NO RRTMG FAST)
- [x] Code does not build with newer GNU with -D optimziation without mods
|
@davegill Does this discourage the use of RRTMG_FAST option? Should -DBUILD_RRTMG_FAST be added or mentioned somewhere in the build scripts? |
|
@jamiebresch This means that the default build is not impacted, and users can still select RRTMG_FAST. However, if there are build problems, users have a very simple fix. |
|
@davegill your mention of |
|
@jamiebresch If this seems OK, let me know. |
|
@davegill Thanks for addressing my questions. The mods seem OK now. Just another minor question about the "NOTE: Remove all files that use that CPP flag" in module_check_a_mundo.F. I guess I know what that means. But is that note helpful for general users? |
| ! built to use them. | ||
| !----------------------------------------------------------------------- | ||
|
|
||
| #if( BUILD_RRTMG_FAST != 1) |
There was a problem hiding this comment.
@jamiebresch
Jamie,
With the default behavior set up as "always build RRTMG FAST", if a user has ever modified the build to not have the RRTMG FAST code part of the executable, then the easy way to get this check_a_mundo test to be resolved is with a clean -a, configure, compile. This is much easier to understand (I think) than the previous message to users.
|
@davegill |
TYPE: bug fix
KEYWORDS: RRTMG FAST, GNU
SOURCE: internal
DESCRIPTION OF CHANGES:
With GNU version 6.40, 6.5.0, 7.1.0, 7.2.0, and 7.3.0, the WRF RRTMG FAST LW scheme causes an internal compiler error for some optimization levels. The RRTMG code looks reasonable, so there does not seem an obvious code fix to implement in the RRTMG FAST LW scheme.
The solution is to BE EASILY ABLE TO remove the RRTMG FAST code via an ifdef.
LIST OF MODIFIED FILES:
M phys/module_physics_init.F
M phys/module_ra_rrtmg_lwf.F
M phys/module_ra_rrtmg_swf.F
M phys/module_radiation_driver.F
M share/module_check_a_mundo.F
M arch/postamble_new
TESTS CONDUCTED: