Skip to content

Commit 2a9d9fc

Browse files
rfhaqueRiyaz Haquepearce8
authored
venado system specs (#548)
* venado system specs * Fix NVCC flags * Fix caliper version * Add patches * Fix caliper, slurm issues * Fix flag * Add gcc toolchain * lint, license * lint * Remove redundant code * amg2023 venado build * Fix gtl lib names * remove one_of clause * el cap compiler dependency * Create system_definition.yaml * cufft * Add dry runs --------- Co-authored-by: Riyaz Haque <[email protected]> Co-authored-by: pearce8 <[email protected]>
1 parent bad96b8 commit 2a9d9fc

File tree

18 files changed

+699
-5
lines changed

18 files changed

+699
-5
lines changed

.github/workflows/run.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,32 @@ jobs:
222222
--disable-logger \
223223
workspace setup --dry-run
224224
225+
- name: Dry run dynamic saxpy/openmp with dynamic Venado
226+
run: |
227+
./bin/benchpark system init --dest=venado-system1 lanl-venado cuda=12.5 compiler=cce +gtl
228+
system_id=$(./bin/benchpark system id ./venado-system1)
229+
./bin/benchpark experiment init --dest=saxpy-openmp-venado saxpy+openmp
230+
./bin/benchpark setup ./saxpy-openmp-venado ./venado-system1 workspace/
231+
. workspace/setup.sh
232+
ramble \
233+
--workspace-dir "workspace/saxpy-openmp-venado/$system_id/workspace" \
234+
--disable-progress-bar \
235+
--disable-logger \
236+
workspace setup --dry-run
237+
238+
- name: Dry run dynamic saxpy/cuda with dynamic Venado
239+
run: |
240+
./bin/benchpark system init --dest=venado-system2 lanl-venado cuda=12.5 compiler=cce +gtl
241+
system_id=$(./bin/benchpark system id ./venado-system2)
242+
./bin/benchpark experiment init --dest=saxpy-cuda-venado saxpy+cuda
243+
./bin/benchpark setup ./saxpy-cuda-venado ./venado-system2 workspace/
244+
. workspace/setup.sh
245+
ramble \
246+
--workspace-dir "workspace/saxpy-cuda-venado/$system_id/workspace" \
247+
--disable-progress-bar \
248+
--disable-logger \
249+
workspace setup --dry-run
250+
225251
- name: Dry run dynamic gromacs/openmp with dynamic Ruby
226252
run: |
227253
./bin/benchpark system init --dest=cluster-system llnl-cluster compiler=gcc

legacy/systems/LLNL-Tioga-HPECray-zen3-MI250X-Slingshot/auxiliary_software_files/packages.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ packages:
302302
gtl_cutoff_size: 4096
303303
fi_cxi_ats: 0
304304
gtl_lib_path: /opt/cray/pe/mpich/8.1.26/gtl/lib
305+
gtl_libs: ["libmpi_gtl_hsa"]
305306
ldflags: "-L/opt/cray/pe/mpich/8.1.26/ofi/crayclang/16.0/lib -lmpi -L/opt/cray/pe/mpich/8.1.26/gtl/lib -Wl,-rpath=/opt/cray/pe/mpich/8.1.26/gtl/lib -lmpi_gtl_hsa"
306307
- spec: [email protected]%[email protected] ~gtl +wrappers
307308
prefix: /opt/cray/pe/mpich/8.1.26/ofi/crayclang/16.0

repo/amg2023/package.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,18 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage):
3636

3737
depends_on("hypre+cuda", when="+cuda")
3838
requires("+cuda", when="^hypre+cuda")
39-
for arch in ("none", "50", "60", "70", "80"):
39+
for arch in ("none", "50", "60", "70", "80", "90"):
4040
depends_on(f"hypre cuda_arch={arch}", when=f"cuda_arch={arch}")
4141

4242
depends_on("hypre+rocm", when="+rocm")
4343
requires("+rocm", when="^hypre+rocm")
4444
for target in ("none", "gfx803", "gfx900", "gfx906", "gfx908", "gfx90a", "gfx942"):
4545
depends_on(f"hypre amdgpu_target={target}", when=f"amdgpu_target={target}")
4646

47+
def setup_build_environment(self, env):
48+
if "+cuda" in self.spec:
49+
env.set("NVCC_APPEND_FLAGS", "-allow-unsupported-compiler")
50+
4751
def cmake_args(self):
4852
cmake_options = []
4953
cmake_options.append(self.define_from_variant("AMG_WITH_CALIPER", "caliper"))

repo/caliper/for_aarch64.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- spack-src/src/services/callpath/Callpath.cpp.bak 2020-10-28 14:38:19.668122844 +0900
2+
+++ spack-src/src/services/callpath/Callpath.cpp 2020-10-28 15:03:12.258061188 +0900
3+
@@ -63,7 +63,7 @@
4+
unw_context_t unw_ctx;
5+
unw_cursor_t unw_cursor;
6+
7+
- unw_getcontext(&unw_ctx);
8+
+ unw_getcontext(unw_ctx);
9+
10+
if (unw_init_local(&unw_cursor, &unw_ctx) < 0) {
11+
Log(0).stream() << "callpath: unable to init libunwind cursor" << endl;

repo/caliper/package.py

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
# Copyright 2023 Lawrence Livermore National Security, LLC and other
2+
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
import os
7+
import sys
8+
9+
from spack.package import *
10+
11+
12+
class Caliper(CachedCMakePackage, CudaPackage, ROCmPackage):
13+
"""Caliper is a program instrumentation and performance measurement
14+
framework. It is designed as a performance analysis toolbox in a
15+
library, allowing one to bake performance analysis capabilities
16+
directly into applications and activate them at runtime.
17+
"""
18+
19+
homepage = "https://github.com/LLNL/Caliper"
20+
git = "https://github.com/LLNL/Caliper.git"
21+
url = "https://github.com/LLNL/Caliper/archive/v2.12.1.tar.gz"
22+
tags = ["e4s", "radiuss"]
23+
24+
maintainers("daboehme", "adrienbernede")
25+
26+
test_requires_compiler = True
27+
28+
license("BSD-3-Clause")
29+
30+
version("master", branch="master")
31+
version("2.12.1", sha256="2b5a8f98382c94dc75cc3f4517c758eaf9a3f9cea0a8dbdc7b38506060d6955c")
32+
version("2.11.0", sha256="b86b733cbb73495d5f3fe06e6a9885ec77365c8aa9195e7654581180adc2217c")
33+
version("2.10.0", sha256="14c4fb5edd5e67808d581523b4f8f05ace8549698c0e90d84b53171a77f58565")
34+
version("2.9.1", sha256="4771d630de505eff9227e0ec498d0da33ae6f9c34df23cb201b56181b8759e9e")
35+
version("2.9.0", sha256="507ea74be64a2dfd111b292c24c4f55f459257528ba51a5242313fa50978371f")
36+
version(
37+
"2.8.0",
38+
sha256="17807b364b5ac4b05997ead41bd173e773f9a26ff573ff2fe61e0e70eab496e4",
39+
deprecated=True,
40+
)
41+
version(
42+
"2.7.0",
43+
sha256="b3bf290ec2692284c6b4f54cc0c507b5700c536571d3e1a66e56626618024b2b",
44+
deprecated=True,
45+
)
46+
version(
47+
"2.6.0",
48+
sha256="6efcd3e4845cc9a6169e0d934840766b12182c6d09aa3ceca4ae776e23b6360f",
49+
deprecated=True,
50+
)
51+
version(
52+
"2.5.0",
53+
sha256="d553e60697d61c53de369b9ca464eb30710bda90fba9671201543b64eeac943c",
54+
deprecated=True,
55+
)
56+
version(
57+
"2.4.0", tag="v2.4.0", commit="30577b4b8beae104b2b35ed487fec52590a99b3d", deprecated=True
58+
)
59+
version(
60+
"2.3.0", tag="v2.3.0", commit="9fd89bb0120750d1f9dfe37bd963e24e478a2a20", deprecated=True
61+
)
62+
version(
63+
"2.2.0", tag="v2.2.0", commit="c408e9b3642c7aa80eff37b0826d819c57e7bc04", deprecated=True
64+
)
65+
version(
66+
"2.1.1", tag="v2.1.1", commit="0593b0e01c1d8d3e50c990399cc0fee403485599", deprecated=True
67+
)
68+
version(
69+
"2.0.1", tag="v2.0.1", commit="4d7ff46381c53a461e62edd949e2d9dea9db7b08", deprecated=True
70+
)
71+
version(
72+
"1.9.1", tag="v1.9.1", commit="cfc1defbbee20b50dd3e3477badd09a92b1df970", deprecated=True
73+
)
74+
version(
75+
"1.9.0", tag="v1.9.0", commit="8356e747349b285aa621c5b74e71559f0babc4a1", deprecated=True
76+
)
77+
version(
78+
"1.8.0", tag="v1.8.0", commit="117c1ef596b617dc71407b8b67eebef094a654f8", deprecated=True
79+
)
80+
version(
81+
"1.7.0", tag="v1.7.0", commit="898277c93d884d4e7ca1ffcf3bbea81d22364f26", deprecated=True
82+
)
83+
84+
#depends_on("c", type="build") # generated
85+
#depends_on("cxx", type="build") # generated
86+
#depends_on("fortran", type="build") # generated
87+
88+
is_linux = sys.platform.startswith("linux")
89+
variant("shared", default=True, description="Build shared libraries")
90+
variant("adiak", default=True, description="Enable Adiak support")
91+
variant("mpi", default=True, description="Enable MPI support")
92+
# libunwind has some issues on Mac
93+
variant(
94+
"libunwind", default=sys.platform != "darwin", description="Enable stack unwind support"
95+
)
96+
variant("libdw", default=is_linux, description="Enable DWARF symbol lookup")
97+
# pthread_self() signature is incompatible with PAPI_thread_init() on Mac
98+
variant("papi", default=sys.platform != "darwin", description="Enable PAPI service")
99+
variant("libpfm", default=False, description="Enable libpfm (perf_events) service")
100+
# Gotcha is Linux-only
101+
variant("gotcha", default=is_linux, description="Enable GOTCHA support")
102+
variant("sampler", default=is_linux, description="Enable sampling support on Linux")
103+
variant("sosflow", default=False, description="Enable SOSflow support")
104+
variant("fortran", default=False, description="Enable Fortran support")
105+
variant("variorum", default=False, description="Enable Variorum support")
106+
variant("vtune", default=False, description="Enable Intel Vtune support")
107+
variant("kokkos", default=True, when="@2.3.0:", description="Enable Kokkos profiling support")
108+
variant("tests", default=False, description="Enable tests")
109+
variant("tools", default=True, description="Enable tools")
110+
variant("python", default=False, when="@v2.12:", description="Build Python bindings")
111+
112+
depends_on("[email protected]:0", when="@2.2:2.10 +adiak")
113+
depends_on("[email protected]:0", when="@2.11: +adiak")
114+
115+
depends_on("[email protected]:5", when="@:2.2 +papi")
116+
depends_on("[email protected]:", when="@2.3: +papi")
117+
118+
depends_on("[email protected]:4", when="+libpfm")
119+
120+
depends_on("mpi", when="+mpi")
121+
depends_on("[email protected]:1", when="+libunwind")
122+
depends_on("elfutils", when="+libdw")
123+
depends_on("variorum", when="+variorum")
124+
depends_on("intel-oneapi-vtune", when="+vtune")
125+
126+
depends_on("sosflow@spack", when="@1.0:1+sosflow")
127+
128+
depends_on("cmake", type="build")
129+
depends_on("python", type="build")
130+
131+
depends_on("python@3", when="+python", type=("build", "link", "run"))
132+
depends_on("py-pybind11", when="+python", type=("build", "link", "run"))
133+
134+
# sosflow support not yet in 2.0
135+
conflicts("+sosflow", "@2:")
136+
conflicts("+adiak", "@:2.1")
137+
conflicts("+libdw", "@:2.4")
138+
conflicts("+rocm", "@:2.7")
139+
conflicts("+rocm+cuda")
140+
141+
patch("for_aarch64.patch", when="@:2.11 target=aarch64:")
142+
patch(
143+
"sampler-service-missing-libunwind-include-dir.patch",
144+
when="@2.9.0:2.9.1 +libunwind +sampler",
145+
)
146+
147+
def _get_sys_type(self, spec):
148+
sys_type = spec.architecture
149+
if "SYS_TYPE" in env:
150+
sys_type = env["SYS_TYPE"]
151+
return sys_type
152+
153+
def initconfig_compiler_entries(self):
154+
spec = self.spec
155+
entries = super().initconfig_compiler_entries()
156+
157+
if spec.satisfies("+rocm"):
158+
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
159+
160+
entries.append(cmake_cache_option("WITH_FORTRAN", spec.satisfies("+fortran")))
161+
162+
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
163+
entries.append(cmake_cache_option("BUILD_TESTING", spec.satisfies("+tests")))
164+
entries.append(cmake_cache_option("WITH_TOOLS", spec.satisfies("+tools")))
165+
entries.append(cmake_cache_option("BUILD_DOCS", False))
166+
entries.append(cmake_cache_path("PYTHON_EXECUTABLE", spec["python"].command.path))
167+
168+
return entries
169+
170+
def initconfig_hardware_entries(self):
171+
spec = self.spec
172+
entries = super().initconfig_hardware_entries()
173+
174+
if spec.satisfies("+cuda"):
175+
entries.append(cmake_cache_option("WITH_CUPTI", True))
176+
entries.append(cmake_cache_option("WITH_NVTX", True))
177+
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix))
178+
entries.append(cmake_cache_path("CUPTI_PREFIX", spec["cuda"].prefix))
179+
else:
180+
entries.append(cmake_cache_option("WITH_CUPTI", False))
181+
entries.append(cmake_cache_option("WITH_NVTX", False))
182+
183+
if spec.satisfies("+rocm"):
184+
entries.append(cmake_cache_option("WITH_ROCTRACER", True))
185+
entries.append(cmake_cache_option("WITH_ROCTX", True))
186+
else:
187+
entries.append(cmake_cache_option("WITH_ROCTRACER", False))
188+
entries.append(cmake_cache_option("WITH_ROCTX", False))
189+
190+
return entries
191+
192+
def initconfig_mpi_entries(self):
193+
spec = self.spec
194+
entries = super().initconfig_mpi_entries()
195+
196+
entries.append(cmake_cache_option("WITH_MPI", spec.satisfies("+mpi")))
197+
198+
return entries
199+
200+
def initconfig_package_entries(self):
201+
spec = self.spec
202+
entries = []
203+
204+
# TPL locations
205+
entries.append("#------------------{0}".format("-" * 60))
206+
entries.append("# TPLs")
207+
entries.append("#------------------{0}\n".format("-" * 60))
208+
209+
if spec.satisfies("+adiak"):
210+
entries.append(cmake_cache_path("adiak_DIR", spec["adiak"].prefix))
211+
if spec.satisfies("+papi"):
212+
entries.append(cmake_cache_path("PAPI_PREFIX", spec["papi"].prefix))
213+
if spec.satisfies("+libdw"):
214+
entries.append(cmake_cache_path("LIBDW_PREFIX", spec["elfutils"].prefix))
215+
if spec.satisfies("+libpfm"):
216+
entries.append(cmake_cache_path("LIBPFM_INSTALL", spec["libpfm4"].prefix))
217+
if spec.satisfies("+sosflow"):
218+
entries.append(cmake_cache_path("SOS_PREFIX", spec["sosflow"].prefix))
219+
if spec.satisfies("+variorum"):
220+
entries.append(cmake_cache_path("VARIORUM_PREFIX", spec["variorum"].prefix))
221+
if spec.satisfies("+vtune"):
222+
itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest")
223+
entries.append(cmake_cache_path("ITT_PREFIX", itt_dir))
224+
if spec.satisfies("+libunwind"):
225+
entries.append(cmake_cache_path("LIBUNWIND_PREFIX", spec["unwind"].prefix))
226+
227+
# Build options
228+
entries.append("#------------------{0}".format("-" * 60))
229+
entries.append("# Build Options")
230+
entries.append("#------------------{0}\n".format("-" * 60))
231+
232+
entries.append(cmake_cache_option("WITH_ADIAK", spec.satisfies("+adiak")))
233+
entries.append(cmake_cache_option("WITH_GOTCHA", spec.satisfies("+gotcha")))
234+
entries.append(cmake_cache_option("WITH_SAMPLER", spec.satisfies("+sampler")))
235+
entries.append(cmake_cache_option("WITH_PAPI", spec.satisfies("+papi")))
236+
entries.append(cmake_cache_option("WITH_LIBDW", spec.satisfies("+libdw")))
237+
entries.append(cmake_cache_option("WITH_LIBPFM", spec.satisfies("+libpfm")))
238+
entries.append(cmake_cache_option("WITH_SOSFLOW", spec.satisfies("+sosflow")))
239+
entries.append(cmake_cache_option("WITH_KOKKOS", spec.satisfies("+kokkos")))
240+
entries.append(cmake_cache_option("WITH_VARIORUM", spec.satisfies("+variorum")))
241+
entries.append(cmake_cache_option("WITH_VTUNE", spec.satisfies("+vtune")))
242+
entries.append(cmake_cache_option("WITH_PYTHON_BINDINGS", spec.satisfies("+python")))
243+
244+
# -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5
245+
callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH"
246+
entries.append(cmake_cache_option("WITH_%s" % callpath_flag, spec.satisfies("+libunwind")))
247+
248+
return entries
249+
250+
def cmake_args(self):
251+
return []
252+
253+
def setup_run_environment(self, env):
254+
if self.spec.satisfies("+python"):
255+
env.prepend_path("PYTHONPATH", self.spec.prefix.join(python_platlib))
256+
env.prepend_path("PYTHONPATH", self.spec.prefix.join(python_purelib))
257+
258+
@run_after("install")
259+
def cache_test_sources(self):
260+
"""Copy the example source files after the package is installed to an
261+
install test subdirectory for use during `spack test run`."""
262+
cache_extra_test_sources(self, [join_path("examples", "apps")])
263+
264+
def test_cxx_example(self):
265+
"""build and run cxx-example"""
266+
267+
exe = "cxx-example"
268+
source_file = "{0}.cpp".format(exe)
269+
270+
source_path = find_required_file(
271+
self.test_suite.current_test_cache_dir, source_file, expected=1, recursive=True
272+
)
273+
274+
lib_dir = self.prefix.lib if os.path.exists(self.prefix.lib) else self.prefix.lib64
275+
276+
cxx = which(os.environ["CXX"])
277+
test_dir = os.path.dirname(source_path)
278+
with working_dir(test_dir):
279+
cxx(
280+
"-L{0}".format(lib_dir),
281+
"-I{0}".format(self.prefix.include),
282+
source_path,
283+
"-o",
284+
exe,
285+
"-std=c++11",
286+
"-lcaliper",
287+
"-lstdc++",
288+
)
289+
290+
cxx_example = which(exe)
291+
cxx_example()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff -ruN spack-src/src/services/sampler/CMakeLists.txt spack-src-patched/src/services/sampler/CMakeLists.txt
2+
--- spack-src/src/services/sampler/CMakeLists.txt 2022-11-30 13:52:42.000000000 -0500
3+
+++ spack-src-patched/src/services/sampler/CMakeLists.txt 2023-05-04 20:43:47.240310306 -0400
4+
@@ -17,6 +17,10 @@
5+
6+
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
7+
8+
+if (CALIPER_HAVE_LIBUNWIND)
9+
+ include_directories(${LIBUNWIND_INCLUDE_DIRS})
10+
+endif()
11+
+
12+
add_library(caliper-sampler OBJECT ${CALIPER_SAMPLER_SOURCES})
13+
14+
add_service_objlib("caliper-sampler")

repo/cray-mpich/package.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def libs(self):
1717

1818
if self.spec.satisfies("+gtl"):
1919
gtl_lib_prefix = self.spec.extra_attributes["gtl_lib_path"]
20-
libraries = ["libmpi_gtl_hsa"]
21-
libs += find_libraries(libraries, root=gtl_lib_prefix, recursive=True)
20+
gtl_libs = self.spec.extra_attributes["gtl_libs"]
21+
libs += find_libraries(gtl_libs, root=gtl_lib_prefix, recursive=True)
2222

2323
return libs
2424

@@ -29,8 +29,6 @@ def setup_run_environment(self, env):
2929
if self.spec.satisfies("+gtl"):
3030
env.set("MPICH_GPU_SUPPORT_ENABLED", "1")
3131
env.prepend_path("LD_LIBRARY_PATH", self.spec.extra_attributes["gtl_lib_path"])
32-
env.set("GTL_HSA_VSMSG_CUTOFF_SIZE", str(self.spec.extra_attributes["gtl_cutoff_size"]))
33-
env.set("FI_CXI_ATS", str(self.spec.extra_attributes["fi_cxi_ats"]))
3432
else:
3533
env.set("MPICH_GPU_SUPPORT_ENABLED", "0")
3634
gtl_path = self.spec.extra_attributes.get("gtl_lib_path", "")

0 commit comments

Comments
 (0)