Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Potential bug V4.0 and runtime error

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member
Greetings WRF Help,

I wanted to potentially bring to the collective attention, and request some help in debugging an issue I have been having with compiling WRF in SCM.
Initial information:
GNU/Linux 4.15.0-39-generic
gcc version 7.3.0
ubuntu 18.04 LTS
All running in an oracle virtual box.

If I do a clean configure and compile for WRF, on the first compile I will receive build errors. WRF is unable to produce ideal.exe and wrf.exe. The only error that appears seems to be similar to the known error reported on June 8 of this year as reported in the following link:

My experienced error:

use rrsw_vsn_k, only: hvrini, hnamini

internal compiler error: in gfc_trans_use_stmts
## ADDED: cannot recall the remainder and closed the log before drafting the email

Strangely though, on a second clean and compile, it outputs both ideal.exe and wrf.exe.

There were problems after this however. Attempting to run ideal brought up errors about the number of soil layers being incorrect, saying the "LSM only uses 4 layers" which is what the input_soil file had.

Restoring older release versions of both the namelist.input and input_soil file seemed to rectify this as now ideal and wrf both run in the test case. The versions appear identical, so I truly do not know what this alleviated.

Sorry for being light on the exact details. I didn't bother to archive any of the error files I produced. I hope the information provided is helpful, and not too stream of consciousness.

I do not know if the build and runtime errors are linked, so my apologies if those are orthogonal.
I am very much a novice WRF user, and I hope I have communicated these issues effectively.

Hi StatPat...

"internal compiler error" means the compiler crashed. This should be 100% repeatable. Since
it isn't, that isn't normal.

Are you using the Intel compler? In particular Intel 17.0.4 or the 18.x line? Both have a
history of producing bad code on some platforms, particularlly on STAMPEDE2. Since you said
"gcc" and not "cc", I suspect you are using Gfortran and not the Intel "ifort". I've not seen
any complaints on Gfortran producing problems.

I'm wondering if your computer has a memory problem. The "internal compiler error" issue
suggests this is possible. If you have any other Linux commands that sometimes do something
wrong, then this is stronger evidence of a memory problem. Report this to your System Admin.

If not, you can always try a "clean -a" and then build from scratch, but reduce the optimization
level in "configure.wrf". That *might* help things, though it still doesn't explain the inconsistency
with "internal compiler error" problems.
Hi StatPat,
To address the running issue, try adding 'num_soil_layers = 4' to the &physics section of your namelist. This was removed from all namelists for V4.0 because it was determined to be redundant; however, I believe this should be revisited since it is causing an automatic error with the default case. Thanks for brining this to our attention.