Skip to content

LAPACK++ may fail to link with LAPACK 3.9.1 - 3.11.0 #44

Closed
@weslleyspereira

Description

@weslleyspereira

Since Reference-LAPACK/lapack@628a209#diff-1710d7e7dbbb424e47de31c4995c3decf85025b77051f0ed0cb835988aeebe92, LAPACK defines LAPACK_FORTRAN_STRLEN_END in the header file lapack.h. As a consequence of that, LAPACK_dpstrf() requires an additional parameter that indicates the size of the string uplo. This routine is used in config/lapack_pstrf.cc that is called in LAPACKFinder.cmake:

# Try to link and run LAPACK routine with the library.
try_run(
run_result compile_result ${CMAKE_CURRENT_BINARY_DIR}
SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/config/lapack_pstrf.cc"
LINK_LIBRARIES
# Use blaspp_libraries instead of blaspp, when SLATE includes
# blaspp and lapackpp, so the blaspp library doesn't exist yet.
# Not "quoted"; screws up OpenMP.
${lapack_libs} ${blaspp_libraries}
COMPILE_DEFINITIONS
${blaspp_defines}
COMPILE_OUTPUT_VARIABLE
compile_output
RUN_OUTPUT_VARIABLE
run_output
)
debug_try_run( "lapack_pstrf.cc" "${compile_result}" "${compile_output}"
"${run_result}" "${run_output}" )

When trying to build with LAPACK 3.11.0, I got the error:

At line 141 of file /home/weslleyp/storage/lapack/SRC/dpstrf.f
Fortran runtime error: Actual string length is shorter than the declared one for dummy argument 'uplo' (-4096/1)

I am using a Ubuntu machine with:

  • GCC 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2).
  • LAPACK: current master (ae2f14fe1f0dd94b2dacc1c35107f0ea5b5c6f07)
  • LAPACK++: v2023.08.25 (62680a1)
  • BLAS++: v2023.08.25 (f8f983d5b45a8f366aae41fbe9888b14cbae20f8)

Please, let me know if I can give you more details.

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