Skip to content

benchpark setup: use preexisting spack#1323

Open
scheibelp wants to merge 4 commits into
developfrom
pick-spack
Open

benchpark setup: use preexisting spack#1323
scheibelp wants to merge 4 commits into
developfrom
pick-spack

Conversation

@scheibelp

@scheibelp scheibelp commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator

Add a --spack option to benchpark setup

Like

./bin/benchpark system init --dest=tioga llnl-elcapitan cluster=tioga compiler=rocmcc
./bin/benchpark experiment init --dest=kripke tioga kripke +rocm
./bin/benchpark setup --spack=`pwd`/spack tioga/kripke wkp/
^
(this last command is what changed)

when setting up a second experiment, the user would not specify --spack:

./bin/benchpark experiment init --dest=amg2023 tioga amg2023 +rocm
./bin/benchpark setup tioga/amg2023 wkp/
(no --spack on this)

In this case Benchpark does no configuration of the Spack instance (so for example has no awareness of the benchpark repository). It creates a symlink to the specified Spack instance. The idea is that someone can use any checkout they want of Spack (e.g. a personal branch) and configure it however they like.

If this were used to share installs with several workspaces, or access a binary cache, the experiment builds would not be repeatable unless this Spack instance configured concretizer:reuse:false.

TODOs

  • This is probably not working yet, also consider semantics
  • If we use a newer Ramble, then benchpark can add ~spack_install_compilers to the ramble.yaml package manager config, and then I think we can avoid any modifications of the shared spack instance
  • Docs for the feature

@github-actions github-actions Bot added the feature New feature or request label Apr 25, 2026
@pearce8 pearce8 added this to the May 2026 milestone May 4, 2026
@scheibelp

Copy link
Copy Markdown
Collaborator Author

@michaelmckinsey1 I've confirmed that the spack instance designated in benchpark setup --spack=... does not get updated based on checkout-versions.yaml. In low-level terms: this is because RuntimeResources.bootstrap() is only called for Ramble/Spack/spack-packages inside of ~/.benchpark (i.e. main.py is the only caller of that function).

(that also means for example that a user can modify the Spack instance in experiments_root after it is generated, and Benchpark would not undo those changes)

@pearce8 pearce8 requested a review from michaelmckinsey1 June 9, 2026 21:26

@michaelmckinsey1 michaelmckinsey1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you still looking to complete these todo's from the description?

  • If we use a newer Ramble, then benchpark can add ~spack_install_compilers to the ramble.yaml package manager config, and then I think we can avoid any modifications of the shared spack instance
  • Docs for the feature

Comment on lines +224 to +228
pkg_str = f"""\
export SPACK_USER_CACHE_PATH={spack_user_cache_path}
export SPACK_DISABLE_LOCAL_CONFIG=1
. {spack_location}/share/spack/setup-env.sh
"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit. The other branch of this if statement basically does the same logic, can we refactor these lines to be after the if-elif?

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.20%. Comparing base (8062187) to head (3c97bfa).
⚠️ Report is 41 commits behind head on develop.

Files with missing lines Patch % Lines
lib/benchpark/cmd/setup.py 42.85% 4 Missing ⚠️
lib/benchpark/runtime.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1323      +/-   ##
===========================================
+ Coverage    62.43%   64.20%   +1.77%     
===========================================
  Files           49       49              
  Lines         3780     3819      +39     
  Branches       326      338      +12     
===========================================
+ Hits          2360     2452      +92     
+ Misses        1406     1348      -58     
- Partials        14       19       +5     
Files with missing lines Coverage Δ
lib/benchpark/runtime.py 91.37% <66.66%> (-0.73%) ⬇️
lib/benchpark/cmd/setup.py 86.20% <42.85%> (-2.29%) ⬇️

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pearce8 pearce8 modified the milestones: May 2026, June 2026 Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants