Skip to content

intel-oneapi-mkl: linking with the +cluster variant is broken for external mkl #38238

@koysean

Description

@koysean

Steps to reproduce

  1. Spec an external installation of MKL as intel-oneapi-mkl +cluster in packages.yaml
  2. Install any package with the above intel-oneapi-mkl +cluster as a dependency.

This bug was introduced in #37386. Since externals don't have dependencies in their specs, the reference to mpi fails and results in an error.

It would be ideal to have a fix which accomplishes the same goal as the above PR but in a way which works for external MKL as well, as the PR is valuable for fixing build errors which result when building serial libraries, for example blaspp ^intel-oneapi-mkl +cluster.

Error message

==> Error: KeyError: 'No spec with name mpi in [email protected]%[email protected]+cluster~envmods~ilp64+shared build_system=generic arch=linux-sles15-x86_64'

.../spack/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py:168, in _find_mkl_libs:
        165
        166        resolved_libs = find_libraries(libs, lib_path, shared=shared)
        167        if "+cluster" in self.spec:
  >>    168            resolved_libs = resolved_libs + self.spec["mpi"].libs
        169        return resolved_libs

Information on your system

  • Spack: 0.20.0.dev0 (b1b7dab180ba0be240dd8983d8173fa1590ef080)
  • Python: 3.6.15
  • Platform: linux-sles15-icelake
  • Concretizer: clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions