Skip to content
Snippets Groups Projects
Commit 1aa89f9e authored by Michael Zikeli's avatar Michael Zikeli
Browse files

[ci skip] Add benchmark name parameter to Scenario class

parent 9f647693
No related merge requests found
......@@ -89,13 +89,15 @@ def domain_block_size_ok(block_size, total_mem, gls=1, q=27, size_per_value=8):
class Scenario:
def __init__(self, cells_per_block=(256, 128, 128), periodic=(1, 1, 1), cuda_blocks=(128, 1, 1),
def __init__(self, benchmark_name="not defined", cells_per_block=(256, 128, 128), periodic=(1, 1, 1), cuda_blocks=(128, 1, 1),
timesteps=None, time_step_strategy="normal", omega=1.8, cuda_enabled_mpi=False,
inner_outer_split=(1, 1, 1), warmup_steps=5, outer_iterations=3,
init_shear_flow=False, boundary_setup=False,
vtk_write_frequency=0, remaining_time_logger_frequency=-1,
additional_info=None, blocks=None, db_file_name=None):
self.benchmark_name = benchmark_name
if boundary_setup:
init_shear_flow = False
periodic = (0, 0, 0)
......@@ -168,6 +170,7 @@ class Scenario:
if self.additional_info is not None:
data.update(self.additional_info)
data['Identifier'] = self.benchmark_name
data['executable'] = sys.argv[0]
data['compile_flags'] = wlb.build_info.compiler_flags
data['walberla_version'] = wlb.build_info.version
......@@ -209,7 +212,8 @@ def weak_scaling_overlap(cuda_enabled_mpi=False):
# overlap
for t in ["simpleOverlap"]:
scenarios.add(Scenario(cells_per_block=(WeakX, WeakY, WeakZ),
scenarios.add(Scenario(benchmark_name="weakScalingUniformGrid",
cells_per_block=(WeakX, WeakY, WeakZ),
cuda_blocks=(128, 1, 1),
time_step_strategy=t,
inner_outer_split=(8, 8, 8),
......@@ -231,7 +235,8 @@ def strong_scaling_overlap(cuda_enabled_mpi=False):
# overlap
for t in ["simpleOverlap"]:
scenarios.add(Scenario(cells_per_block=cells_per_block,
scenarios.add(Scenario(benchmark_name="strongScalingUniformGridOneBlock",
cells_per_block=cells_per_block,
cuda_blocks=(128, 1, 1),
time_step_strategy=t,
inner_outer_split=(1, 1, 1),
......@@ -270,7 +275,8 @@ def single_gpu_benchmark():
if not domain_block_size_ok(block_size, gpu_mem):
wlb.log_info_on_root(f"Block size {block_size} would exceed GPU memory. Skipping.")
continue
scenario = Scenario(cells_per_block=block_size,
scenario = Scenario(benchmark_name="singleNodeUniformGridOneBlock",
cells_per_block=block_size,
cuda_blocks=cuda_block_size,
time_step_strategy='kernelOnly',
timesteps=num_time_steps(block_size, 2000),
......@@ -287,7 +293,8 @@ def validation_run():
time_step_strategy = "noOverlap" # "simpleOverlap"
scenarios = wlb.ScenarioManager()
scenario = Scenario(cells_per_block=(128, 128, 128),
scenario = Scenario(benchmark_name="validationUniformGrid",
cells_per_block=(128, 128, 128),
time_step_strategy=time_step_strategy,
timesteps=10001,
outer_iterations=1,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment