Skip to content

Compile error with LLVM 22.1.0 in radlw_main.F90 #1198

@climbfuji

Description

@climbfuji

Description

With the brand new llvm@22.1.0, I get the following error. These comments are unnecessary, and the patch shown below fixes it:

[ 32%] Building Fortran object external/ccpp/ccpp-physics/CMakeFiles/ccpp_physics.dir/physics/Radiation/RRTMG/radlw_main.F90.o
error: Could not parse /home/dom/work/neptune-atmos/nep-llvm22/external/ccpp/ccpp-physics/physics/Radiation/RRTMG/radlw_main.F90
/home/dom/work/neptune-atmos/nep-llvm22/external/ccpp/ccpp-physics/physics/Radiation/RRTMG/radlw_main.F90:7755:42: error: expected end of statement
        end module rrtmg_lw                !$
                                           ^
/home/dom/work/neptune-atmos/nep-llvm22/external/ccpp/ccpp-physics/physics/Radiation/RRTMG/radlw_main.F90:7755:7: in the context: END MODULE statement
        end module rrtmg_lw                !$
        ^
/home/dom/work/neptune-atmos/nep-llvm22/external/ccpp/ccpp-physics/physics/Radiation/RRTMG/radlw_main.F90:278:7: in the context: module
        module rrtmg_lw
        ^
make[2]: *** [external/ccpp/ccpp-physics/CMakeFiles/ccpp_physics.dir/build.make:1014: external/ccpp/ccpp-physics/CMakeFiles/ccpp_physics.dir/physics/Radiation/RRTMG/radlw_main.F90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:681: external/ccpp/ccpp-physics/CMakeFiles/ccpp_physics.dir/all] Error 2

Patch that fixes it:

[dom@bounty ccpp-physics]$ git diff
diff --git a/physics/Radiation/RRTMG/radlw_main.F90 b/physics/Radiation/RRTMG/radlw_main.F90
index 4a60e6a4..fa99ff7d 100644
--- a/physics/Radiation/RRTMG/radlw_main.F90
+++ b/physics/Radiation/RRTMG/radlw_main.F90
@@ -7751,6 +7751,6 @@
       end subroutine cldprmc

 !> @}
-!........................................!$
-      end module rrtmg_lw                !$
-!========================================!$
+!........................................!
+      end module rrtmg_lw
+!========================================!

Steps to Reproduce

Compile the code with llvm@22.1.0.

Additional Context

Any machine, with llvm@22.1.0, any suite that uses RRTMG.

Output

See above

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions