Skip to content

Commit 4ba30ab

Browse files
authored
environments: add failed concretization output for incremental env subsection (#510)
* environments: add failed concretization output for incremental env subsection #501 removed the output due to a spack performance bug. this PR re-adds the attempt to add py-numpy to the environment to show users the pitfalls of incremental envs. and has a warning that it shouldn't be attempted due to the bug. this should be reverted as soon as it's resolved. * precise language
1 parent df39e52 commit 4ba30ab

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tutorial_environments.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,22 @@ So, adding specs to an environment at a later point in time will not cause exist
373373
Adding and installing specs incrementally leads to greedy concretization, meaning that the environment may have different package versions compared to an environment created all at once.
374374

375375
When you first install ``python`` in an environment, Spack will pick a recent version.
376-
If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize:
376+
377377

378378
.. literalinclude:: outputs/environments/incremental-1.out
379379
:language: spec
380380

381+
If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize.
382+
383+
.. warning::
384+
385+
There is a known bug in Spack that causes this set of specs to take over an hour to concretize, so there is no need to run it for this tutorial.
386+
387+
.. code-block:: spec
388+
389+
$ spack install --add py-numpy@1.20 2>&1 | tail -n1
390+
internal_error("version weights must exist and be unique"). Couldn't concretize without changing the existing environment. If you are ok with changing it, try `spack concretize --force`. You could consider setting `concretizer:unify` to `when_possible` or `false` to allow multiple versions of some packages.
391+
381392
The solution is to re-concretize the environment as a whole, which causes ``python`` to downgrade to a version compatible with ``py-numpy``:
382393

383394
.. literalinclude:: outputs/environments/incremental-2.out

0 commit comments

Comments
 (0)