Skip to content

Concretizer slowdown from v0.23 -> v1.0.1 #51224

@climbfuji

Description

@climbfuji

Steps to reproduce

The concretizer is much, much slower in spack v1.0.1 than it was in v0.23 for large environments with complicated dependencies. That may be partially related to the way I define the environment, but it seems that others have also seen slowdowns of the concretizer.

It was requested to provide a reproducer for this. Because the environment contains several "meta" ("meta" = packages that only list dependencies but do not contain any code themselves) packages that are not in the authoritative spack-packages repo and because I don't want the reproducer to be based on a moving codebase, I created a self-contained branch in my spack fork: https://github.com/climbfuji/spack/tree/feature/reproducer_slow_concretizer_spack_v1

The branch contains the spack v1.0.1 code plus three pull requests from @alalazo that were targeted towards performance, a copy of the authoritative "builtin" spack-packages repo with a few slight modifications (bug fixes to build with certain compilers etc), a copy of the "spack_stack" repo that contains the "meta" packages, and the pre-defined environment in var/spack/environments/unified-env-gcc.

For reproducing the concretizer timing below, one should

  • source spack/share/spack/setup-env.sh
  • update var/spack/environments/unified-env-gcc/site/*.yaml as required
  • activate environment var/spack/environments/unified-env-gcc
  • run time spack concretize --force --fresh

Note that there will be one duplicate package in the dependency tree as result of the concretization ([email protected] vs [email protected]) and a few packages for which multiple versions are installed on purpose (crtm, esmf, mapl).

Error message

With the spack v1.0.1+ code in my branch (see above):

time spack concretize --force --fresh
...
real    21m30.643s
user    20m53.817s
sys     0m35.621s

With spack v0.23 for the same environment:

time spack concretize --force --fresh
...
real    4m55.923s
user    4m21.211s
sys     0m11.032s

Information on your system

[unified-env-gcc] [dom@bounty spack-1.0]$ spack debug report
* **Spack:** 1.0.1 (https://github.com/spack/spack/commit/62aa023c83fbcecb482f5c6dcc4bb43f1ae70971)
* **Builtin repo:** not available
* **Python:** 3.9.21
* **Platform:** linux-almalinux9-skylake

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions