Skip to content

Commit

Permalink
Merge branch 'develop' into lint-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pearce8 authored Nov 2, 2023
2 parents 40cae13 + 5570545 commit d8961ce
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 80 deletions.
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Benchpark uses the following open source projects for specifying configurations:

Documentation
-------------
1. `Getting started <docs/1-getting-started.rst>`_
2. `Benchpark list <docs/2-benchpark-list.rst>`_
3. `(optional) Edit <docs/3-opt-edit-experiment.rst>`_
4. `Benchpark setup <docs/4-benchpark-setup.rst>`_
5. `Build experiment <docs/5-build-experiment.rst>`_
6. `Run experiment <docs/6-run-experiment.rst>`_
7. `Add a new Benchmark <docs/add-a-benchmark.rst>`_
8. `Add a new System Config <docs/add-a-system-config.rst>`_
9. `Add a new Experiment <docs/add-an-experiment.rst>`_
1. :doc:`1-getting-started`
2. :doc:`2-benchpark-list`
3. (optional) :doc:`3-opt-edit-experiment`
4. :doc:`4-benchpark-setup`
5. :doc:`5-build-experiment`
6. :doc:`6-run-experiment`
7. :doc:`add-a-benchmark`
8. :doc:`add-a-system-config`
9. :doc:`add-an-experiment`

Community
---------
Expand Down
9 changes: 9 additions & 0 deletions bin/benchpark
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import shutil
import shlex
import sys

import benchpark

DEBUG = False


Expand All @@ -27,6 +29,7 @@ def main():
actions = {}
benchpark_list(subparsers, actions)
benchpark_setup(subparsers, actions)
benchpark_version(subparsers, actions)

args = parser.parse_args()

Expand Down Expand Up @@ -138,6 +141,10 @@ def benchpark_setup(subparsers, actions_dict):

actions_dict["setup"] = benchpark_setup_handler

def benchpark_version(subparsers, actions_dict):
list_parser = subparsers.add_parser("version", help="Benchpark version")
list_parser.add_argument('sublist', nargs='?')
actions_dict["version"] = benchpark_version_handler

def run_command(command_str, env=None):
subprocess.run(
Expand Down Expand Up @@ -266,6 +273,8 @@ Further steps are needed to run the experiments (ramble -P -D . on)
"""
print(instructions)

def benchpark_version_handler(args):
print(benchpark.benchpark_version)

if __name__ == "__main__":
main()
16 changes: 6 additions & 10 deletions configs/ats4/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@ spack:
spack_spec: [email protected]
default-mpi:
spack_spec: [email protected]%cce ~gtl
compiler-rocm:
spack_spec: [email protected]
compiler-gcc:
spack_spec: [email protected]
compiler-rocm:
spack_spec: [email protected]
blas-rocm:
spack_spec: [email protected]
# lapack-rocm:
# spack_spec: [email protected]
lapack:
spack_spec: [email protected]
mpi-compiler-rocm:
spack_spec: [email protected]%cce ~gtl
mpi-compiler-gcc:
spack_spec: [email protected]%gcc ~gtl
mpi-gtl:
mpi-rocm-gtl:
spack_spec: [email protected]%cce +gtl
mpi-no-gtl:
mpi-rocm-no-gtl:
spack_spec: [email protected]%cce ~gtl
mpi-gcc:
spack_spec: [email protected]%gcc ~gtl
2 changes: 1 addition & 1 deletion configs/ats4/variables.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
gtl_flag: '' # to be overwritten by tests that need GTL
compilers: [compiler-rocm, compiler-gcc]
rocm_arch: 'gfx90a'
scheduler: 'flux'
flux_batch_time: '120m'
slurm_batch_time: '02:00'
Expand Down
37 changes: 34 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,29 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "Benchpark"
copyright = "2023, LLNS LLC"
author = "Olga Pearce, Alec Scott, Peter Scheibel, Greg Becker, Riyaz Haque, and Nathan Hanford"
import os
import sys

from sphinx.ext.apidoc import main as sphinx_apidoc

# -- Benchpark customizations ------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath("../lib/benchpark/benchpark"))
print(sys.path)


project = 'Benchpark'
copyright = '2023, LLNS LLC'
author = 'Olga Pearce, Alec Scott, Peter Scheibel, Greg Becker, Riyaz Haque, and Nathan Hanford'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
]

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".spack-env"]
Expand All @@ -24,3 +38,20 @@

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

# -- Run sphinx-apidoc -------------------------------------------------
# Remove any previous API docs
# ReadtheDocs doesn't clean up after previous builds
# Without this, the API Docs will never actually update
apidoc_args = [
"--force", # Overwrite existing files
"--no-toc", # Don't create a table of contents file
"--output-dir=.", # Directory to place all output
"--module-first", # emit module docs before submodule docs
]
sphinx_apidoc(
apidoc_args
+ [
"../lib/benchpark/benchpark",
]
)
37 changes: 14 additions & 23 deletions experiments/amg2023/cuda/ramble.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,22 @@ ramble:
- gtl_info
spack:
concretized: true
variables:
cuda_version: ['{cuda10_version}', '{default_cuda_version}']
cuda_compiler: ['compiler-cuda10', 'default-compiler']
versions: ['10', 'default']
packages:
hypre-cuda-10:
spack_spec: [email protected] +mpi+cuda+mixedint cuda_arch={cuda_arch} ^cuda@{cuda10_version}
compiler: compiler-cuda10
amg2023-cuda-10:
spack_spec: amg2023@develop +mpi+cuda ^cuda@{cuda10_version}
compiler: compiler-cuda10
hypre-cuda-default:
spack_spec: [email protected] +mpi+cuda+mixedint cuda_arch={cuda_arch} ^cuda@{default_cuda_version}
compiler: default-compiler
amg2023-cuda-default:
spack_spec: amg2023@develop +mpi+cuda ^cuda@{default_cuda_version}
compiler: default-compiler
hypre-cuda-{versions}:
spack_spec: '[email protected] +mpi+cuda+mixedint cuda_arch={cuda_arch} ^cuda@{cuda_version}'
compiler: '{cuda_compiler}'
amg2023-cuda-{versions}:
spack_spec: 'amg2023@develop +mpi+cuda ^cuda@{cuda_version}'
compiler: '{cuda_compiler}'
environments:
amg2023-cuda-10:
amg2023-cuda-{versions}:
packages:
- cublas-cuda-10
- cublas-cuda-{versions}
- lapack
- default-mpi
- hypre-cuda-10
- amg2023-cuda-10
amg2023-cuda-default:
packages:
- cublas-cuda-default
- lapack
- default-mpi
- hypre-cuda-default
- amg2023-cuda-default
- hypre-cuda-{versions}
- amg2023-cuda-{versions}
37 changes: 6 additions & 31 deletions experiments/amg2023/rocm/ramble.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,25 @@ ramble:
processes_per_node: ['8', '4']
n_nodes: ['1', '2']
matrices:
- size:
- n # TODO: Filter matrix
'{env_name}_problem1_{n_nodes}_{omp_num_threads}_{px}_{py}_{pz}_{nx}_{ny}_{nz}':
env_vars:
set:
OMP_NUM_THREADS: '{omp_num_threads}'
variables:
env_name: 'amg2023-omp'
processes_per_node: ['8', '4']
n_nodes: ['1', '2']
omp_num_threads: ['1', '2', '4']
matrices:
- size_threads:
- n # TODO: Filter matrix
- omp_num_threads # TODO: Filter matrix
- size_gtl:
- n
- gtl
spack:
concretized: true
variables:
gtl: ["gtl", "no-gtl"]
packages:
hypre-{gtl}:
spack_spec: [email protected] +mpi+rocm+mixedint amdgpu_target="gfx90a"
spack_spec: [email protected] +mpi+rocm+mixedint amdgpu_target="{rocm_arch}"
compiler: compiler-rocm
amg2023-gpu-{gtl}:
spack_spec: amg2023@develop +mpi+rocm amdgpu_target="gfx90a"
compiler: compiler-rocm
hypre-omp:
spack_spec: [email protected] +mpi+openmp+mixedint
compiler: compiler-rocm
amg2023-omp:
spack_spec: amg2023@develop +mpi+openmp
spack_spec: amg2023@develop +mpi+rocm amdgpu_target="{rocm_arch}"
compiler: compiler-rocm
environments:
amg2023-gpu-{gtl}:
packages:
- blas-rocm
- lapack
- mpi-{gtl}
- mpi-rocm-{gtl}
- hypre-{gtl}
- amg2023-gpu-{gtl}
amg2023-omp:
packages:
- blas-rocm
- lapack
- default-mpi
- hypre-omp
- amg2023-omp
3 changes: 1 addition & 2 deletions experiments/raja-perf/rocm/ramble.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ ramble:
n_ranks: '1'
n_nodes: '1'
n_gpus_per_task: '1'
compilers: ''
spack:
concretized: true
packages:
blt:
spack_spec: '[email protected]:'
compiler: compiler-gcc
raja-perf:
spack_spec: raja-perf@develop +rocm~openmp amdgpu_target=gfx90a
spack_spec: raja-perf@develop +rocm~openmp amdgpu_target="{rocm_arch}"
compiler: default-compiler
environments:
raja-perf:
Expand Down
2 changes: 1 addition & 1 deletion experiments/saxpy/rocm/ramble.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ramble:
concretized: true
packages:
saxpy:
spack_spec: [email protected] +rocm amdgpu_target="gfx90a"
spack_spec: [email protected] +rocm amdgpu_target="{rocm_arch}"
compiler: default-compiler
environments:
saxpy:
Expand Down
16 changes: 16 additions & 0 deletions lib/benchpark/benchpark/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
__version__ = "0.1.0"
benchpark_version = __version__


def __try_int(v):
try:
return int(v)
except ValueError:
return v


benchpark_version_info = tuple([__try_int(v) for v in __version__.split(".")])


__all__ = ["benchpark_version_info", "benchpark_version"]

0 comments on commit d8961ce

Please sign in to comment.