Skip to content

Commit

Permalink
add salmon application.py
Browse files Browse the repository at this point in the history
  • Loading branch information
slabasan committed Jan 21, 2025
1 parent aa053d6 commit c939a3c
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions experiments/salmon/experiment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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.directives import variant
from benchpark.experiment import Experiment
from benchpark.openmp import OpenMPExperiment


class Salmon(Experiment, OpenMPExperiment):

variant(
"workload",
default="gs",
values=("gs", "rt"),
description="salmon-tddft",
)

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

def compute_applications_section(self):

self.add_experiment_variable("experiment_setup", "")

if self.spec.satisfies("workload=gs"):
self.add_experiment_variable("exercise", "exercise_01_C2H2_gs")
self.add_experiment_variable("inp_file", "C2H2_gs.inp")
elif self.spec.satisfies("workload=rt"):
self.add_experiment_variable("exercise", "exercise_03_C2H2_rt")
self.add_experiment_variable("inp_file", "C2H2_rt_pulse.inp")
self.add_experiment_variable("restart_data", "../../gs/salmon_{n_nodes}_{n_ranks}_{n_threads}/data_for_restart/")

if self.spec.satisfies("+openmp"):
self.add_experiment_variable("n_ranks", "{processes_per_node} * {n_nodes}")
self.add_experiment_variable("processes_per_node", ["4"])
self.add_experiment_variable("n_nodes", ["1"], True)
self.add_experiment_variable("omp_num_threads", ["12"])
self.add_experiment_variable("arch", "OpenMP")

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

system_specs = {}
system_specs["compiler"] = "default-compiler"

self.add_spack_spec(
self.name, [f"salmon@{app_version}", system_specs["compiler"]]
)

0 comments on commit c939a3c

Please sign in to comment.