Skip to content
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
43539af
elcap definition: also adding some convenience methods - partial
scheibelp Jul 26, 2025
138657c
refactors and bug fixes
scheibelp Jul 26, 2025
8109643
messed up with top-level config arrangement
scheibelp Jul 26, 2025
9581392
env/rpaths/flags go under extra_attributes
scheibelp Aug 1, 2025
7b0b2f9
llnl-cluster update
scheibelp Aug 1, 2025
0a99bfc
llnl-sierra update (partial)
scheibelp Aug 1, 2025
40cc227
create helper function for hybrid compiler requirements
scheibelp Aug 2, 2025
15bca9f
update riken-fugaku
scheibelp Aug 2, 2025
81b57df
llnl-matrix update
scheibelp Aug 2, 2025
1b729de
update lanl-venado
scheibelp Aug 2, 2025
b609c9d
update jsc-juwels
scheibelp Aug 2, 2025
f1f850d
allow merging lists, better error reporting
scheibelp Aug 2, 2025
13f41f1
cscs-eiger update
scheibelp Aug 2, 2025
6786be9
handle merging w/merge method vs. manually reaching into dicts
scheibelp Aug 2, 2025
d5ff2b1
update cscs-daint
scheibelp Aug 2, 2025
aa25402
update csc-lumi and fix rocm config in llnl-elcapitan
scheibelp Aug 3, 2025
b232b53
update aws-pcluster; update gcc spec in llnl-elcapitan
scheibelp Aug 3, 2025
a396bfa
fix some details
scheibelp Aug 3, 2025
eaa09df
use merge helper in llnl-elcapitan
scheibelp Aug 3, 2025
fb20af6
reference error
scheibelp Aug 3, 2025
4353299
llvm-amdgpu exists as both a compiler and a lib dependency, which wou…
scheibelp Aug 3, 2025
2b5772e
same issue for csc-lumi
scheibelp Aug 3, 2025
9567d4c
add language dependencies as needed (generally on all of c/c++/fortra…
scheibelp Aug 5, 2025
60fcf84
style auto format
scheibelp Aug 7, 2025
ced12fa
non-auto style fix
scheibelp Aug 7, 2025
0b82486
generix-x86 system generates no package config: fix packages.yaml gen…
scheibelp Aug 7, 2025
c31b5fa
fix bad import (make it spack-1.0-compliant)
scheibelp Aug 7, 2025
83f6d3d
messed up cfg merge for cscs-daint
scheibelp Aug 7, 2025
5fb2308
more gromacs import fixing
scheibelp Aug 7, 2025
0851a59
another import issue w/gromacs
scheibelp Aug 7, 2025
d905c1d
branson import issue
scheibelp Aug 7, 2025
27e28bc
need llvm-amdgpu external always; dont force compiler requirement on …
scheibelp Aug 7, 2025
3a0a809
auto format
scheibelp Aug 7, 2025
29f176e
using same list object twice causes alias in yaml dump
scheibelp Aug 7, 2025
f6a5c55
rocm/cce configs need to be lists
scheibelp Aug 8, 2025
e0fd514
kripke rocm arch specification
scheibelp Aug 8, 2025
b81a836
log all commands that are run to make it easier to replicate issues
scheibelp Aug 8, 2025
6681dcc
merge from develop (import conflicts)
scheibelp Aug 12, 2025
498ad0b
auto style
scheibelp Aug 12, 2025
5a531e1
kripke should build w/ mpi
scheibelp Aug 12, 2025
d4e7a48
Merge branch 'develop' into spack-1-update
scheibelp Aug 14, 2025
c021299
blt 0.7.0 is setting something that bypasses spack compiler wrappers,…
scheibelp Aug 15, 2025
6cae240
hypre no longer has cublas variant
scheibelp Aug 15, 2025
6be87af
hypre fortran logic disabled for now; amg2023 needs cxx; hypre no lon…
scheibelp Aug 15, 2025
61124cb
Merge branch 'develop' into spack-1-update
scheibelp Aug 18, 2025
0fe5b30
update instructions based on changes to run-experiment script
scheibelp Aug 18, 2025
c9903cf
laghos/hypre dependency updates
scheibelp Aug 18, 2025
7988cfd
llvm-amdgpu is the compiler and the package, need to reach into llvm/…
scheibelp Aug 18, 2025
45c40c5
control spack-packages builtin repository
scheibelp Aug 19, 2025
3abc7a4
auto-style
scheibelp Aug 19, 2025
f2ef5b4
forgot to reference package repo inside of git repo
scheibelp Aug 19, 2025
1c73ba2
enforce hypre+lapack
scheibelp Aug 20, 2025
0a95ce6
llnl-cluster compiler weighting for oneapi: make it compatible with e…
scheibelp Aug 21, 2025
851444e
auto style fix
scheibelp Aug 21, 2025
aae2f67
merge from develop (minor conflicts)
scheibelp Aug 25, 2025
051fbd5
try to fix raja-perf/dane; laghos/dane
scheibelp Aug 26, 2025
2ed9639
tuolumne/raja-perf/rocm appears to require same libunwind fix as tioga
scheibelp Aug 26, 2025
f1e72fa
interface for benchpark setup has changed, print command that omits s…
scheibelp Aug 27, 2025
213ca36
spack concretization defaults to older hypre dep, which does not seem…
scheibelp Aug 27, 2025
614ae34
the package is called llvm, not clang (fix for sierra system)
scheibelp Aug 28, 2025
b0a3f3a
hpl change: for some reason needs git attribute at package level (not…
scheibelp Aug 29, 2025
6b87a48
proper definition of oneapi compiler on oneapi cluster (was accidenta…
scheibelp Aug 29, 2025
542d03b
add separate section for mpi implementation
scheibelp Aug 29, 2025
69eab82
adjust preference strategy for encouraging use of desired compiler
scheibelp Sep 1, 2025
7a338d7
same change for dane
scheibelp Sep 1, 2025
948ebe8
placeholder default-compiler (our env establishes preferences that ma…
scheibelp Sep 1, 2025
8d5a725
style edit
scheibelp Sep 1, 2025
c5fa931
default compiler selection for llnl-cluster (while it shouldn't matte…
scheibelp Sep 2, 2025
aaa577a
Merge branch 'develop' into spack-1-update
scheibelp Sep 3, 2025
ed3cf29
auto style fix
scheibelp Sep 3, 2025
709ceda
apply fixes from llnl-cluster to llnl-matrix
scheibelp Sep 3, 2025
fbfb116
we agreed to rm kripke/lassen test
scheibelp Sep 3, 2025
844b900
relocate spack bootstrap cache (in latest tests it is 129 chars - one…
scheibelp Sep 3, 2025
c00502b
keep trying to shorten
scheibelp Sep 4, 2025
c4b3747
Merge branch 'develop' into spack-1-update
scheibelp Sep 8, 2025
65c6054
rm override now that subclass doesnt actually add any logic
scheibelp Sep 8, 2025
649ea9f
rm commented-out config (llvm-amdgpu package was merged with the comp…
scheibelp Sep 8, 2025
7d26c1f
rm unused lang dependencies
scheibelp Sep 9, 2025
ec46558
Merge branch 'develop' into spack-1-update
pearce8 Sep 10, 2025
12d7390
update blt import to make it spack-1.0-compat
scheibelp Sep 10, 2025
1f75eda
universal requirement for blt 0.6.2 no longer works with merged in up…
scheibelp Sep 10, 2025
cae0603
Revert name shortening.
pearce8 Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab/tests/non_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workflow:
- HOST: lassen
ARCHCONFIG: llnl-sierra
SCHEDULER_PARAMETERS: -nnodes 1 -W 40 -q pci
BENCHMARK: [amg2023, kripke]
BENCHMARK: [amg2023]
VARIANT: [+cuda, +openmp]
run_tests_nonshared:
resource_group: $HOST
Expand Down
14 changes: 14 additions & 0 deletions .gitlab/utils/run-experiment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ set -e
# Activate Virtual Environment
. /usr/workspace/benchpark-dev/benchpark-venv/$SYS_TYPE/bin/activate


if [ "$HOST" == "lassen" ]; then
echo "./bin/benchpark system init --dest=${HOST} ${ARCHCONFIG} $SYSTEM_ARGS"
else
echo "./bin/benchpark system init --dest=${HOST} ${ARCHCONFIG} cluster=$HOST $SYSTEM_ARGS"
fi
echo "./bin/benchpark experiment init --dest=${BENCHMARK} --system=${HOST} ${BENCHMARK} ${VARIANT}"
echo "./bin/benchpark setup ${BENCHMARK} wkp/"
echo ". wkp/setup.sh"
echo "cd ./wkp/${BENCHMARK}/${HOST}/workspace/"
echo "ramble --disable-logger --workspace-dir . workspace setup"
echo "ramble --disable-logger --workspace-dir . on --executor '{execute_experiment}' --where '{n_nodes} == 1'"
echo "ramble --disable-logger --workspace-dir . workspace analyze --format json yaml text"

# Initialize System
if [ "$HOST" == "lassen" ]; then
./bin/benchpark system init --dest=${HOST} ${ARCHCONFIG} $SYSTEM_ARGS
Expand Down
3 changes: 2 additions & 1 deletion checkout-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# SPDX-License-Identifier: Apache-2.0
versions:
ramble: 6b4ecac # develop on 5/06/2025 (newer than 0.6.0 release)
spack: 7e4b8aa # develop on 2/22/2025 (pre-breaking changes on 1.0)
spack: 7eeef1f
spack-packages: a1941c9
1 change: 1 addition & 0 deletions experiments/amg2023/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,4 @@ def compute_applications_section(self):

def compute_package_section(self):
self.add_package_spec(self.name, [f"amg2023{self.determine_version()}"])
self.add_package_spec("hypre", ["hypre+lapack"])
2 changes: 1 addition & 1 deletion experiments/kripke/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,5 @@ def compute_package_section(self):
else "~single_memory"
)
self.add_package_spec(
self.name, [f"kripke{self.determine_version()} {single_memory} "]
self.name, [f"kripke{self.determine_version()} {single_memory} +mpi"]
)
1 change: 1 addition & 0 deletions experiments/laghos/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ def compute_applications_section(self):

def compute_package_section(self):
self.add_package_spec(self.name, [f"laghos{self.determine_version()} +metis"])
self.add_package_spec("hypre", ["hypre@2.32.0: +lapack"])
2 changes: 1 addition & 1 deletion experiments/raja-perf/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ def compute_applications_section(self):
self.add_experiment_variable("n_ranks", "{n_resources}", True)

def compute_package_section(self):
self.add_package_spec(self.name, [f"raja-perf{self.determine_version()}"])
self.add_package_spec(self.name, [f"raja-perf{self.determine_version()} +mpi"])
12 changes: 11 additions & 1 deletion lib/benchpark/cmd/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,17 @@ def include_fn(fname):
if pkg_manager == "spack":
spack, first_time_spack = per_workspace_setup.spack_first_time_setup()
if first_time_spack:
spack("repo", "add", "--scope=site", f"{source_dir}/repo")
site_repos = (
per_workspace_setup.spack_location / "etc" / "spack" / "repos.yaml"
)
with open(site_repos, "w") as f:
f.write(
f"""\
repos::
benchpark: {source_dir}/repo
builtin: {per_workspace_setup.pkgs_location}/repos/spack_repo/builtin/
"""
)

pkg_str = f"""\
. {per_workspace_setup.spack_location}/share/spack/setup-env.sh
Expand Down
45 changes: 38 additions & 7 deletions lib/benchpark/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,43 @@ def __init__(self, dest, upstream=None):
self.dest = pathlib.Path(dest)
self.upstream = upstream

self.ramble_location, self.spack_location = (
self.ramble_location, self.spack_location, self.pkgs_location = (
self.dest / "ramble",
self.dest / "spack",
self.dest / "spk",
self.dest / "spack-packages",
)

# Read pinned versions of ramble and spack
with open(benchpark.paths.checkout_versions, "r") as yaml_file:
data = yaml.safe_load(yaml_file)["versions"]
self.ramble_commit, self.spack_commit = data["ramble"], data["spack"]
self.ramble_commit, self.spack_commit, self.pkgs_commit = (
data["ramble"],
data["spack"],
data["spack-packages"],
)

# Read remote urls for ramble and spack
with open(benchpark.paths.remote_urls, "r") as yaml_file:
data = yaml.safe_load(yaml_file)["urls"]
remote_ramble_url, remote_spack_url = data["ramble"], data["spack"]
remote_ramble_url, remote_spack_url, remote_pkgs_url = (
data["ramble"],
data["spack"],
data["spack-packages"],
)

# If this does not have an upstream, then we will be cloning from the URLs indicated in remote-urls.yaml
if self.upstream is None:
self.ramble_url, self.spack_url = remote_ramble_url, remote_spack_url
self.ramble_url, self.spack_url, self.pkgs_url = (
remote_ramble_url,
remote_spack_url,
remote_pkgs_url,
)
else:
# Clone from local "upstream" repository
self.ramble_url, self.spack_url = (
self.ramble_url, self.spack_url, self.pkgs_url = (
self.upstream.ramble_location,
self.upstream.spack_location,
self.upstream.pkgs_location,
)

def _check_and_update_bootstrap(self, desired_commit, location):
Expand All @@ -117,6 +131,11 @@ def bootstrap(self):
if internals not in sys.path:
sys.path.insert(1, internals)

if not self.pkgs_location.exists():
self._install_packages()
else:
self._check_and_update_bootstrap(self.pkgs_commit, self.pkgs_location)

# Spack does not go in sys.path, but we will manually access modules from it
# The reason for this oddity is that spack modules will compete with the internal
# spack modules from ramble
Expand All @@ -143,6 +162,15 @@ def _install_spack(self):
)
debug_print(f"Done cloning Spack ({self.spack_location})")

def _install_packages(self):
print(f"Cloning packages to {self.pkgs_location}")
git_clone_commit(
self.pkgs_url,
self.pkgs_commit,
self.pkgs_location,
)
debug_print(f"Done cloning spack-packages ({self.pkgs_location})")

def _ramble(self):
first_time = False
if not self.ramble_location.exists():
Expand All @@ -151,10 +179,13 @@ def _ramble(self):
return Command(self.ramble_location / "bin" / "ramble", env={}), first_time

def _spack(self):
if not self.pkgs_location.exists():
self._install_packages()

env = {"SPACK_DISABLE_LOCAL_CONFIG": "1"}
spack = Command(self.spack_location / "bin" / "spack", env)
spack_cache_location = self.spack_location / "misc-cache"
bootstrap_cache_location = self.spack_location / "b-c"
bootstrap_cache_location = self.dest / "sbc"
first_time = False
if not self.spack_location.exists():
first_time = True
Expand Down
98 changes: 89 additions & 9 deletions lib/benchpark/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,22 @@ def compute_software_section(self):

def compute_dict(self):
# This can be overridden by any subclass that needs more flexibility
compilers = self.compute_compilers_section()
pkg_cfg = self.compute_packages_section() or {}
compiler_cfg = self.compute_compilers_section()
if compiler_cfg:
pkg_cfg = merge_dicts(pkg_cfg, compiler_cfg)
# "'packages:':" syntax is required to enforce spack to use benchpark-defined
# compilers instead of external compilers defined by spack compiler search (from ramble).
if pkg_cfg:
pkg_cfg = {"packages:": pkg_cfg["packages"]}
else:
pkg_cfg = {"packages": {}}
return {
"system_id": self.compute_system_id(),
"variables": self.compute_variables_section(),
"software": self.compute_software_section(),
"auxiliary_software_files": {
"compilers": (
# "'compilers:':" syntax is required to enforce spack to use benchpark-defined
# compilers instead of external compilers defined by spack compiler search (from ramble).
{"compilers:": compilers["compilers"]}
if compilers
else None
),
"packages": self.compute_packages_section(),
"packages": pkg_cfg,
},
}

Expand All @@ -233,3 +235,81 @@ def _write_key_file(destdir, key, sys_dict):
_write_key_file(destdir + "/" + key, k, system_dict[key])
else:
_write_key_file(destdir, key, system_dict)


def merge_dicts(*dicts):
current = {}
for d in dicts:
if not d:
continue
current = _merge_dicts(current, d)
return current


def _merge_dicts(d1, d2):
result = dict(d1)
for k, v2 in d2.items():
if k in result:
v1 = result[k]
if all(isinstance(x, dict) for x in (v1, v2)):
result[k] = _merge_dicts(v1, v2)
elif all(isinstance(x, list) for x in (v1, v2)):
result[k] = v1 + v2
else:
raise ValueError(f"{k} merge mismatch: {v1}/{v2}")
else:
result[k] = v2
return result


def hybrid_compiler_requirements(c_cmp, f_cmp):
return {
"packages": {
"all": {
"require": [
{
"spec": rf"%[virtuals=c] {c_cmp}",
"when": r"%c",
},
{"spec": rf"%[virtuals=cxx] {c_cmp}", "when": r"%cxx"},
{"spec": rf"^[virtuals=fortran] {f_cmp}", "when": r"^fortran"},
]
}
}
}


def compiler_section_for(name, entries):
return {"packages": {name: {"externals": entries, "buildable": False}}}


def compiler_def(
spec,
prefix,
exes,
env=None,
extra_rpaths=None,
modules=None,
flags=None,
compilers_use_relative_paths=False,
):
lang_map = {}
for lang, exe in exes.items():
if os.path.isabs(exe) or compilers_use_relative_paths:
lang_map[lang] = exe
else:
lang_map[lang] = os.path.join(prefix, "bin", exe)
entry = {
"spec": spec,
"prefix": prefix,
"extra_attributes": {"compilers": lang_map},
}
if env:
entry["extra_attributes"]["environment"] = env
if extra_rpaths:
entry["extra_attributes"]["extra_rpaths"] = extra_rpaths
if modules:
entry["modules"] = modules
if flags:
entry["extra_attributes"]["flags"] = flags
return entry
1 change: 1 addition & 0 deletions remote-urls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
urls:
ramble: https://github.com/GoogleCloudPlatform/ramble.git
spack: https://github.com/spack/spack.git
spack-packages: https://github.com/spack/spack-packages.git
4 changes: 4 additions & 0 deletions repo/ad/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class Ad(CMakePackage):

version("main", branch="main")

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("enzyme")

def cmake_args(self):
Expand Down
3 changes: 3 additions & 0 deletions repo/affinity/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class Affinity(CMakePackage, CudaPackage, ROCmPackage):
variant("mpi", default=False, description="Build MPI support")
variant("rocm", default=False, description="Build ROCm Support")

depends_on("c", type="build")
depends_on("cxx", type="build")

depends_on("mpi", when="+mpi")
depends_on("hip", when="+rocm")
depends_on("cuda", when="+cuda")
Expand Down
5 changes: 3 additions & 2 deletions repo/amg2023/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage):
variant("openmp", default=False, description="Enable OpenMP support")
variant("caliper", default=False, description="Enable Caliper monitoring")

depends_on("c", type="build")
depends_on("cxx", type="build")

depends_on("mpi", when="+mpi")
depends_on("hypre+mpi", when="+mpi")
requires("+mpi", when="^hypre+mpi")
Expand All @@ -36,14 +39,12 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage):
depends_on("hypre+mixedint~fortran")

depends_on("hypre+cuda", when="+cuda")
depends_on("hypre+cublas", when="+cuda")
depends_on("hypre+openmp", when="+openmp")
requires("+cuda", when="^hypre+cuda")
for arch in ("none", "50", "60", "70", "80", "90"):
depends_on(f"hypre cuda_arch={arch}", when=f"cuda_arch={arch}")

depends_on("hypre+rocm", when="+rocm")
depends_on("hypre+rocblas", when="+rocm")
requires("+rocm", when="^hypre+rocm")
for target in ("none", "gfx803", "gfx900", "gfx906", "gfx908", "gfx90a", "gfx942"):
depends_on(f"hypre amdgpu_target={target}", when=f"amdgpu_target={target}")
Expand Down
5 changes: 5 additions & 0 deletions repo/babelstream/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ class Babelstream(CMakePackage, CudaPackage, ROCmPackage):
msg="RAJA implementation requires architecture to be specified by dir=",
)

# Confirmed c++ and Fortran
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

# Thrust Conflict
# conflicts("~cuda", when="+thrust", msg="Thrust requires +cuda variant")
depends_on("thrust", when="+thrust")
Expand Down
6 changes: 5 additions & 1 deletion repo/branson/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

from spack.package import *
from spack.pkg.builtin.boost import Boost
from spack_repo.builtin.packages.boost.package import Boost


class Branson(CMakePackage):
Expand All @@ -30,6 +30,10 @@ class Branson(CMakePackage):
)
version("0.81", sha256="493f720904791f06b49ff48c17a681532c6a4d9fa59636522cf3f9700e77efe4")
version("0.8", sha256="85ffee110f89be00c37798700508b66b0d15de1d98c54328b6d02a9eb2cf1cb8")

depends_on("c", type="build")
depends_on("cxx", type="build")

#depends_on("mpi")
depends_on("mpi@2:")

Expand Down
4 changes: 4 additions & 0 deletions repo/caliper/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ class Caliper(CachedCMakePackage, CudaPackage, ROCmPackage):
variant("tools", default=True, description="Enable tools")
variant("python", default=False, when="@v2.12:", description="Build Python bindings")

depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on("adiak@0.1:0", when="@2.2:2.10 +adiak")
depends_on("adiak@0.4:0", when="@2.11: +adiak")

Expand Down
2 changes: 1 addition & 1 deletion repo/camp/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

from spack.package import *
from spack.pkg.builtin.camp import Camp as BuiltinCamp
from spack_repo.builtin.packages.camp.package import Camp as BuiltinCamp


class Camp(BuiltinCamp):
Expand Down
2 changes: 1 addition & 1 deletion repo/chai/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

from spack.package import *
from spack.pkg.builtin.chai import Chai as BuiltinChai
from spack_repo.builtin.packages.chai.package import Chai as BuiltinChai


class Chai(BuiltinChai):
Expand Down
Loading
Loading