Giter Club home page Giter Club logo

Comments (2)

alalazo avatar alalazo commented on June 3, 2024

Hmm, the steps to reproduce are not really correct - so it's hard to check if there was an error there. For instance:

spack compiler add [email protected]

doesn't work to add a compiler, but since you then say that:

$ spack compilers
==> Available compilers
-- gcc ubuntu20.04-x86_64 ---------------------------------------
[email protected] [email protected] [email protected]

I assume you used something like:

$ spack compiler add $(spack location -i [email protected])

?

That said, using the environment above with:

  • Spack: 0.22.0.dev0 (2867547)
  • Python: 3.11.5
  • Platform: linux-ubuntu20.04-icelake
  • Concretizer: clingo

and with the following compilers:

$ spack compilers
==> Available compilers
-- clang ubuntu20.04-x86_64 -------------------------------------
[email protected]

-- gcc ubuntu20.04-x86_64 ---------------------------------------
[email protected]  [email protected]  [email protected]

$ spack concretize --fresh

I cannot reproduce your issue, since the environment is concretized with [email protected]

Did you try using --fresh during concretization? My guess is that you might be reusing previous installations that you have on disk (and since you don't force the compiler Spack assumes that you're fine with any available).

For reference:

spack.lock.txt

from spack.

Chrismarsh avatar Chrismarsh commented on June 3, 2024

I'm seeing this same behaviour, but with external compilers.

I have packages.yaml set to use my external oneapi compiler

$ cat ~/.spack/packages.yaml 
packages:
  all:
    compiler: [[email protected]]

which was automatically found and set in my compilers.yaml

$ cat ~/.spack/linux/compilers.yaml 
compilers:
- compiler:
    spec: oneapi@=2023.2.0
    paths:
      cc: /fs/ssm/main/opt/intelcomp/inteloneapi-2023.2.0/intelcomp+mpi+mkl/rhel-8-amd64-64/bin/icx
      cxx: /fs/ssm/main/opt/intelcomp/inteloneapi-2023.2.0/intelcomp+mpi+mkl/rhel-8-amd64-64/bin/icpx
      f77: /fs/ssm/main/opt/intelcomp/inteloneapi-2023.2.0/intelcomp+mpi+mkl/rhel-8-amd64-64/bin/ifx
      fc: /fs/ssm/main/opt/intelcomp/inteloneapi-2023.2.0/intelcomp+mpi+mkl/rhel-8-amd64-64/bin/ifx
    flags: {}
    operating_system: rhel8
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []


<snip>

If I query the spec individually, spack resolves using the oneapi compiler as expected

$ spack spec [email protected]
Input spec
--------------------------------
 -   [email protected]

Concretized
--------------------------------
 -   [email protected]%[email protected]~doc+pic+shared build_system=autotools arch=linux-rhel8-icelake

However, if I install a new env from a .yaml file, it defaults to the system's gcc8.3

$ spack concretize -f
==> Concretized [email protected]
 -   ly3fhmn  [email protected]%[email protected]~doc+pic+shared build_system=autotools arch=linux-rhel8-icelake

I have also tried adding my compiler choice to my env, but it produces the same result

$ spack config add "packages:all:compiler:[[email protected]]"

Weirdly (to me), most packages are concretized with the wrong compiler but some are, randomly (?), using the correct oneapi compiler

from spack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.