From 85edf2d94447483135989789088850a74e6df0e8 Mon Sep 17 00:00:00 2001 From: Caetano Melone Date: Sun, 16 Nov 2025 20:45:40 -0800 Subject: [PATCH 1/2] environments: add failed concretization output for incremental env subsection https://github.com/spack/spack-tutorial/pull/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. --- tutorial_environments.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tutorial_environments.rst b/tutorial_environments.rst index 265b70c28..0965af5e9 100644 --- a/tutorial_environments.rst +++ b/tutorial_environments.rst @@ -373,11 +373,20 @@ So, adding specs to an environment at a later point in time will not cause exist 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. When you first install ``python`` in an environment, Spack will pick a recent version. -If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize: + .. literalinclude:: outputs/environments/incremental-1.out :language: spec +If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize: + +.. code-block:: spec + + $ spack install --add py-numpy@1.20 2>&1 | tail -n1 + 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. + +There is a performance bug in Spack that will cause the above command to hang, so there's no need to run it for this tutorial. + The solution is to re-concretize the environment as a whole, which causes ``python`` to downgrade to a version compatible with ``py-numpy``: .. literalinclude:: outputs/environments/incremental-2.out From 0f6a6a783910e0a28f7244785fd45f1b05429407 Mon Sep 17 00:00:00 2001 From: Caetano Melone Date: Sun, 16 Nov 2025 21:05:44 -0800 Subject: [PATCH 2/2] precise language --- tutorial_environments.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tutorial_environments.rst b/tutorial_environments.rst index 0965af5e9..0ddb33560 100644 --- a/tutorial_environments.rst +++ b/tutorial_environments.rst @@ -378,15 +378,17 @@ When you first install ``python`` in an environment, Spack will pick a recent ve .. literalinclude:: outputs/environments/incremental-1.out :language: spec -If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize: +If you then add ``py-numpy``, it may be in conflict with the ``python`` version already installed, and fail to concretize. + +.. warning:: + + 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. .. code-block:: spec $ spack install --add py-numpy@1.20 2>&1 | tail -n1 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. -There is a performance bug in Spack that will cause the above command to hang, so there's no need to run it for this tutorial. - The solution is to re-concretize the environment as a whole, which causes ``python`` to downgrade to a version compatible with ``py-numpy``: .. literalinclude:: outputs/environments/incremental-2.out