Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exceptions for bad input parameters #52

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

slabasan
Copy link
Collaborator

@slabasan slabasan commented Nov 7, 2023

Basic exception handling, will work towards creating benchpark-specific exception handling in the future.

Fixes #35

$ benchpark setup sax/cu cts1 .
Traceback (most recent call last):
  ...
ValueError: Invalid benchmark/experiment "sax/cu" - must choose one of:
	saxpy/cuda
	saxpy/rocm
	saxpy/openmp
	amg2023/cuda
	amg2023/rocm
	amg2023/openmp
	raja-perf/cuda
	raja-perf/mpi-only
	raja-perf/rocm
	raja-perf/openmp
$ benchpark list mysys
Traceback (most recent call last):
  ...
ValueError: Invalid benchpark list "mysys" - must choose [benchmarks],[systems], or leave empty
$ benchpark setup saxpy/openmp mysys .
Traceback (most recent call last):
  ...
ValueError: Invalid system "mysys" - must choose one of: 
	cts1
	ats2
	ats4
	x86
$ benchpark se
usage: benchpark [-h] {list,setup} ...
benchpark: error: argument subcommand: invalid choice: 'se' (choose from 'list', 'setup')
$ benchpark setup
usage: benchpark setup [-h] benchmark system workspace_root
benchpark setup: error: the following arguments are required: benchmark, system, workspace_root
$ benchpark --help
usage: benchpark [-h] {list,setup} ...

Benchpark

options:
  -h, --help    show this help message and exit

Subcommands:
  {list,setup}
    list        List available benchmarks and systems
    setup       Create a benchmark and prepare it to build/run

@slabasan slabasan added this to the Alpha release milestone Nov 7, 2023
@slabasan slabasan requested review from pearce8 and scheibelp November 7, 2023 23:31
@pearce8 pearce8 merged commit adac499 into LLNL:develop Nov 8, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception handling
2 participants