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

New Benchpark command: "system-create" #110

Closed
wants to merge 21 commits into from

Conversation

scheibelp
Copy link
Collaborator

@scheibelp scheibelp commented Jan 12, 2024

Add command that can be used to instantiate a new system definition, for example:

$ benchpark system-create --from=HPECray-zen3-MI250X-Slingshot cray1
$ ls configs/cray1
auxiliary_software_files  spack.yaml  system_definition.yaml  variables.yaml

$ benchpark system-create cray2 --template=templates/scheduler/slurm/ --template=templates/generic-system/cray/
$ ls configs/cray2
spack.yaml  variables.yaml

This will often require an intermediate editing step, in particular to define auxiliary_software_files; after that, you could e.g. do:

$ benchpark setup amg2023/rocm cray2...

Broadly:

  • You can copy an existing config with --from
  • Or you can assembly a generic configuration using a series of --template options

If two templates define Ramble configurations with the same name, this command will use a ramble-python script to automatically merge them:

$ benchpark system-create cray2 --template=templates/scheduler/slurm/ --template=templates/experiment-deps/cray/ --template=templates/catch-all/

(where here, templates/scheduler/slurm/ and templates/catch-all both define variables.yaml)

Current issues:

  • (done as of Jan. 23) Right now, if two templates define the same file name, the last one will overwrite all prior

    • (UPDATE Jan. 17) Work is in progress to handle merging these config files together (I plan to add that here before marking this PR as ready to merge)
  • (New Jan. 23) Right now, I have benchpark clone its own Ramble when executing system-create, this means that there can be multiple Ramble installations:

    • One for benchpark itself (to run ramble-python)
    • One for managing each experiments directory (so there already could be multiple, but in general there would now be at least 2)

    It might be better to manage this ramble instance as a Git submodule

  • (New Jan. 23) Tests for system-create would be good

  • (possibly for later) bin/benchpark is now reaching a size where it would be useful to split it up

  • I've added some initial entries to templates/ to give a notion of how they are supposed to be used in combination with the system-create command, but there's not enough there to be actually useful yet

@slabasan
Copy link
Collaborator

@slabasan to migrate boilerplate system_definition.yaml from #93 to this PR

@pearce8 pearce8 added the feature New feature or request label Jan 20, 2024
@pearce8 pearce8 linked an issue Jan 20, 2024 that may be closed by this pull request
6 tasks
@scheibelp scheibelp changed the title [WIP] New Benchpark command: "system-create" New Benchpark command: "system-create" Jan 23, 2024
@scheibelp scheibelp requested a review from alecbcs January 23, 2024 21:49
@scheibelp scheibelp mentioned this pull request Mar 8, 2024
@pearce8 pearce8 marked this pull request as draft April 9, 2024 21:35
Comment on lines +218 to +219
system_create_parser = subparsers.add_parser(
"system-create", help="Initialize a system config"
Copy link
Member

Choose a reason for hiding this comment

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

It'd be great if we could split this out into system create instead and support additional sub-commands such as system list and system edit in the future.

"system-create", help="Initialize a system config"
)
system_create_parser.add_argument(
"--template",
Copy link
Member

Choose a reason for hiding this comment

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

What do folks think about a shorthand -t as an additional flag?

help="Choose common config settings in templates/",
)
system_create_parser.add_argument(
"--from", dest="use_existing", type=str, help="Copy an existing system config"
Copy link
Member

Choose a reason for hiding this comment

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

Nice! We'd talked about this prior but I really like the idea of being able to copy from an existing system and just tweak it as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System definition
5 participants