Skip to content

Commit

Permalink
Use template directive for hpcg
Browse files Browse the repository at this point in the history
  • Loading branch information
linsword13 committed Jan 7, 2025
1 parent 72b8ee1 commit dd44306
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# except according to those terms.


import os
from ramble.appkit import *


Expand Down Expand Up @@ -112,17 +111,9 @@ class Hpcg(ExecutableApplication):
units="",
)

def _make_experiments(self, workspace, app_inst=None):
super()._make_experiments(workspace)

input_path = os.path.join(
self.expander.expand_var_name("experiment_run_dir"), "hpcg.dat"
)

with open(input_path, "w+") as f:
f.write("HPCG benchmark input file\n")
f.write(
"Sandia National Laboratories; University of Tennessee, Knoxville\n"
)
f.write(self.expander.expand_var_name("matrix_size") + "\n")
f.write(self.expander.expand_var_name("iterations") + "\n")
register_template(
name="hpcg_dat",
src_name="hpcg.dat.tpl",
dest_name="hpcg.dat",
define_var=False,
)
4 changes: 4 additions & 0 deletions var/ramble/repos/builtin/base_applications/hpcg/hpcg.dat.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HPCG benchmark input file
Sandia National Laboratories; University of Tennessee, Knoxville
{matrix_size}
{iterations}

0 comments on commit dd44306

Please sign in to comment.