spack uninstall can uninstall specs with multiple roots#11977
Merged
scheibelp merged 4 commits intospack:developfrom Jul 15, 2019
Merged
spack uninstall can uninstall specs with multiple roots#11977scheibelp merged 4 commits intospack:developfrom
scheibelp merged 4 commits intospack:developfrom
Conversation
adamjstewart
approved these changes
Jul 10, 2019
Member
adamjstewart
left a comment
There was a problem hiding this comment.
This PR works like a charm! I successfully uninstalled all 28 Python installations that Spack decided I needed with a single call to uninstall. I noticed an unrelated uninstall bug that I'll report in a separate issue.
Member
Author
|
Trying to uninstall on a docker image: $ spack install hpx build_type=Release cxxstd=14 instrumentation=valgrind ^[email protected] [email protected]without c6f0f20: $ time spack uninstall -aRy
...
real 0m15.976s
user 0m14.538s
sys 0m1.370swith c6f0f20: $ time spack uninstall -aRy
...
real 0m9.252s
user 0m7.334s
sys 0m1.514sFor smaller tests involving only one or two simple specs, the gain seems to be only around 10%. |
Member
|
I did notice things were rather slow when trying to uninstall all hundreds of packages in my installation. Hopefully that will speed things up. |
scheibelp
reviewed
Jul 12, 2019
fixes spack#3690 Uninstalling dependents of a spec was relying on a traversal of the parents done by inspecting spec._dependents. This is in turn a DependencyMap that maps a package name to a single DependencySpec object (an edge in the DAG) and cannot thus model the case where a spec has multiple configurations of the same parent package installed. This commit works around this issue by constructing the list of specs to be uninstalled in an alternative way, and adds tests to verify the behavior. The core issue with DependencyMap is not resolved here.
This approach seems to uninstall specs considerably faster, in particular for large number of specs.
53fb82f to
b0a4dc4
Compare
scheibelp
approved these changes
Jul 15, 2019
Member
|
Thanks! |
dev-zero
pushed a commit
to dev-zero/spack
that referenced
this pull request
Aug 13, 2019
Fixes spack#3690 Fixes spack#5637 Uninstalling dependents of a spec was relying on a traversal of the parents done by inspecting spec._dependents. This is in turn a DependencyMap that maps a package name to a single DependencySpec object (an edge in the DAG) and cannot thus model the case where a spec has multiple configurations of the same parent package installed (for example if different versions of the same Python library depend on the same Python installation). This commit works around this issue by constructing the list of specs to be uninstalled in an alternative way, and adds tests to verify the behavior. The core issue with DependencyMap is not resolved here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #3690
fixes #5637
Uninstalling dependents of a spec was relying on a traversal of the parents done by inspecting
spec._dependents. This is in turn aDependencyMapthat maps a package name to a singleDependencySpecobject (an edge in the DAG) and cannot thus model the case where a spec has multiple configurations of the same parent package installed.This commit works around this issue by constructing the list of specs to be uninstalled in an alternative way, and adds tests to verify the behavior. The core issue with
DependencyMapis not resolved here.