-
Notifications
You must be signed in to change notification settings - Fork 6
Cmake naming patterns for Fortran submodules inconsistent with cce/19 and cce/20 in buildtools EasyConfig #215
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The EasyConfig for the buildtools module downloads Cmake source code that doesn't have the correct filename extension for Fortran submodules with cce/19.0.0 and cce/20.0.0 compilers.
The problem is likely in '/appl/lumi/SW/LUMI-25.03/common/EB/buildtools/25.03/share/cmake-3.31/Modules/Compiler/Cray-Fortran.cmake', lines 7-8 with
'set(CMAKE_Fortran_SUBMODULE_SEP "")' and
'set(CMAKE_Fortran_SUBMODULE_EXT ".mod")'.
These settings work with cce/17.0.1, where submodules are named '.mod'.
In cce19 and 20 however, the naming convention is changed to '..smod'.
See ticket #7697 for more details.
Providing a patch file with something like the following might work:
--- Modules/Compiler/Cray-Fortran.cmake.orig 2023-10-01 12:00:00.000000000 +0000
+++ Modules/Compiler/Cray-Fortran.cmake 2023-10-01 12:00:00.000000000 +0000
@@ -6,8 +6,14 @@
# Cray Fortran Compiler
set(CMAKE_Fortran_COMPILER_ID_RUN 1)
set(CMAKE_Fortran_SUBMODULE_SEP "")
-set(CMAKE_Fortran_SUBMODULE_EXT ".mod")
+set(CMAKE_Fortran_SUBMODULE_EXT ".mod") # Default for older versions
+# Adjust for CCE 19.0.0 and above
+if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0.0)
+ set(CMAKE_Fortran_SUBMODULE_SEP "." CACHE STRING "submodule separator" FORCE)
+ set(CMAKE_Fortran_SUBMODULE_EXT ".smod" CACHE STRING "submodule extension" FORCE)
+endif()
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working