Skip to content

Build: LAPACK should be a required dependency #89

Description

@kvrigor

Observed by @AGonzalezNicolas in HPSCTerrSys/TSMP2#113 (comment). Missing LAPACK triggers the ff. linker errors:

[100%] Linking Fortran executable eclm.exe
ld: ../clm5/libclm.a(SoilWaterMovementMod.F90.o): in function `dgtsv_.t253890p.t253891p.t253892p.t253893p.t253894p.t253895p.t253896p.t253897p':
eCLM/src/clm5/biogeophys/SoilWaterMovementMod.F90:(.text+0x280855): undefined reference to `dgtsv_'
ld: ../clm5/libclm.a(UrbBuildTempOleson2015Mod.F90.o): in function `dgesv_.t58174p.t58175p.t58176p.t58177p.t58178p.t58179p.t58180p.t58181p':
eCLM/src/clm5/biogeophys/UrbBuildTempOleson2015Mod.F90:(.text+0x237ae5): undefined reference to `dgesv_'
ld: ../clm5/libclm.a(BandDiagonalMod.F90.o): in function `dgbsv_.t839p.t840p.t841p.t842p.t843p.t844p.t845p.t846p.t847p.t848p':
eCLM/src/clm5/biogeophys/BandDiagonalMod.F90:(.text+0x28eaf): undefined reference to `dgbsv_'

The absence of LAPACK should be caught at the CMake configure stage.

find_package(LAPACK)
if(LAPACK_FOUND)
target_link_libraries(${PROJECT_NAME} PRIVATE LAPACK::LAPACK)
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions