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

[Solved]Compile error: internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:5111

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.

Stella88

New member
I am trying to compile WRF-chem3.8.1 with GNU compiler and dmpar option on Linux, but I got some errors. I have successfully compiled WRF-Chem v3.5, however, I cannot compile v3.8. I have attached configure.wrf and compile.log. Kindly look into these to help me fix these errors. Thank you very much in advance.
View attachment configure_wrf.txt
View attachment compile_log.txt

Here is the error message.
module_ra_rrtmg_lwf.f90:8141:0:
use rrlw_ref_f, only : chi_mls
internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:5111
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
0.44user 0.03system 0:01.08elapsed 44%CPU (0avgtext+0avgdata 50084maxresident)k
5112inputs+400outputs (3major+28149minor)pagefaults 0swaps
make[3]: [module_ra_rrtmg_lwf.o] Error 1 (ignored)
 
Hi,

The error message in your compile log is:
Code:
module_ra_rrtmg_lwf.f90:8141:0:

       use rrlw_ref_f, only : chi_mls

internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:5111
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
0.44user 0.03system 0:01.08elapsed 44%CPU (0avgtext+0avgdata 50084maxresident)k
5112inputs+400outputs (3major+28149minor)pagefaults 0swaps
make[3]: [module_ra_rrtmg_lwf.o] Error 1 (ignored)

I believe this is likely the same sort of problem as is mentioned here (3rd problem on the page):
https://www2.mmm.ucar.edu/wrf/users/wrf_files/wrfv3.9/known-prob-3.9.1.1.html

The problem is that you are using a new GNU compiler with old WRF code. Hopefully the fix will also be similar; however, since the fix mentioned on that web page is for the file module_ra_rrtmg_lw.F file, and your problem is with module_ra_rrtmg_lwf.F, you can't simply download the corrected file. I attempted to correct the module_ra_rrtmg_lwf.F file for V3.8.1 and am attaching it. Place it in your phys/ directory and then ./clean -a, reconfigure, and recompile. If it gets past the problem for module_ra_rrtmg_lwf, but you continue to see similar issues with other rrtmg sw or lw files, then you can compare the original/default file with my file modifications to see the differences, and make similar modifications in those files.

Let us know if this makes any difference. Thanks!
 

Attachments

  • module_ra_rrtmg_lwf.F
    746.4 KB · Views: 94
Hi,

I replaced the module_ra_rrtmg_lwf.F file which you shared with me. I tied to recompile the model. However, I got the same internal compiler error message.

Thanks
 
kwerner said:
Hi,

The error message in your compile log is:
Code:
module_ra_rrtmg_lwf.f90:8141:0:

       use rrlw_ref_f, only : chi_mls

internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:5111
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
0.44user 0.03system 0:01.08elapsed 44%CPU (0avgtext+0avgdata 50084maxresident)k
5112inputs+400outputs (3major+28149minor)pagefaults 0swaps
make[3]: [module_ra_rrtmg_lwf.o] Error 1 (ignored)

I believe this is likely the same sort of problem as is mentioned here (3rd problem on the page):
https://www2.mmm.ucar.edu/wrf/users/wrf_files/wrfv3.9/known-prob-3.9.1.1.html

The problem is that you are using a new GNU compiler with old WRF code. Hopefully the fix will also be similar; however, since the fix mentioned on that web page is for the file module_ra_rrtmg_lw.F file, and your problem is with module_ra_rrtmg_lwf.F, you can't simply download the corrected file. I attempted to correct the module_ra_rrtmg_lwf.F file for V3.8.1 and am attaching it. Place it in your phys/ directory and then ./clean -a, reconfigure, and recompile. If it gets past the problem for module_ra_rrtmg_lwf, but you continue to see similar issues with other rrtmg sw or lw files, then you can compare the original/default file with my file modifications to see the differences, and make similar modifications in those files.

Let us know if this makes any difference. Thanks!

Hi kwerner,

Thank you for the explanation. I modified module_ra_rrtmg_lwf.F file by changing "use rrlw_ref_f, only : chi_mls" to "use rrlw_ref_f". Currently, I can successfully compile WRF-chem v3.8.
Thank you
 
Hi

kwerner says "The problem is that you are using a new GNU compiler with old WRF code". I have a notebook and a desktop, exact same Ubuntu 18.04 versions (Linux officeLinux 5.4.0-87-generic #98~18.04.1-Ubuntu) and exact same GCC versions (GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0).

However, I get this error on the desktop, whereas notebook returns no errors. The suggested solution works though; the error on the desktop gets fixed. I am really confused. Can the source of the problem be something else?

Also, does changing these lines have an impact on the simulations?

Thanks,

Huseyin
 
Huseyin,
The culprit of the problem is our best guess. The modification to the file should not cause any differences in simulation solutions.
 
Top