-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'experiment/ior' of github.com:LLNL/benchpark into exper…
…iment/ior
- Loading branch information
Showing
24 changed files
with
204 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.