Skip to content

Commit

Permalink
updating scaling formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
august-knox committed Nov 25, 2024
1 parent c4e813c commit 60c2f9d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions experiments/remhos/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,24 @@ class Remhos(
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"),
"strong": self.spec.satisfies("+strong"),
"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:
print(scaling_mode_enabled)
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"):
if self.spec.satisfies("+single_node"):
for pk, pv in num_nodes.items():
self.add_experiment_variable(pk, pv, True)
elif self.spec.satisfies("strong=oui"):
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]),
Expand Down

0 comments on commit 60c2f9d

Please sign in to comment.