Coder Social home page Coder Social logo

Comments (5)

haampie avatar haampie commented on September 27, 2024

I cannot reproduce this

from spack.

haampie avatar haampie commented on September 27, 2024

Ok, I guess I get it now. And I think it was by design.

Suppose you install two specs x and y. The two ways here are roughly equivalent:

spack install x y  # no env

spack env create .
spack env activate .
spack add x y
spack install  # active env

in both cases x and y are marked explicit.

Now if you do spack install z, whether an env is active or not, z will be marked explicit. The only difference with an active env is that z is located in the env instead of concretized.

Similarly, if you would install one root specifically with spack install x on the active env, x gets marked explicit, since it's installed specifically. If y happens to be a dependency of x, it does not get marked explicit, since you didn't specifically ask to install it.

So, either leave it as is, or also add environment roots that are deps of the specifically selected spack install z to the list of things to mark explicit.

from spack.

koysean avatar koysean commented on September 27, 2024

In case there's still trouble with reproducing this: I deleted my ~/.spack and was able to reproduce it again with a fresh clone of spack. Here's my step-by-step:

  1. clone spack and check out v0.22.0
  2. make a directory for the environment and copy the spack.yaml above into the environment
  3. source the Spack shell env and activate the environment (. spack/share/spack/setup-env.sh; spack env activate <env_dir>)
  4. spack concretize
  5. spack install
  6. spack find --explicit

Since I had no configs set up, Spack automatically populated the compiler config in the environment, speccing out the system [email protected] installation in /usr/bin.

With that out of the way -- I'm installing the environment with spack install. When I run this command I am explicitly asking Spack to install all of the concretized root specs. To me this means all root specs should be marked as explicit.

It seems to me that running spack concretize; spack install off of the spack.yaml I posted above is equivalent to this example you gave:

spack env create .
spack env activate .
spack add x y
spack install  # active env

in which, as you said, both x and y should be marked explicit.

edit: forgot to mention, but I think someone on the Spack Slack speculated that this has to do with the reuse and unify settings. I can try testing with other settings to see if certain combinations don't produce this bug.

from spack.

koysean avatar koysean commented on September 27, 2024

Did a bit more testing, and these settings

reuse: true
unify: true

makes both cmake and blt explicit, which is the expected behavior.

unify: false and unify: when_possible both reproduce the issue, even though I'm pretty sure they concretize the same specs.

from spack.

haampie avatar haampie commented on September 27, 2024

OK, I managed to reproduce an issue.

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.