From 874154a68e54488b2493cb5958a5157683e61152 Mon Sep 17 00:00:00 2001 From: Bob Bird Date: Tue, 3 Dec 2024 12:32:47 -0700 Subject: [PATCH] Add roms application definition --- .../builtin/applications/roms/application.py | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 var/ramble/repos/builtin/applications/roms/application.py diff --git a/var/ramble/repos/builtin/applications/roms/application.py b/var/ramble/repos/builtin/applications/roms/application.py new file mode 100644 index 000000000..bbaa32af3 --- /dev/null +++ b/var/ramble/repos/builtin/applications/roms/application.py @@ -0,0 +1,91 @@ +# Copyright 2022-2024 The Ramble Authors +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +from ramble.appkit import * + + +class Roms(ExecutableApplication): + """ + The Regional Ocean Modeling System (ROMS) is a free-surface, + terrain-following, primitive equations ocean model widely used by the + scientific community for a diverse range of applications. ROMS includes + accurate and efficient physical and numerical algorithms and several + coupled models for biogeochemical, bio-optical, sediment, and sea ice + applications. + + https://www.myroms.org/ + """ + + name = "roms" + + tags("ocean") + + software_spec( + "roms", pkg_spec="roms@4.1", package_manager="spack*" + ) + software_spec( + "openmpi412", pkg_spec="openmpi@4.1.2", package_manager="spack*" + ) + + input_file( + "bm1", + url="https://raw.githubusercontent.com/myroms/roms/refs/tags/roms-4.1/ROMS/External/roms_benchmark1.in", + expand=False, + description="Simple test benchmark (small)" + ) + input_file( + "varinfo", + url="https://raw.githubusercontent.com/myroms/roms/refs/tags/roms-4.1/ROMS/External/varinfo.yaml", + expand=False, + description="Metadata dict for benchmark inputs" + ) + + executable("execute", "romsM {input_deck}", use_mpi=True) + executable( + "copy_input", "cp {input_path} {experiment_run_dir}/.", use_mpi=False + ) + executable( + "copy_varinfo", + template=[ + "mkdir -p {experiment_run_dir}/ROMS/External/", + "cp {varinfo} {experiment_run_dir}/ROMS/External/", + ], + use_mpi=False + ) + + workload( + "benchmark_1", executables=["copy_input", "copy_varinfo", "execute"], inputs=["bm1", "varinfo"] + ) + + workload_variable( + "input_deck", + default="roms_benchmark1.in", + description="Name of input deck", + workloads=["benchmark_1"], + ) + + workload_variable( + "input_path", + default="{bm1}", + description="Path to input deck", + workloads=["benchmark_1"], + ) + + success_criteria( + "prints_done", + mode="string", + match=r".*ROMS/TOMS: DONE.*", + ) + + figure_of_merit( + "Total Time", + #All percentages are with respect to total time = 117.482 + fom_regex=rf"\s*All percentages are with respect to total time =\s+(?P