Skip to content

Commit

Permalink
Aws system: integrate 6a/7a configs (#468)
Browse files Browse the repository at this point in the history
* pull in static 7a/6a configs

* class name fix; generate software.yaml properly; reference error to resource dir for packages.yaml; define extra mpirun-like opts

* add dry run

* quote error; consolidate into one line
  • Loading branch information
scheibelp authored Dec 3, 2024
1 parent 4663749 commit 591ad7b
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,17 @@ jobs:
--disable-logger \
workspace setup --dry-run
- name: Dry run dynamic saxpy/openmp with dynamic aws
run: |
./bin/benchpark system init --dest=aws1 aws-pcluster instance_type=hpc6a.48xlarge
./bin/benchpark setup ./saxpy-omp-generic ./aws1 workspace/
. workspace/setup.sh
ramble \
--workspace-dir "workspace/saxpy-omp-generic/aws1/workspace" \
--disable-progress-bar \
--disable-logger \
workspace setup --dry-run
- name: Dry run dynamic remhos/mpi with dynamic llnl-cluster ruby
run: |
./bin/benchpark experiment init --dest=remhos-ruby remhos
Expand Down
14 changes: 14 additions & 0 deletions systems/aws-pcluster/compilers/gcc/00-gcc-7-compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
compilers:
- compiler:
spec: [email protected]
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags: {}
operating_system: alinux2
target: x86_64
modules: []
environment: {}
extra_rpaths: []
28 changes: 28 additions & 0 deletions systems/aws-pcluster/externals/base/00-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
packages:
tar:
externals:
- spec: [email protected]
prefix: /usr
buildable: false
gmake:
externals:
- spec: [email protected]
prefix: /usr
blas:
externals:
- spec: [email protected]
prefix: /usr
buildable: false
lapack:
externals:
- spec: [email protected]
prefix: /usr
buildable: false
mpi:
buildable: false
openmpi:
externals:
- spec: [email protected]%[email protected]
prefix: /opt/amazon/openmpi
extra_attributes:
ldflags: "-L/opt/amazon/openmpi/lib -lmpi"
63 changes: 60 additions & 3 deletions systems/aws-pcluster/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0

import pathlib

from benchpark.system import System
from benchpark.directives import variant

Expand All @@ -17,21 +19,76 @@
"sys_cores_per_node": 4,
"sys_mem_per_node": 8,
},
"hpc7a.48xlarge": {
"sys_cores_per_node": 96,
"sys_mem_per_node": 768,
},
"hpc6a.48xlarge": {
"sys_cores_per_node": 96,
"sys_mem_per_node": 384,
},
}


class Aws(System):
class AwsPcluster(System):
variant(
"instance_type",
values=("c6g.xlarge", "c4.xlarge"),
values=("c6g.xlarge", "c4.xlarge", "hpc7a.48xlarge", "hpc6a.48xlarge"),
default="c4.xlarge",
description="AWS instance type",
)

def initialize(self):
super().initialize()
self.scheduler = "mpi"
self.scheduler = "slurm"
# TODO: for some reason I have to index to get value, even if multi=False
attrs = id_to_resources.get(self.spec.variants["instance_type"][0])
for k, v in attrs.items():
setattr(self, k, v)

def system_specific_variables(self):
return {
"extra_cmd_opts": '--mpi=pmix --export=ALL,FI_EFA_USE_DEVICE_RDMA=1,FI_PROVIDER="efa",OMPI_MCA_mtl_base_verbose=100',
}

def external_pkg_configs(self):
externals = AwsPcluster.resource_location / "externals"

selections = [
externals / "base" / "00-packages.yaml",
]

return selections

def compiler_configs(self):
compilers = AwsPcluster.resource_location / "compilers"

selections = [
compilers / "gcc" / "00-gcc-7-compilers.yaml",
]

return selections

def generate_description(self, output_dir):
super().generate_description(output_dir)

sw_description = pathlib.Path(output_dir) / "software.yaml"

with open(sw_description, "w") as f:
f.write(self.sw_description())

def sw_description(self):
return """\
software:
packages:
default-compiler:
pkg_spec: [email protected]
default-mpi:
pkg_spec: [email protected]%[email protected]
compiler-gcc:
pkg_spec: [email protected]
lapack:
pkg_spec: [email protected]
mpi-gcc:
pkg_spec: [email protected]%[email protected]
"""

0 comments on commit 591ad7b

Please sign in to comment.