Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment.py: concretize together by default #29942

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/spack/docs/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,17 @@ Concretizing
^^^^^^^^^^^^

Once some user specs have been added to an environment, they can be
concretized. *By default specs are concretized separately*, one after
the other. This mode of operation permits to deploy a full
software stack where multiple configurations of the same package
need to be installed alongside each other. Central installations done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reasoning might be poorly explained:

  • We've since added stacks to support this (while that isn't specifically a problem this PR needs to address, this docs section should probably point to the section on stacks for this specific use case)
  • Admins might not be the only people who benefit: there may be users who want to install separate tools in a single environment, and it may be that those tools cannot be concretized together (i.e. if each root provides a different top-level executable, but each top-level executable might depend on mutually exclusive library configurations)

Do you think it might be worth adding an option similar to --with-view? I think it would be OK to switch the default but IMO we should provide an option so that users can control this from the command line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reasoning might be poorly explained:

Sorry to clarify: I mean that the documentation, as originally written, is missing details.

at HPC centers by system administrators or user support groups
are a common case that fits in this behavior.
Environments *can also be configured to concretize all
concretized. By default, environments *concretize all
the root specs in a self-consistent way* to ensure that
each package in the environment comes with a single configuration. This
mode of operation is usually what is required by software developers that
want to deploy their development environment.
Alternatively, environments can be *concretized separately*. This mode
of operation permits to deploy a full
software stack where multiple configurations of the same package
need to be installed alongside each other. Central installations done
at HPC centers by system administrators or user support groups
are a common case that fits in this behavior.

Regardless of which mode of operation has been chosen, the following
command will ensure all the root specs are concretized according to the
Expand Down
4 changes: 2 additions & 2 deletions lib/spack/spack/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,8 @@ def _read_manifest(self, f, raw_yaml=None):
self.views = {}
# Retrieve the current concretization strategy
configuration = config_dict(self.yaml)
# default concretization to separately
self.concretization = configuration.get('concretization', 'separately')
# default concretization to together
self.concretization = configuration.get('concretization', 'together')

# Retrieve dev-build packages:
self.dev_specs = configuration.get('develop', {})
Expand Down