|
Peano
|
Variables | |
| list | Kernels_GPU = ["drift_gpu", "kick1_gpu", "kick2_gpu", "density_gpu", "force_gpu"] |
| Parse user input. | |
| list | Kernels = [ "drift", "kick1", "kick2", "density", "force" ] + Kernels_GPU |
| parser = argparse.ArgumentParser(description="SPH kernel benchmarking script") | |
| dest | |
| type | |
| default | |
| help | |
| action | |
| required | |
| choices | |
| nargs | |
| args = parser.parse_args() | |
| list | project_namespace = ["benchmarks", "exaparty", "hydro", "kernel_throughput"] |
| Create ExaParty project and particle species. | |
| project | |
| str | name = "HydroPart" |
| dimensions = args.dimensions | |
| int | hydro_dimensions = 2 |
| particle | |
| int | HYDRO_DIMENSIONS = hydro_dimensions |
| Set parameters for the SPH simulation. | |
| list | gamma_hydro_list = [str(5 / 3), str(7 / 5), str(4 / 3), str(2 / 1)] |
| list | gamma_hydro_list_symbols |
| list | GAMMA = gamma_hydro_list[0] |
| list | GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0] |
| str | kernel = "quartic_spline" |
| KERNEL_SYMBOL = sphtools.sph_kernel_macro_name[kernel] | |
| KERNEL_SUPPORT_RAD = sphtools.sph_kernel_H_over_h[HYDRO_DIMENSIONS - 1][kernel] | |
| h_hydro_max | |
| particle_set = project.add_particle_species(particle) | |
| Add particle species to project. | |
| build_mode = peano4.api.output.CompileMode.RELEASE | |
| list | offset = [0, 0, 0] |
| list | domain_size = [1, 1, 1] |
| list | periodic_boundary_conditions = [False, False, False] |
| min_end_time | |
| max_end_time | |
| first_plot_time_stamp | |
| time_in_between_plots | |
| periodic_BC | |
| plotter_precision | |
| peano4_project = project.generate_Peano4_project(verbose=args.verbose) | |
| Generate plain Peano 4 project. | |
| cpu_only = args.cpu_only | |
| gpu_only = args.gpu_only | |
| tuple | enabled = (cpu_only and 'gpu' not in kernel) or (gpu_only and 'gpu' in kernel) or (not cpu_only and not gpu_only) |
| list | dirs = ["vertexdata/", "repositories/", "globaldata/", "observers/", "Constants.h"] |
| Compilation. | |
| dir | |
| ignore_errors | |
| overwrite | |
| Default | |
| throw_away_data_after_generation | |
| make_clean_first | |
| True | |
| number_of_parallel_builds | |
| kernel-throughput.action |
Definition at line 34 of file kernel-throughput.py.
| kernel-throughput.args = parser.parse_args() |
Definition at line 144 of file kernel-throughput.py.
| kernel-throughput.build_mode = peano4.api.output.CompileMode.RELEASE |
Definition at line 226 of file kernel-throughput.py.
| kernel-throughput.choices |
Definition at line 104 of file kernel-throughput.py.
| kernel-throughput.cpu_only = args.cpu_only |
Definition at line 311 of file kernel-throughput.py.
| kernel-throughput.default |
Definition at line 27 of file kernel-throughput.py.
| kernel-throughput.Default |
Definition at line 336 of file kernel-throughput.py.
| kernel-throughput.dest |
Definition at line 25 of file kernel-throughput.py.
| kernel-throughput.dimensions = args.dimensions |
Definition at line 162 of file kernel-throughput.py.
| kernel-throughput.dir |
Definition at line 333 of file kernel-throughput.py.
| list kernel-throughput.dirs = ["vertexdata/", "repositories/", "globaldata/", "observers/", "Constants.h"] |
Compilation.
Before we start the compilation, we add our real benchmark driver.
Definition at line 331 of file kernel-throughput.py.
| kernel-throughput.domain_size = [1, 1, 1] |
Definition at line 238 of file kernel-throughput.py.
| tuple kernel-throughput.enabled = (cpu_only and 'gpu' not in kernel) or (gpu_only and 'gpu' in kernel) or (not cpu_only and not gpu_only) |
Definition at line 319 of file kernel-throughput.py.
| kernel-throughput.first_plot_time_stamp |
Definition at line 247 of file kernel-throughput.py.
| list kernel-throughput.GAMMA = gamma_hydro_list[0] |
Definition at line 199 of file kernel-throughput.py.
| list kernel-throughput.gamma_hydro_list = [str(5 / 3), str(7 / 5), str(4 / 3), str(2 / 1)] |
Definition at line 192 of file kernel-throughput.py.
| list kernel-throughput.gamma_hydro_list_symbols |
Definition at line 193 of file kernel-throughput.py.
| list kernel-throughput.GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0] |
Definition at line 200 of file kernel-throughput.py.
| kernel-throughput.gpu_only = args.gpu_only |
Definition at line 312 of file kernel-throughput.py.
| kernel-throughput.h_hydro_max |
Definition at line 208 of file kernel-throughput.py.
| kernel-throughput.help |
Definition at line 28 of file kernel-throughput.py.
| int kernel-throughput.hydro_dimensions = 2 |
Definition at line 163 of file kernel-throughput.py.
| int kernel-throughput.HYDRO_DIMENSIONS = hydro_dimensions |
Set parameters for the SPH simulation.
We mainly use default arguments and we stick to the minimum that we need to let the code compile.
Definition at line 185 of file kernel-throughput.py.
| kernel-throughput.ignore_errors |
Definition at line 333 of file kernel-throughput.py.
| str kernel-throughput.kernel = "quartic_spline" |
Definition at line 204 of file kernel-throughput.py.
| kernel-throughput.KERNEL_SUPPORT_RAD = sphtools.sph_kernel_H_over_h[HYDRO_DIMENSIONS - 1][kernel] |
Definition at line 206 of file kernel-throughput.py.
Definition at line 205 of file kernel-throughput.py.
| list kernel-throughput.Kernels = [ "drift", "kick1", "kick2", "density", "force" ] + Kernels_GPU |
Definition at line 18 of file kernel-throughput.py.
| list kernel-throughput.Kernels_GPU = ["drift_gpu", "kick1_gpu", "kick2_gpu", "density_gpu", "force_gpu"] |
Parse user input.
Definition at line 17 of file kernel-throughput.py.
| kernel-throughput.make_clean_first |
Definition at line 338 of file kernel-throughput.py.
| kernel-throughput.max_end_time |
Definition at line 246 of file kernel-throughput.py.
| kernel-throughput.min_end_time |
Definition at line 245 of file kernel-throughput.py.
| str kernel-throughput.name = "HydroPart" |
Definition at line 160 of file kernel-throughput.py.
| kernel-throughput.nargs |
Definition at line 113 of file kernel-throughput.py.
| kernel-throughput.number_of_parallel_builds |
Definition at line 338 of file kernel-throughput.py.
| kernel-throughput.offset = [0, 0, 0] |
Definition at line 237 of file kernel-throughput.py.
| kernel-throughput.overwrite |
Definition at line 336 of file kernel-throughput.py.
Definition at line 21 of file kernel-throughput.py.
| kernel-throughput.particle |
Definition at line 165 of file kernel-throughput.py.
Add particle species to project.
Notice that you any change to the particle will not take effect after adding the particle_set to the project
Definition at line 217 of file kernel-throughput.py.
| kernel-throughput.peano4_project = project.generate_Peano4_project(verbose=args.verbose) |
Generate plain Peano 4 project.
The value of some constants such as the adiabatic index cannot be arbitrary but rather we have a set of pre-defined options. The same happens for some functions, e.g. the SPH smoothing kernel. This allows us to define some symbols and fix the values at compile time.
Definition at line 268 of file kernel-throughput.py.
| kernel-throughput.periodic_BC |
Definition at line 249 of file kernel-throughput.py.
| list kernel-throughput.periodic_boundary_conditions = [False, False, False] |
Definition at line 239 of file kernel-throughput.py.
| kernel-throughput.plotter_precision |
Definition at line 250 of file kernel-throughput.py.
| kernel-throughput.project |
Definition at line 152 of file kernel-throughput.py.
| list kernel-throughput.project_namespace = ["benchmarks", "exaparty", "hydro", "kernel_throughput"] |
Create ExaParty project and particle species.
Definition at line 150 of file kernel-throughput.py.
| kernel-throughput.required |
Definition at line 42 of file kernel-throughput.py.
| kernel-throughput.throw_away_data_after_generation |
Definition at line 336 of file kernel-throughput.py.
| kernel-throughput.time_in_between_plots |
Definition at line 248 of file kernel-throughput.py.
| kernel-throughput.True |
Definition at line 338 of file kernel-throughput.py.
| kernel-throughput.type |
Definition at line 26 of file kernel-throughput.py.