Skip to content
Snippets Groups Projects
Commit 39bd27f2 authored by Markus Holzer's avatar Markus Holzer
Browse files

Added non Uniform case

parent f6cd0d88
No related branches found
No related tags found
No related merge requests found
Pipeline #66133 failed
......@@ -134,28 +134,37 @@ def validation_run():
scenarios.add(scenario)
def scaling(num_proc, gpu_enabled_mpi=False):
def scaling(num_proc, gpu_enabled_mpi=False, uniform=True):
wlb.log_info_on_root("Running scaling benchmark...")
if wlb.mpi.numProcesses() > 1:
num_proc = wlb.mpi.numProcesses()
cells_per_block = (192, 192, 192)
domain_size = (cells_per_block[0] * 3, cells_per_block[1] * 3, cells_per_block[2] * 3 * num_proc)
if uniform:
factor = 3 * num_proc
name = "uniform"
else:
if num_proc % 4 != 0:
raise RuntimeError("Number of processes must be dividable by 4")
factor = int(num_proc // 4)
name = "nonuniform"
cells_per_block = (184, 184, 184)
domain_size = (cells_per_block[0] * 3, cells_per_block[1] * 3, cells_per_block[2] * factor)
root_blocks = tuple([d // c for d, c in zip(domain_size, cells_per_block)])
scenarios = wlb.ScenarioManager()
scenario = Scenario(blockforest_filestem=f"blockforest_{num_proc}",
scenario = Scenario(blockforest_filestem=f"blockforest_{name}_{num_proc}",
domain_size=domain_size,
root_blocks=root_blocks,
num_processes=4,
cells_per_block=cells_per_block,
refinement_depth=0,
refinement_depth=0 if uniform else 3,
timesteps=10,
gpu_enabled_mpi=gpu_enabled_mpi)
scenarios.add(scenario)
# validation_run()
scaling(4, True)
scaling(4, True, False)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment