Skip to content

Commit 9281756

Browse files
authored
replace openblas with atlas for cblas, update aws-tutorial system.py (#36)
1 parent aa80ad4 commit 9281756

2 files changed

Lines changed: 43 additions & 83 deletions

File tree

latest/docker/Dockerfile.benchpark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN apt-get update && \
2222
xz-utils \
2323
zstd \
2424
bzip2 \
25-
libopenblas-dev \
25+
libatlas-base-dev \
2626
&& rm -rf /var/lib/apt/lists/*
2727

2828
SHELL [ "/bin/bash", "-c" ]

latest/tutorial-code/system-description/aws-tutorial/system.py

Lines changed: 42 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
#
44
# SPDX-License-Identifier: Apache-2.0
55

6-
import json
7-
import subprocess
8-
96
from benchpark.directives import maintainers, variant
107
from benchpark.openmpsystem import OpenMPCPUOnlySystem
118
from benchpark.paths import hardware_descriptions
12-
from benchpark.system import System
9+
from benchpark.system import System, compiler_def, compiler_section_for
1310

1411

1512
class AwsTutorial(System):
@@ -20,67 +17,56 @@ class AwsTutorial(System):
2017

2118
id_to_resources = {
2219
"c7i.48xlarge": {
23-
"system_site": "aws",
24-
"hardware_key": str(hardware_descriptions)
25-
+ "/AWS_Tutorial-zen-EFA/hardware_description.yaml",
20+
"sys_cores_per_node": 192,
21+
"sys_mem_per_node_GB": 384,
2622
},
2723
"c7i.metal-48xl": {
28-
"system_site": "aws",
29-
"hardware_key": str(hardware_descriptions)
30-
+ "/AWS_Tutorial-zen-EFA/hardware_description.yaml",
24+
"sys_cores_per_node": 192,
25+
"sys_mem_per_node_GB": 384,
3126
},
3227
"c7i.24xlarge": {
33-
"system_site": "aws",
34-
"hardware_key": str(hardware_descriptions)
35-
+ "/AWS_Tutorial-zen-EFA/hardware_description.yaml",
28+
"sys_cores_per_node": 96,
29+
"sys_mem_per_node_GB": 192,
3630
},
3731
"c7i.metal-24xl": {
38-
"system_site": "aws",
39-
"hardware_key": str(hardware_descriptions)
40-
+ "/AWS_Tutorial-zen-EFA/hardware_description.yaml",
32+
"sys_cores_per_node": 96,
33+
"sys_mem_per_node_GB": 192,
4134
},
4235
"c7i.12xlarge": {
43-
"system_site": "aws",
44-
"hardware_key": str(hardware_descriptions)
45-
+ "/AWS_Tutorial-zen-EFA/hardware_description.yaml",
36+
"sys_cores_per_node": 48,
37+
"sys_mem_per_node_GB": 96,
4638
},
4739
}
4840

4941
variant(
5042
"instance_type",
51-
values=("c7i.48xlarge", "c7i.metal-48xl", "c7i.24xlarge", "c7i.metal-24xl", "c7i.12xlarge"),
43+
values=(
44+
"c7i.48xlarge",
45+
"c7i.metal-48xl",
46+
"c7i.24xlarge",
47+
"c7i.metal-24xl",
48+
"c7i.12xlarge",
49+
),
5250
default="c7i.24xlarge",
5351
description="AWS instance type",
5452
)
5553

5654
def __init__(self, spec):
5755
super().__init__(spec)
58-
self.programming_models = [OpenMPCPUOnlySystem()]
5956

57+
# Common attributes across instances
58+
self.programming_models = [OpenMPCPUOnlySystem()]
59+
self.system_site = "aws"
6060
self.scheduler = "flux"
61-
# TODO: for some reason I have to index to get value, even if multi=False
61+
self.hardware_key = (
62+
str(hardware_descriptions)
63+
+ "/AWS_Tutorial-sapphirerapids-EFA/hardware_description.yaml"
64+
)
65+
6266
attrs = self.id_to_resources.get(self.spec.variants["instance_type"][0])
6367
for k, v in attrs.items():
6468
setattr(self, k, v)
6569

66-
json_resource_spec = subprocess.check_output("flux resource R", shell=True)
67-
resource_dict = json.loads(json_resource_spec)
68-
self.sys_cores_per_node = resource_dict["execution"]["R_lite"][0]["children"][
69-
"core"
70-
]
71-
self.sys_cores_per_node = [int(c) for c in self.sys_cores_per_node.split("-")]
72-
self.sys_cores_per_node[-1] += 1
73-
self.sys_cores_per_node = len(list(range(*self.sys_cores_per_node)))
74-
self.sys_nodes = resource_dict["execution"]["R_lite"][0]["rank"]
75-
self.sys_nodes = [int(n) for n in self.sys_nodes.split("-")]
76-
self.sys_nodes[-1] += 1
77-
self.sys_nodes = len(list(range(*self.sys_nodes)))
78-
79-
# def system_specific_variables(self):
80-
# return {
81-
# "extra_cmd_opts": '--mpi=pmix --export=ALL,FI_EFA_USE_DEVICE_RDMA=1,FI_PROVIDER="efa",OMPI_MCA_mtl_base_verbose=100',
82-
# }
83-
8470
def compute_packages_section(self):
8571
return {
8672
"packages": {
@@ -89,9 +75,10 @@ def compute_packages_section(self):
8975
"buildable": False,
9076
},
9177
"gmake": {"externals": [{"spec": "gmake@4.3", "prefix": "/usr"}]},
92-
"lapack": {
93-
"externals": [{"spec": "lapack@0.29.2", "prefix": "/usr"}],
94-
"buildable": False,
78+
"blas": {"buildable": False},
79+
"lapack": {"buildable": False},
80+
"atlas": {
81+
"externals": [{"spec": "atlas@3.10.3", "prefix": "/usr"}],
9582
},
9683
"mpi": {"buildable": False},
9784
"openmpi": {
@@ -103,7 +90,7 @@ def compute_packages_section(self):
10390
]
10491
},
10592
"cmake": {
106-
"externals": [{"spec": "cmake@4.0.2", "prefix": "/usr"}],
93+
"externals": [{"spec": "cmake@4.1.1", "prefix": "/usr"}],
10794
"buildable": False,
10895
},
10996
"git": {
@@ -164,7 +151,7 @@ def compute_packages_section(self):
164151
"caliper": {
165152
"externals": [
166153
{
167-
"spec": "caliper@master%gcc@11.4.0+adiak+mpi",
154+
"spec": "caliper@master+adiak+mpi%gcc@11.4.0",
168155
"prefix": "/usr",
169156
}
170157
],
@@ -212,49 +199,22 @@ def compute_packages_section(self):
212199
}
213200

214201
def compute_compilers_section(self):
215-
return {
216-
"compilers": [
217-
{
218-
"compiler": {
219-
"spec": "gcc@11.4.0",
220-
"paths": {
221-
"cc": "/usr/bin/gcc",
222-
"cxx": "/usr/bin/g++",
223-
"f77": "/usr/bin/gfortran-11",
224-
"fc": "/usr/bin/gfortran-11",
225-
},
226-
"flags": {},
227-
"operating_system": "ubuntu22.04",
228-
"target": "x86_64",
229-
"modules": [],
230-
"environment": {},
231-
"extra_rpaths": [],
232-
}
233-
}
234-
]
235-
}
202+
return compiler_section_for(
203+
"gcc",
204+
[
205+
compiler_def(
206+
"gcc@11.4.0 languages=c,c++,fortran",
207+
"/usr/",
208+
{"c": "gcc", "cxx": "g++", "fortran": "gfortran-11"},
209+
)
210+
],
211+
)
236212

237213
def compute_software_section(self):
238214
return {
239215
"software": {
240216
"packages": {
241217
"default-compiler": {"pkg_spec": "gcc@11.4.0"},
242-
"default-mpi": {"pkg_spec": "openmpi@4.0%gcc@11.4.0"},
243-
"compiler-gcc": {"pkg_spec": "gcc@11.4.0"},
244-
"lapack": {"pkg_spec": "lapack@0.29.2"},
245-
"mpi-gcc": {"pkg_spec": "openmpi@4.0%gcc@11.4.0"},
246218
}
247219
}
248220
}
249-
250-
def compute_spack_config_section(self):
251-
return {
252-
"config": {},
253-
"concretizer": {},
254-
"modules": {},
255-
"packages": {},
256-
"repos": [],
257-
"compilers": [],
258-
"mirrors": {},
259-
"providers": {"mpi": ["openmpi"]},
260-
}

0 commit comments

Comments
 (0)