LLNL / benchpark

An open collaborative repository for reproducible specifications of HPC benchmarks and cross site benchmarking environments
https://software.llnl.gov/benchpark/
Apache License 2.0
25 stars 22 forks source link

Add command: `benchpark system init` #298

Closed scheibelp closed 1 week ago

scheibelp commented 2 months ago

Closes https://github.com/LLNL/benchpark/pull/110

(note: ~500 of the +/- of this diff is from moving bin/benchpark to lib/main.py - I recommend collapsing these to make the diff more-readable)

Add a new command benchpark system init, that can generate a system config (a collection of files in a directory) that you can then pass to benchpark setup like:

benchpark setup saxpy/openmp <the-directory-created-by-benchpark-system-init> workspace/

Example 1:

./bin/benchpark system init --basedir=test-system-create aws instance_type=c4.xlarge (old) ~./bin/benchpark system create --basedir=test-system-create --type=aws --set instance-type=c4.xlarge~

Creates a directory in test-system-create, and writes a variables.yaml file to it:

variables:
  scheduler: "mpi"
  sys_cores_per_node: "4"
  sys_mem_per_node: 7.5
  ...

This doesn't tie in with boto yet, so doesn't provide a means to generate a description for all instance types. IMO that would be better to handle in a separate PR.

Example 2:

./bin/benchpark system init --basedir=test-system-create tioga rocm=551 compiler=cce ~gtl (old) ~./bin/benchpark system create --basedir=test-system-create --type=tioga~

will assemble a packages.yaml config such that:

(Update August 3rd: done) ~This doesn't yet generate a variables.yaml or a compiler config, so the result is incomplete.~

TODOs

scheibelp commented 1 week ago

@becker33 I have renamed benchpark system create to benchpark system init and

Also I don't think I mentioned it yet, but the style checker was giving me trouble trying to block this on style issues in the system/experiment repos. I had some trouble getting it to ignore those, so I just fixed those issues for now. IMO we shouldn't apply the same stringency to system/experiment definitions as we do to the core (but if you disagree, then this PR is in the right place).

alecbcs commented 1 week ago

@scheibelp can we move lib/benchpark/system_cmd.py -> lib/benchpark/cmd/system.py ?

scheibelp commented 1 week ago

@becker33 SpecTemplate is renamed @alecbcs system_cmd was moved

The only remaining comment is https://github.com/LLNL/benchpark/pull/298#discussion_r1722342188, which I'd like to address in a different PR.