Skip to content

Commit

Permalink
Fix Tioga system class (#382)
Browse files Browse the repository at this point in the history
* rocm_arch was not set by saxpy experiment or tioga system

* dynamic system+experiment test should work now

* style edit

* generate saxpy experiment description for separate dry run in a distinct dir

* remove now-unused variable
  • Loading branch information
scheibelp authored Oct 1, 2024
1 parent 4eaec42 commit 358b2b9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,17 @@ jobs:
--disable-logger \
workspace setup --dry-run
# TODO: mixing dynamic saxpy with dynamic Tioga fails
# - name: Dry run dynamic saxpy/rocm with dynamic Tioga
# run: |
# ./bin/benchpark system init --dest=tioga-system2 tioga rocm=551 compiler=cce ~gtl
# ./bin/benchpark experiment init --dest=saxpy-rocm saxpy programming_model=rocm
# ./bin/benchpark setup ./saxpy-rocm ./tioga-system2 workspace/
# . workspace/setup.sh
# ramble \
# --workspace-dir workspace/saxpy-rocm/Tioga-d34a754/workspace \
# --disable-progress-bar \
# --disable-logger \
# workspace setup --dry-run
- name: Dry run dynamic saxpy/rocm with dynamic Tioga
run: |
./bin/benchpark system init --dest=tioga-system2 tioga rocm=551 compiler=cce ~gtl
./bin/benchpark experiment init --dest=saxpy-rocm2 saxpy programming_model=rocm
./bin/benchpark setup ./saxpy-rocm2 ./tioga-system2 workspace/
. workspace/setup.sh
ramble \
--workspace-dir workspace/saxpy-rocm2/Tioga-d34a754/workspace \
--disable-progress-bar \
--disable-logger \
workspace setup --dry-run
- name: Dry run laghos/mpi-only on LLNL-Magma-Penguin-icelake-OmniPath with allocation modifier
run: |
Expand Down
18 changes: 14 additions & 4 deletions lib/benchpark/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,27 +148,37 @@ def compiler_description(self, output_dir):

self._merge_config_files(compilers_schema.schema, selections, aux_compilers)

def system_specific_variables(self):
return {}

def variables_yaml(self):
for attr in self.required:
if not getattr(self, attr, None):
raise ValueError(f"Missing required info: {attr}")

optionals = list()
optionals_as_cfg = ""
for opt in ["sys_gpus_per_node", "sys_mem_per_node", "queue"]:
if getattr(self, opt, None):
optionals.append(f"{opt}: {getattr(self, opt)}")

system_specific = list()
for k, v in self.system_specific_variables().items():
system_specific.append(f"{k}: {v}")

extra_variables = optionals + system_specific
indent = " " * 2
if optionals:
optionals_as_cfg = f"\n{indent}".join(optionals)
extras_as_cfg = ""
if extra_variables:
extras_as_cfg = f"\n{indent}".join(extra_variables)

return f"""\
# SPDX-License-Identifier: Apache-2.0
variables:
timeout: "{self.timeout}"
scheduler: "{self.scheduler}"
sys_cores_per_node: "{self.sys_cores_per_node}"
{optionals_as_cfg}
{extras_as_cfg}
max_request: "1000" # n_ranks/n_nodes cannot exceed this
n_ranks: '1000001' # placeholder value
n_nodes: '1000001' # placeholder value
Expand Down
9 changes: 8 additions & 1 deletion var/exp_repo/experiments/saxpy/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,20 @@ def compute_applications_section(self):
}
the_experiment.update(matrix_cfg)

if self.spec.satisfies("programming_model=openmp"):
experiment_id = "saxpy_{n}_{n_nodes}_{omp_num_threads}"
elif self.spec.satisfies("programming_model=cuda") or self.spec.satisfies(
"programming_model=rocm"
):
experiment_id = "saxpy_{n}"

return {
"saxpy": { # ramble Application name
"workloads": {
# TODO replace with a hash once we have one?
"problem": {
"experiments": {
"saxpy_{n}_{n_nodes}_{omp_num_threads}": the_experiment,
experiment_id: the_experiment,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions var/sys_repo/systems/tioga/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def compiler_configs(self):

return selections

def system_specific_variables(self):
return {"rocm_arch": "gfx90a"}

def sw_description(self):
"""This is somewhat vestigial: for the Tioga config that is committed
to the repo, multiple instances of mpi/compilers are stored and
Expand Down

0 comments on commit 358b2b9

Please sign in to comment.