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

experiment class for laghos #362

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a541f5b
initial commit for laghos experiment.py file
Sep 6, 2024
5cf7b0c
adding strong and weak scaling variants
Sep 12, 2024
a6ce707
changing scaling variant to experiments and adding existing exp
Sep 12, 2024
caf4694
changed default exp to example
Sep 12, 2024
aa247b0
updating scaling
Sep 19, 2024
304058f
fixing error w/ application.py
Sep 23, 2024
d5a088b
Merge branch 'develop' into experiment/laghos
pearce8 Sep 23, 2024
ce930a5
lint
pearce8 Sep 24, 2024
b7f60f5
lint
pearce8 Sep 24, 2024
1545b13
Merge branch 'develop' into experiment/laghos
pearce8 Sep 24, 2024
45cbc7f
Adding dry run
pearce8 Sep 24, 2024
336de63
Adding dry run
pearce8 Sep 24, 2024
525685c
Removing modifier
pearce8 Sep 24, 2024
61c50bd
initial commit for progress on sandia microbenchmarks
Sep 27, 2024
01cf391
Triplept problem
pearce8 Oct 20, 2024
871ff83
Triplept problem
pearce8 Oct 20, 2024
7fbfc9e
Triplept problem
pearce8 Oct 20, 2024
dfb1417
lint
pearce8 Oct 20, 2024
cc0700a
Merge branch 'develop' into experiment/laghos
pearce8 Oct 20, 2024
593ecce
Lint
pearce8 Oct 21, 2024
9ea5936
Setting workload
pearce8 Oct 21, 2024
83962db
lint
pearce8 Oct 22, 2024
ace5e78
Removing non-existing parameters
pearce8 Oct 22, 2024
72f1c40
lint
pearce8 Oct 22, 2024
8610a0c
workload
pearce8 Oct 22, 2024
f71e9da
workload
pearce8 Oct 22, 2024
6ea450c
colon
pearce8 Oct 22, 2024
c4f7e56
Merge remote-tracking branch 'origin/develop' into experiment/laghos
Nov 4, 2024
9e9e991
Change laghos experiment.py
Nov 5, 2024
0c89102
Merge branch 'develop' of github.com:august-knox/benchpark into smb
Nov 5, 2024
e1ebb2c
package changes
Nov 5, 2024
27d469a
laghos package.py zlib dependency
Nov 6, 2024
8f5089a
experiment class and package fixes
Nov 6, 2024
d5eff45
new experiment class, rma version
Nov 7, 2024
f09921f
lint
Nov 7, 2024
56e36f3
lint
Nov 7, 2024
9429986
more lint
Nov 7, 2024
511cf13
Delete experiments/smb/mpi directory
august-knox Nov 7, 2024
80f86c1
Merge branch 'LLNL:develop' into smb
august-knox Nov 7, 2024
99d38af
lint
Nov 7, 2024
2b15d2a
removing hidden tab
Nov 7, 2024
c41c24a
lint
Nov 7, 2024
1356edd
adding space between lines
Nov 7, 2024
28d51ed
adding dryruns
Nov 7, 2024
f10ba03
Merge branch 'experiment/laghos' of github.com:august-knox/benchpark …
Nov 7, 2024
51d565e
Merge branch 'LLNL:develop' into experiment/laghos
august-knox Nov 8, 2024
081f328
Delete var/exp_repo/experiments/laghos directory
august-knox Nov 8, 2024
e9f2dde
lint
Nov 8, 2024
5ee4f7f
Merge branch 'experiment/laghos' of github.com:august-knox/benchpark …
Nov 8, 2024
267ab13
Delete experiments/smb directory
august-knox Nov 8, 2024
3200a5c
Delete repo/smb directory
august-knox Nov 8, 2024
5cb114a
fixing dryrun
Nov 8, 2024
95f4a30
Merge branch 'experiment/laghos' of github.com:august-knox/benchpark …
Nov 8, 2024
bf3d3fb
adding zlib system packages
Nov 11, 2024
c68bb9b
fixing missing indent
Nov 11, 2024
6beac32
fixing dryruns
Nov 11, 2024
9fb98c9
generic x86 fixed
Nov 11, 2024
3f4402b
Merge branch 'develop' into experiment/laghos
pearce8 Nov 13, 2024
aa70cf0
Indentation
pearce8 Nov 13, 2024
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
11 changes: 6 additions & 5 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,23 @@ jobs:
--disable-logger \
workspace setup --dry-run

- name: Dry run laghos/mpi-only on LLNL-Magma-Penguin-icelake-OmniPath with allocation modifier
- name: Dry run dynamic laghos/mpi-only on LLNL-Magma-Penguin-icelake-OmniPath with allocation modifier
run: |
./bin/benchpark setup laghos/mpi-only LLNL-Magma-Penguin-icelake-OmniPath workspace/
./bin/benchpark experiment init --dest=laghos-mpi-only laghos
./bin/benchpark setup ./laghos-mpi-only LLNL-Magma-Penguin-icelake-OmniPath workspace/
. workspace/setup.sh
ramble \
--workspace-dir workspace/laghos/mpi-only/LLNL-Magma-Penguin-icelake-OmniPath/workspace \
--workspace-dir workspace/laghos-mpi-only/LLNL-Magma-Penguin-icelake-OmniPath/workspace \
--disable-progress-bar \
--disable-logger \
workspace setup --dry-run

- name: Dry run laghos/mpi-only on LLNL-Ruby-icelake-OmniPath with allocation modifier
run: |
./bin/benchpark setup laghos/mpi-only LLNL-Ruby-icelake-OmniPath workspace/
./bin/benchpark setup laghos-mpi-only LLNL-Ruby-icelake-OmniPath workspace/
. workspace/setup.sh
ramble \
--workspace-dir workspace/laghos/mpi-only/LLNL-Ruby-icelake-OmniPath/workspace \
--workspace-dir workspace/laghos-mpi-only/LLNL-Ruby-icelake-OmniPath/workspace \
--disable-progress-bar \
--disable-logger \
workspace setup --dry-run
Expand Down
80 changes: 80 additions & 0 deletions experiments/laghos/experiment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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.expr.builtin.caliper import Caliper


class Laghos(
Experiment,
StrongScaling,
Caliper,
):

variant(
"workload",
default="triplept",
description="triplept or other problem",
)

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

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

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 initial nodes
num_nodes = {"n_nodes": 1}

if self.spec.satisfies("single_node=oui"):
for pk, pv in num_nodes.items():
self.add_experiment_variable(pk, pv, True)
elif self.spec.satisfies("strong=oui"):
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)

self.add_experiment_variable(
"n_ranks", "{sys_cores_per_node} * {n_nodes}", 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"

# set package spack specs
# empty package_specs value implies external package
self.add_spack_spec(system_specs["mpi"])
# self.add_spack_spec(system_specs["blas"])

self.add_spack_spec(
self.name, [f"laghos@{app_version} +metis", system_specs["compiler"]]
)
26 changes: 23 additions & 3 deletions repo/laghos/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,29 @@ class Laghos(ExecutableApplication):
'lagrangian','spatial-discretization','unstructured-grid',
'network-latency-bound','network-collectives','unstructured-grid']

executable('p', 'laghos -p 3 -m {laghos}/data/box01_hex.mesh -rs 5 -ms 500', use_mpi=True)

workload('problem', executables=['p'])
executable('prob', 'laghos -p {problem} -m {mesh} -rs {rs} -rp {rp} -ms {ms}', use_mpi=True)

workload('triplept', executables=['prob'])

workload_variable('mesh', default='{laghos}/data/box01_hex.mesh',
description='mesh file',
workloads=['triplept'])

workload_variable('problem', default='3',
description='problem number',
workloads=['triplept'])

workload_variable('rs', default='5',
description='number of serial refinements',
workloads=['triplept'])

workload_variable('rp', default='0',
pearce8 marked this conversation as resolved.
Show resolved Hide resolved
description='number of parallel refinements',
workloads=['triplept'])

workload_variable('ms', default='500',
description='max number of steps',
workloads=['triplept'])

figure_of_merit('Major kernels total time',
log_file='{experiment_run_dir}/{experiment_name}.out',
Expand Down
3 changes: 2 additions & 1 deletion repo/laghos/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class Laghos(MakefilePackage):
depends_on("caliper", when="+caliper")
depends_on("adiak", when="+caliper")

depends_on("mfem@develop", when="@develop")
depends_on("[email protected]+optimize+pic+shared", when="@develop")
depends_on("mfem@develop^[email protected]+optimize+pic+shared", when="@develop")
depends_on("[email protected]:", when="@3.1")
depends_on("[email protected]:4.1", when="@3.0")
# Recommended mfem version for laghos v2.0 is: ^[email protected]
Expand Down
4 changes: 3 additions & 1 deletion systems/cts/externals/base/00-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ packages:
buildable: false
externals:
- spec: [email protected]
prefix: /usr/tce/packages/fftw/fftw-3.3.10
prefix: /usr/tce/packages/fftw/fftw-3.3.10
zlib-api:
require: zlib
2 changes: 2 additions & 0 deletions systems/genericx86/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ def sw_description(self):
pkg_spec: gcc
default-mpi:
pkg_spec: openmpi
zlib-api:
require: zlib
"""
2 changes: 2 additions & 0 deletions systems/sierra/externals/base/00-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ packages:
buildable: false
mpi:
buildable: false
zlib-api:
require: zlib
2 changes: 2 additions & 0 deletions systems/tioga/externals/base/00-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ packages:
buildable: false
rocsolver:
buildable: false
zlib-api:
require: zlib
Loading