Skip to content

Build errors with spack due to automatic detection of cray-libsci #316

Description

@climbfuji

Description

The automatic detection of cray-libsci in cmake/ectrans_find_lapack.cmake doesn't work (well or at all) with spack when the Cray compiler wrappers are omitted as per HPE recommendations (https://cpe.ext.hpe.com/docs/latest/craype/spack.html).

# Following libsci code should disappear soon, with more recent cmake versions (needs more investigation)

This is because the cray-libsci library is loaded automatically as part of the Cray modules, and even spack can't suppress that. But spack sanitizes the linker paths etc, which ultimately leads to an error -lsci - library not found.

If MKL is used, there is no issue, but in situations where we want to use some other LAPACK provider like openblas, the above happens. Instead of detecting libsci automatically, even if the user doesn't want to use it, the logic below (use cmake find lapack) should be used.

Reading the comment in cmake/ectrans_find_lapack.cmake correctly, a certain minimum version of cmake is required. Which version exactly do you need?

I created a bug fix PR in spack https://github.com/spack/spack-packages/pull/1946/files that comments out the libsci logic in cmake/ectrans_find_lapack.cmake, and I would also like to update the cmake requirement as part of this PR.

Notes

  • I will be on leave Oct 11-20. I can add the cmake requirements into the spack PR after my return.
  • I tested the PR as is (hash spack/spack-packages@7846a5f) on a system with cmake 3.31.8, and it correctly linked against the LAPACK provider from spack (openblas)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions