System and Platform Objects #1527
douglasjacobsen
started this conversation in
Project Designs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Project Name: System and Platform Objects
Contributors: douglasjacobsen
Project Summary
The goal is this project is to implement first party objects in Ramble to
represent individual compute nodes (i.e. platforms) along with high level
clusters (i.e. systems) that are built out of platforms.
The aim is to simplify reproducibility for end users by encapsulating the
important aspects of their compute environment into these system and platform
objects.
Background
When exploring performance differences across various hardware types, users are
forced to configure their workspaces for many aspects of the underlying system.
Ramble currently supports including one or more YAML files, which can be
composed to create a set of experiments targeting a specific system. These
complex configurations can be more error prone for users to maintain, and can
be more difficult for users to reasonable (due to all of the indirection
involved).
Recent successes in the addition of package manager and workflow manager
objects has shown that we are able to encapsulate more information,
specifically information that never changes, in these portable objects and this
results in more easily re-used artifacts than straight YAML files.
Users still have to piece together the objects they want to use, but the python
objects provide a more rigid definition for users that make it easier to help
guide them along a working path.
Historically, Ramble has shied away from encoding system information. Primarily
because this changes frequently from one user to another. However, as Ramble's
user base grows within various sites it becomes more important to encode this
information in concrete artifacts that can be reused more easily (and are more
easily maintained).
This design aims to promote systems and platforms, as important components of a
successful experiment definition, into first party features that can simplify
the end-user experience on known systems.
Requirements
Proposal
New Object Types
Within Ramble's repository, we will add default object types for
systemandplatformobjects. Additionally, we will addbase_systemandbase_platformobjects to remain consistent with other objects. The base classes can then be
used to construct inheritance chains, simplifying development within some
ecosystem (i.e. all GCP platforms inherit from a
gcp-platformbase platformclass.
Ramble object repositories will be allowed to have directories matching these
object types, similar to other object types.
Object Precedence
An important aspect of constructing an experiment is the precedence of the
object definitions. As mentioned in the requirements, system objects will be
allowed to specify default values for variants including the package manager
and workflow manager. Users are expected to be able to override whatever these
defaults are, but providing defaults helps simplify the user experience.
To help ensure this works properly, objects will adhere to the following
precedence order when setting variant and variable values:
This precedence ordering will allow system and platform objects to define
default workflow manager and package manager objects before their definitions
are applied to the experiment.
Modifier objects are not expected to manipulate the system, platform, workflow
manager, or package manager object variants. However, to ensure they are able
to change variables they have a higher precendence order.
User Controls
The user will select the system and platform classes through variant values.
For example:
These variants can be parameterized the same way as other variants, through
variable indirection. For example:
Can be used to sweep multiple platforms within a given system. Systems can be
swept similarly.
Required Variables
Within the new base classes, several variables will be required to be defined.
These are primarily to help ease the end-user experience, but also to
standardize the definitions somewhat. Required variables will be defined using
the
required_variabledirective in the shared language.Within the system class, the
platform_nodesvariable will be required to bedefined. Through directives defined later, platforms within a system can have
different default values, assuming the developer wants to provide a default
value. If a value is not provided within the system class, end-users will be
required to define one in their workspace.
Within the platform class, the following variables will be marked as required:
cores_per_nodememory_per_nodeBase platform classes can be created to augment this with additional
information. An
accelerated-nodebase platform will be created that will alsodefine a variant named
accelerator_type, and then a variableaccelerators_per_nodewill be marked as required. This can be used tostandardize the number of accelerators (i.e. GPUs) within a node.
Specific system and platform implementations can add additional requirements as
needed to ensure they function properly together.
Standard validation
The base system and platform classes will have variants to control validation.
These will be named
validate_systemandvalidate_platformand will have adefault value of
True. Users can turn these off to use configurations thatwould not validate normally.
Some default validators will be registered into these base classes, such as:
{n_nodes} <= {platform_nodes}{n_threads} * {processes_per_node} <= {cores_per_node}{n_ranks} <= {cores_per_node} * {n_nodes}This can help end users avoid configuration issues that can negatively impact
their experiment's performance.
Directives Changes
In support of these new classes, some modifications to directives are required.
Each object type will get its own language, similar to how other objects
behave in Ramble.
Platform Object Language
The platform object language will be the simplest. It will primarily be the
shared language, with the addition of
platform_familyvariant directives.System Object Language
The system object language will build off of the shared language, and add the
following new directives.
Default Workflow Manager
Sets the default for
variants:workflow_managerin this experimentExample:
Makes experiments using this system default to using
slurm.Default Package Manager
Sets the default for
variants:package_managerin this experimentExample:
Makes experiments using this system default to using
spack.Default Platform
Sets the default for
variants:platformin this experimentExample:
Makes experiments using this system default to using
c2.Platform Controls
Defines the platforms that are available in this system. Will validate that the
selection is one of these.
Defines a mapping of platform to value, for a given variable name. Can be used
multiple times to set several variables for each platform.
Example:
Causes the value for
slurm_partitionto bec2standardorc2dstandardbased on the platform selected.
Defines a mapping of variable name to value for a specific platform.
Example:
Allows for grouping variable definitions based on platform rather than by
variable name.
Auxiliary Software Files
Behaves very similar to
register_templatehowever we render these within thepackage manager so they are properly injected into the software environment.
Example:
Will render the local (to the
system.pyfile)packages-{platform_name}.yaml.tplfile into the software environment, to helpconfigure the environment for the given platform.
Package managers are free to implement how auxiliary files should be combined.
Additional Functionality
Other aspects, like validating configurations and defining default variables,
will be handled through the shared language of objects. It is also expected
that existing features (like
whenand versioning) will work properly withinthe system and platform objects.
All reactions