spack/lib/spack/docs
Nathan Hanford af62a062cc
Installer: rewire spliced specs via RewireTask (#39136)
This PR allows users to configure explicit splicing replacement of an abstract spec in the concretizer.

concretizer:
  splice:
    explicit:
    - target: mpi
      replacement: mpich/abcdef
      transitive: true

This config block would mean "for any spec that concretizes to use mpi, splice in mpich/abcdef in place of the mpi it would naturally concretize to use. See #20262, #26873, #27919, and #46382 for PRs enabling splicing in the Spec object. This PR will be the first place the splice method is used in a user-facing manner. See https://spack.readthedocs.io/en/latest/spack.html#spack.spec.Spec.splice for more information on splicing.

This will allow users to reuse generic public binaries while splicing in the performant local mpi implementation on their system.

In the config file, the target may be any abstract spec. The replacement must be a spec that includes an abstract hash `/abcdef`. The transitive key is optional, defaulting to true if left out.

Two important items to note:

1. When writing explicit splice config, the user is in charge of ensuring that the replacement specs they use are binary compatible with whatever targets they replace. In practice, this will likely require either specific knowledge of what packages will be installed by the user's workflow, or somewhat more specific abstract "target" specs for splicing, to ensure binary compatibility.
2. Explicit splices can cause the output of the concretizer not to satisfy the input. For example, using the config above and consider a package in a binary cache `hdf5/xyzabc` that depends on mvapich2. Then the command `spack install hdf5/xyzabc` will instead install the result of splicing `mpich/abcdef` into `hdf5/xyzabc` in place of whatever mvapich2 spec it previously depended on. When this occurs, a warning message is printed `Warning: explicit splice configuration has caused the the concretized spec {concrete_spec} not to satisfy the input spec {input_spec}".

Highlighted technical details of implementation:

1. This PR required modifying the installer to have two separate types of Tasks, `RewireTask` and `BuildTask`. Spliced specs are queued as `RewireTask` and standard specs are queued as `BuildTask`. Each spliced spec retains a pointer to its build_spec for provenance. If a RewireTask is dequeued and the associated `build_spec` is neither available in the install_tree nor from a binary cache, the RewireTask is requeued with a new dependency on a BuildTask for the build_spec, and BuildTasks are queued for the build spec and its dependencies.
2. Relocation is modified so that a spack binary can be simultaneously installed and rewired. This ensures that installing the build_spec is not necessary when splicing from a binary cache.
3. The splicing model is modified to more accurately represent build dependencies -- that is, spliced specs do not have build dependencies, as spliced specs are never built. Their build_specs retain the build dependencies, as they may be built as part of installing the spliced spec.
4. There were vestiges of the compiler bootstrapping logic that were not removed in #46237 because I asked alalazo to leave them in to avoid making the rebase for this PR harder than it needed to be. Those last remains are removed in this PR.

Co-authored-by: Nathan Hanford <hanford1@llnl.gov>
Co-authored-by: Gregory Becker <becker33@llnl.gov>
Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-10-10 15:48:58 -07:00
..
_gh_pages_redirect Use https for links (#19244) 2020-10-09 11:24:09 -05:00
_pygments Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
_static make empty _static directory "exist" to git 2014-01-09 14:03:32 +01:00
_templates docs: re-enable google analytics (#43974) 2024-05-02 21:56:19 -04:00
build_systems Stand-alone testing: remove deprecated methods (#45752) 2024-10-03 11:36:18 +00:00
example_files Implement an optional compiler bootstrapping phase 2019-09-13 22:57:15 -07:00
images Installer: rewire spliced specs via RewireTask (#39136) 2024-10-10 15:48:58 -07:00
tables AutotoolsPackage / MakefilePackage: add gmake build dependency (#40380) 2023-10-18 19:56:54 +02:00
.gitignore docs: Replace package list with packages.spack.io (#40251) 2023-10-01 05:36:22 +02:00
basic_usage.rst Docs/Windows: Clarify supported shells and caveats (#46381) 2024-09-20 11:55:17 -07:00
binary_caches.rst Allow packages to be pushed to build cache after install from source (#42423) 2024-04-11 19:43:13 -06:00
bootstrapping.rst Fix spack find bootstrapping docs (#43074) 2024-03-07 14:13:32 +01:00
build_settings.rst Installer: rewire spliced specs via RewireTask (#39136) 2024-10-10 15:48:58 -07:00
build_systems.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
chain.rst docs: refer to upstreams.yaml in chain.rst title (#46475) 2024-09-19 13:08:05 +02:00
command_index.in Rework command reference in docs, add spack commands command 2018-02-12 20:25:17 -08:00
conf.py stable_partition: use TypeVar (#46686) 2024-10-01 15:58:24 +02:00
config_yaml.rst certs: fix interpolation and disallow relative paths (#44030) 2024-05-07 11:16:32 +02:00
configuration.rst Allow loading extensions through python entry-points (#42370) 2024-03-06 11:18:49 +01:00
containers.rst containers: rm centos7 since EOL (#45049) 2024-07-04 22:22:23 +02:00
contribution_guide.rst CI: Add documentation for adding new stacks and runners (#42179) 2024-09-27 13:09:41 -07:00
developer_guide.rst Deprecate config:install_missing_compilers (#46237) 2024-09-10 20:02:05 +02:00
environments.rst Docs: environment update (#44087) 2024-10-01 22:26:31 +02:00
extensions.rst Allow loading extensions through python entry-points (#42370) 2024-03-06 11:18:49 +01:00
features.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
frequently_asked_questions.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
getting_started.rst docs: add --depth=2 to reduce download size (#46605) 2024-09-27 09:09:19 -07:00
gpu_configuration.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
index.rst docs: add --depth=2 to reduce download size (#46605) 2024-09-27 09:09:19 -07:00
Makefile API Docs: fix broken reference targets 2021-07-16 08:30:56 -07:00
mirrors.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
module_file_generation.svg SC17: reworked module file tutorial section (#5657) 2017-11-12 00:27:20 -08:00
module_file_support.rst modules: allow autoload: run, like in environment views (#42743) 2024-03-04 08:49:45 +01:00
packages_yaml.rst develop: Add -b/--build-directory option to set build_directory package attribute (#39606) 2024-02-16 06:30:58 +00:00
packaging_guide.rst Add options for sparse checkout in GitFetcher (#45473) 2024-08-15 05:28:34 +00:00
pipelines.rst Deprecate config:install_missing_compilers (#46237) 2024-09-10 20:02:05 +02:00
replace_conda_homebrew.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
repositories.rst docs: remove warning about repositories and package extension (#44247) 2024-05-17 22:03:57 +00:00
requirements.txt build(deps): bump urllib3 from 2.2.2 to 2.2.3 in /lib/spack/docs (#46368) 2024-09-13 08:15:21 -05:00
signing.rst Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
spack.yaml Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00