diff --git a/apps/benchmarks/NonUniformGridGPU/simulation_setup/benchmark_configs.py b/apps/benchmarks/NonUniformGridGPU/simulation_setup/benchmark_configs.py index c98290b3a8fe400f72d78de0800515b4f84b6942..d17a69f56f0374eb7a63106cfa9ba8b11a013e68 100644 --- a/apps/benchmarks/NonUniformGridGPU/simulation_setup/benchmark_configs.py +++ b/apps/benchmarks/NonUniformGridGPU/simulation_setup/benchmark_configs.py @@ -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)