Replies: 6 comments 3 replies
-
@tgamblin @scheibelp @becker33 @trws Above there's a slightly extended write up of my notes from yesterday. Feel free to edit it to add information or evolve the proposal. |
Beta Was this translation helpful? Give feedback.
-
Another thought. If we go with this model, and we curate the definition of which libraries (or in general which resources) are needed to use a component we can minimize deployments by creating artifacts for an end-user that strip all the unneeded components. Think for instance a minimal size final image for |
Beta Was this translation helpful? Give feedback.
-
Regarding:
Does this mean that a dependent which uses In general, if this specific implementation provides |
Beta Was this translation helpful? Give feedback.
-
We also discussed the concept of a "use-variant" as an alternative (variants which describe how a package is used rather than how it is built), for
|
Beta Was this translation helpful? Give feedback.
-
Adding a note on the As an example, consider:
where B needs the spec['boost'].libs should return only spec['boost:components=hana,json,static_string'].libs |
Beta Was this translation helpful? Give feedback.
-
I Think this is what I need too for the use case of fftw-api where I wrongly expected it to transmit the variant to the concrete package:
spack debug report
So, I'm very interested. |
Beta Was this translation helpful? Give feedback.
-
Wrapping up a few thoughts exchanged in a meeting about how to handle packages that bundle many components. Examples of such packages are
intel-parallel-studio
,boost
,cray-libsci
andllvm
.Requirements
A few facts about the packages we want to model follows:
intel-parallel-studio
,cray-libsci
) and packages that can be built from sources (e.g.boost
orllvm
)intel-parallel-studio
package)Related PRs or Issues
Proposed solution
A solution proposed to deal with the requirements above is to extend the capabilities of virtual packages by:
variant
andconflicts
directives for virtual packagespackage.py
file (for interfaces that have many different implementations) or alternatively in the samepackage.py
where the only provider is declared (for packages that bundle components that can be picked singularly)At a high level this approach will go in the direction of separating how a software is used (virtual packages) from how a software is built or deployed (regular packages).
Use Case: Intel Parallel Studio
This sketched example wants to show how we can deal with conflicting features that can't be used together. Given this metadata in the package files:
by concretizing the spec:
$ spack solve client
we would get a DAG like:
with the following properties:
required: ['mkl threads=openmp']
andprovided: ['mkl threads=openmp']
required: ['lapack']
andprovided: ['lapack threads=openmp']
The differences between
provided
andrequired
in the edge attributes stems from additional constraints that account for non-local facts and for the properties of the provider. Theprovided
attribute can never be less strict than the correspondingrequired
. In this example the fact thatintel-parallel-studio
declared to provide three virtuals together plus the requirement fromclient
to use the threaded version ofmkl
implies thatadep
is provided the threaded version oflapack
.Use Case: Boost
This example is to show how we can deal with packages that bundle many components:
Beta Was this translation helpful? Give feedback.
All reactions