(mini)miniPIC is a playground for computer science and HPC experiments applied to the Particle-In-Cell method. The project is based on the miniPIC pedagogical solver.
Warning
(mini)miniPIC is not a code intended to be used for numerical simulation of physical cases.
You have in this repo a realistic PIC solver which is at the beginning of being ported to Kokkos. The goal of the hakathon is to finish this port, and to optimize it for GPU architectures.
Kokkos data containers, program structures, and command line management are already implemented in src/common files, you should not have to modify them.
Cases, also known as setups, are hard-coded in src/setups and selected at compile time, you should not have to modify them either (at least for porting).
Your work will essentially take place in the src/exercise directory, in two files of different granularity.
The operators file is where most operators remain to be ported to Kokkos, whereas the managers file calls the aforementioned operators for one iteration, or for the initialization.
If you want to skip the porting part, you can directly start from the src/kokkos code.
Some pointers if needed
- Start by reading the doc!
- You should first finish to port the operators in
src/exercise; - You should port one operator at a time, and running
mini-runto check if the program is still valid; - You may have to take care of data location in the process;
- You should commit often;
- When it's done, you should focus on optimization;
- You should use Kokkos-tools to create regions and breakdown the time spent in the solver;
- Nsight Systems may be useful to visualize the regions;
- Nsight Compute may be useful to analyze a specific kernel;
- You should identify a bottleneck, try optimization strategies, and measure the gain, rinse and repeat (APOD method: Assess, Parallelize, Optimize, and Deploy).
doc: documentation pages;src: C++ sources:setups: headers used to initialize the physical parameters;common: source files common to the project;- implementation specific folder (
kokkos,exercise, you may create yours):Operators.cpp: Operator functions;Managers.cpp: Functions that call operators for one iteration or for domain initialization;
libminipic: Python libraries for (mini)miniPIC Python tools and validation scripts:script: Python scripts to read and plot diags (requireslibminipic);slurm: Slurm scripts for various supercomputers;external: Git submodules location.
- Code structure
- Compilation
- Python tools for validation
- Plot diags
- Setups and how to create them
- MiniPIC short presentation
- SILVA-CUEVAS, J. J., ZYCH, M., PEYEN, K., et al. Towards a complete task-based implementation of a 3D Particle-In-Cell code: performance studies and benchmarks. Computer Physics Communications, 2025, p. 109647. https://doi.org/10.1016/j.cpc.2025.109647

XKCD