Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features/branson #462

Open
wants to merge 30 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ec5bd68
branson fix for lassen
Dec 1, 2024
31fb7d0
branson experiment fixes
Dec 1, 2024
e55474b
Branson experiment.py
Dec 2, 2024
3a9d12b
lint
Dec 2, 2024
d6a2140
Merge remote-tracking branch 'origin/develop' into features/branson
Dec 9, 2024
9eceb18
Merge branch 'develop' into features/branson
rfhaque Dec 16, 2024
a5bfa33
Merge branch 'develop' into features/branson
slabasan Dec 18, 2024
57d725b
Merge remote-tracking branch 'origin/develop' into features/branson
Jan 3, 2025
249120f
Merge remote-tracking branch 'origin/develop' into features/branson
Jan 10, 2025
1d20884
Merge remote-tracking branch 'origin/develop' into features/branson
Jan 11, 2025
8e232cf
branson hip cuda implementation
Jan 13, 2025
03f28fd
Fix input file params
Jan 13, 2025
f1d763f
lint
Jan 13, 2025
1783331
venado system specs
rfhaque Jan 15, 2025
2a261f7
Fix NVCC flags
rfhaque Jan 16, 2025
6d0a753
Merge remote-tracking branch 'origin/develop' into systems/venado
Jan 16, 2025
752bae8
Fix caliper version
Jan 16, 2025
e708c94
Add patches
Jan 16, 2025
b6c342d
Fix caliper, slurm issues
rfhaque Jan 16, 2025
4405a94
Merge remote-tracking branch 'origin/develop' into features/branson
rfhaque Jan 16, 2025
49b3fb1
Merge branch 'systems/venado' into features/branson
rfhaque Jan 16, 2025
c5bd894
Merge remote-tracking branch 'origin/develop' into features/branson
Jan 16, 2025
41295fc
Fix Cmake flags
Jan 16, 2025
8a4e9bd
Merge branch 'features/branson' of github.com:LLNL/benchpark into fea…
rfhaque Jan 16, 2025
682c049
Fixes
rfhaque Jan 16, 2025
cb8a309
Remove saxpy
Jan 16, 2025
d4d2f12
lint, license
Jan 16, 2025
eb64782
Pull from venado specs
Jan 16, 2025
f6cdf49
venado specs
Jan 17, 2025
1084379
gtl
rfhaque Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions experiments/branson/experiment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0

from benchpark.error import BenchparkError
from benchpark.directives import variant
from benchpark.experiment import Experiment
from benchpark.scaling import StrongScaling
from benchpark.scaling import WeakScaling
from benchpark.expr.builtin.caliper import Caliper


class Branson(
Experiment,
StrongScaling,
WeakScaling,
Caliper,
):
variant(
"workload",
default="branson",
description="workload name",
)

variant(
"version",
default="develop",
description="app version",
)

def compute_applications_section(self):
# TODO: Replace with conflicts clause
scaling_modes = {
"strong": self.spec.satisfies("+strong"),
"weak": self.spec.satisfies("+weak"),
"single_node": self.spec.satisfies("+single_node"),
}

scaling_mode_enabled = [key for key, value in scaling_modes.items() if value]
if len(scaling_mode_enabled) != 1:
raise BenchparkError(
f"Only one type of scaling per experiment is allowed for application package {self.name}"
)

# Number of processes in each dimension
num_nodes = {"n_nodes": 1}

# Per-process size (in zones) in each dimension
num_particles = {"num_particles": 850000000}

if self.spec.satisfies("+single_node"):
for pk, pv in num_nodes.items():
self.add_experiment_variable(pk, pv, True)
for nk, nv in num_particles.items():
self.add_experiment_variable(nk, nv, True)
elif self.spec.satisfies("+strong"):
scaled_variables = self.generate_strong_scaling_params(
{tuple(num_nodes.keys()): list(num_nodes.values())},
int(self.spec.variants["scaling-factor"][0]),
int(self.spec.variants["scaling-iterations"][0]),
)
for pk, pv in scaled_variables.items():
self.add_experiment_variable(pk, pv, True)
for nk, nv in num_particles.items():
self.add_experiment_variable(nk, nv, True)
elif self.spec.satisfies("+weak"):
scaled_variables = self.generate_weak_scaling_params(
{tuple(num_nodes.keys()): list(num_nodes.values())},
{tuple(num_particles.keys()): list(num_particles.values())},
int(self.spec.variants["scaling-factor"][0]),
int(self.spec.variants["scaling-iterations"][0]),
)
for k, v in scaled_variables.items():
self.add_experiment_variable(k, v, True)

self.add_experiment_variable("n_ranks", "{n_nodes}*{sys_cores_per_node}", True)

def compute_spack_section(self):
# get package version
app_version = self.spec.variants["version"][0]

# get system config options
# TODO: Get compiler/mpi/package handles directly from system.py
system_specs = {}
system_specs["compiler"] = "default-compiler"
system_specs["mpi"] = "default-mpi"
# if self.spec.satisfies("+cuda"):
# system_specs["cuda_version"] = "{default_cuda_version}"
# system_specs["cuda_arch"] = "{cuda_arch}"
# system_specs["blas"] = "cublas-cuda"
# if self.spec.satisfies("+rocm"):
# system_specs["rocm_arch"] = "{rocm_arch}"
# system_specs["blas"] = "blas-rocm"

# set package spack specs
self.add_spack_spec(system_specs["mpi"])

self.add_spack_spec(
self.name, [f"branson@{app_version}", system_specs["compiler"]]
)
51 changes: 51 additions & 0 deletions legacy/experiments/branson/mpi-only/ramble.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ramble:
applications:
branson:
workloads:
branson:
experiments:
branson_branson_weak_scaling_caliper_time_mpi_{n_nodes}_{num_particles}_{n_ranks}:
exclude: {}
matrix: []
variables:
n_nodes:
- 1
- 2
- 4
- 8
n_ranks: '{n_nodes}*{sys_cores_per_node}'
num_particles:
- 850000000
- 1700000000
- 3400000000
- 6800000000
variants:
package_manager: spack
zips: {}
config:
deprecated: true
spack_flags:
concretize: -U -f
install: --add --keep-stage
include:
- ./configs
modifiers:
- name: allocation
- mode: mpi
name: caliper
- mode: time
name: caliper
software:
environments:
branson:
packages:
- caliper
- default-mpi
- branson
packages:
branson:
compiler: default-compiler
pkg_spec: branson@develop+caliper
caliper:
compiler: default-compiler
pkg_spec: caliper@master+adiak+mpi~libunwind~libdw~papi
49 changes: 0 additions & 49 deletions legacy/experiments/branson/openmp/ramble.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions repo/branson/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from spack.package import *
from spack.pkg.builtin.boost import Boost

import os


class Branson(CMakePackage):
"""Branson's purpose is to study different algorithms for parallel Monte
Expand All @@ -30,6 +32,9 @@ class Branson(CMakePackage):
)
version("0.81", sha256="493f720904791f06b49ff48c17a681532c6a4d9fa59636522cf3f9700e77efe4")
version("0.8", sha256="85ffee110f89be00c37798700508b66b0d15de1d98c54328b6d02a9eb2cf1cb8")

variant("caliper", default=False, description="Enable Caliper monitoring")

#depends_on("mpi")
depends_on("mpi@2:")

Expand All @@ -39,16 +44,39 @@ class Branson(CMakePackage):
depends_on(Boost.with_default_variants, when="@:0.81")
depends_on("metis")
depends_on("parmetis", when="@:0.81")
depends_on("caliper", when="+caliper")
depends_on("adiak", when="+caliper")

root_cmakelists_dir = "src"

def patch(self):
ppu_intrinsics_file = os.path.join(self.stage.source_path, "src", "random123", "features", "ppu_intrinsics.h")
with open(ppu_intrinsics_file , "w") as f:
pass

def setup_build_environment(self, env):
if not self.spec.satisfies("+cuda"):
env.unset("CUDA_HOME")
env.unset("CUDADIR")
env.unset("CUDACXX")

def cmake_args(self):
spec = self.spec
args = []
#args.append("--enable-mpi")
args.append(f"-DCMAKE_C_COMPILER={spec['mpi'].mpicc}")
args.append(f"-DCMAKE_CXX_COMPILER={spec['mpi'].mpicxx}")
args.append(f"-DCMAKE_Fortran_COMPILER={spec['mpi'].mpifc}")

cflags = " ".join(self.compiler.flags['cflags']) if 'cflags' in self.compiler.flags else ""
cxxflags = " ".join(self.compiler.flags['cxxflags']) if 'cxxflags' in self.compiler.flags else ""

args.append("-DCMAKE_C_FLAGS={} -I{}/src/random123/features".format(cflags, self.stage.source_path))
args.append("-DCMAKE_CXX_FLAGS={} -I{}/src/random123/features".format(cxxflags, self.stage.source_path))
args.append(f"-DBUILD_TESTING=OFF")
Copy link
Collaborator Author

@rfhaque rfhaque Dec 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pearce8 This is just a temporary fix for lassen. Need to work with the branson team to fix build issues on that system.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look at the RNG package again and see if an update fixes this.

if self.spec.satisfies("+caliper"):
args.append(f"-DCALIPER_ROOT_DIR={self.spec['caliper'].prefix}")

return args

def install(self, spec, prefix):
Expand Down