Skip to content

Conversation

@michaelmckinsey1
Copy link
Collaborator

@michaelmckinsey1 michaelmckinsey1 commented Feb 27, 2025

Description

Todo:

  • superceded by Docs for developer scripts #695 -> We need a doc page for utilities in lib/scripts, perhaps call it "Benchpark Utils".
  • Try running this script as CI for package x if repo/x/package.py is modified

Adding/modifying core functionality, CI, or documentation:

  • Add benchpark/lib/scripts/spackdiff.py
  • Update bin/benchpark-python, pyproject.toml, and lib/benchpark/cmd/unit_test.py to make interactive python optional during execution of bin/benchpark-python. It should be disabled while using this script.
  • Rename altdiff.py to diffSpecs.py to match new script name.

Examples

Note: terminal output is colorized
image

We can check against spack tags like v0.23.1, or commits like 0b3b49b, which benchpark develop uses.
python spackdiff.py --spack-tag="0b3b49b"

Comparing benchpark packages to packages in spack 0b3b49b
Previous HEAD position was 99405e6a4d nlcglib: add v1.1.0 (#44580)
HEAD is now at 0b3b49b4e0 installer.py: handle external roots the same (#44917)
ad
    ad/package.py does not exist in spack
amg2023
     7 different lines
babelstream
     28 different lines
branson
     1 different lines
caliper
     95 different lines
cray-mpich
     67 different lines
cublas
    cublas/package.py does not exist in spack
cusolver
    cusolver/package.py does not exist in spack
enzyme
     33 different lines
essl
     34 different lines
genesis
     87 different lines
gromacs
     59 different lines
hipsycl
     58 different lines
hpcg
     55 different lines
hpl
     13 different lines
hypre
     208 different lines
kokkos
     207 different lines
kripke
     28 different lines
laghos
     22 different lines
lammps
     438 different lines
lapack-xl
    lapack-xl/package.py does not exist in spack
md-test
    md-test/package.py does not exist in spack
mfem
     604 different lines
osu-micro-benchmarks
     42 different lines
phloem
    phloem/package.py does not exist in spack
quicksilver
     9 different lines
qws
    qws/package.py does not exist in spack
raja-perf
    raja-perf/package.py does not exist in spack
remhos
     20 different lines
rocblas
     97 different lines
rocsolver
     67 different lines
saxpy
    saxpy/package.py does not exist in spack
smb
    smb/package.py does not exist in spack
spectrum-mpi
     81 different lines
stream
     33 different lines

See which lines are different for branson
python spackdiff.py --spack-tag="0b3b49b" --print-diff

branson
     1 different lines
--- spack branson
+++ benchpark branson
@@ -26,7 +26,6 @@
     )

     version("0.81", sha256="493f720904791f06b49ff48c17a681532c6a4d9fa59636522cf3f9700e77efe4")

     version("0.8", sha256="85ffee110f89be00c37798700508b66b0d15de1d98c54328b6d02a9eb2cf1cb8")

-

     depends_on("mpi@2:")

 

     depends_on(Boost.with_default_variants, when="@:0.81")

@@ -49,3 +48,4 @@
         install(join_path(self.build_directory, "BRANSON"), prefix.bin)

         install("LICENSE.md", prefix.doc)

         install("README.md", prefix.doc)

+        install_tree("inputs", prefix.inputs)

So the only difference between benchpark and spack branson package.py is the line install_tree("inputs", prefix.inputs) in benchpark.

@michaelmckinsey1 michaelmckinsey1 linked an issue Feb 27, 2025 that may be closed by this pull request
@michaelmckinsey1 michaelmckinsey1 self-assigned this Feb 27, 2025
@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from 70f519c to 7cb35b2 Compare February 28, 2025 22:40
@michaelmckinsey1 michaelmckinsey1 marked this pull request as ready for review February 28, 2025 22:41
Copy link
Collaborator

@pearce8 pearce8 left a comment

Choose a reason for hiding this comment

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

We need a doc page for utilities in lib/scripts, perhaps call it "Benchpark Utils".

In the doc, please add how to use the spackdiff. Also the altdiff. Although we need better names for these; how about:

  • spackdiff should be diffPackages
  • altdiff should be diffSpecs

Is there a way to have a more uniform way of using these?

@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from 7cb35b2 to c628885 Compare March 3, 2025 20:33
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Mar 3, 2025
@michaelmckinsey1 michaelmckinsey1 changed the title Script to Compare Packages in Benchpark Against Spack Tag [WIP] Script to Compare Packages in Benchpark Against Spack Tag Mar 3, 2025
@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from 27ce164 to 2dd5c9a Compare March 6, 2025 00:27
@github-actions github-actions bot added ci CI, unit tests, GitHub actions application labels Mar 6, 2025
@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from 1881911 to 9138dcf Compare March 6, 2025 01:33
@pearce8
Copy link
Collaborator

pearce8 commented Mar 24, 2025

@michaelmckinsey1 address #695, get the latest changes from develop into #648, update docs as needed.

@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from d99bf5e to 01a7c0d Compare March 26, 2025 18:43
@github-actions github-actions bot added the feature New feature or request label Mar 26, 2025
@michaelmckinsey1 michaelmckinsey1 marked this pull request as draft March 26, 2025 19:01
@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from 93f3bae to 6d05357 Compare March 26, 2025 23:50
@michaelmckinsey1
Copy link
Collaborator Author

michaelmckinsey1 commented Mar 27, 2025

https://github.com/LLNL/benchpark/actions/runs/14095972151/job/39483687323

Example of how the CI will fail if one or more package.py files are the same as in spack. Deleting the benchpark package.py will fix the CI test. Spack package.py's were copied over for the example, changes to the files were subsequently reverted.

@michaelmckinsey1 michaelmckinsey1 marked this pull request as ready for review March 27, 2025 01:10
@michaelmckinsey1 michaelmckinsey1 force-pushed the feature/spack-upstream-596 branch from b0fd1ab to 62203a9 Compare March 27, 2025 01:19
@michaelmckinsey1 michaelmckinsey1 changed the title [WIP] Script to Compare Packages in Benchpark Against Spack Tag Script to Compare Packages in Benchpark Against Spack Tag Mar 27, 2025
@michaelmckinsey1 michaelmckinsey1 added the ready for review Ready for review label Mar 27, 2025
@michaelmckinsey1 michaelmckinsey1 mentioned this pull request Mar 27, 2025
10 tasks
@pearce8 pearce8 enabled auto-merge March 27, 2025 22:26
@pearce8 pearce8 added this pull request to the merge queue Mar 27, 2025
Merged via the queue into develop with commit 3d9e918 Mar 27, 2025
13 checks passed
@pearce8 pearce8 deleted the feature/spack-upstream-596 branch March 27, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application ci CI, unit tests, GitHub actions dependencies Pull requests that update a dependency file feature New feature or request ready for review Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check if package in repo matches package in Spack upstream

3 participants