Particle-in-cell (PIC) codes are a cornerstone of plasma-based accelerator research. We present a generalized parallelization algorithm for PIC simulations that achieves high efficiency across modern high-performance computing (HPC) architectures, including CPUs (x86 and Arm) and graphics processing units (GPUs) (NVIDIA, AMD). The algorithm employs a micro-spatial domain decomposition combined with a high-performance particle manager for efficient particle migration between domains. Each domain is mapped to a CPU thread or GPU thread block, ensuring balanced parallel workloads even in realistic scenarios. Implementations use architecture-specific programming models—OpenMP for CPUs and CUDA/HIP for GPUs—while maintaining a common algorithmic structure, making porting straightforward. Benchmark results for a representative 2D problem demonstrate excellent performance on both single devices and large-scale HPC systems. The algorithm is also show to be extendable for other PIC variants and architectures.
粒子インセル(PIC)コードは、プラズマベース加速器研究の基盤である。我々は、CPU(x86およびArm)やグラフィックス処理ユニット(GPU)(NVIDIA、AMD)を含む現代の高性能計算(HPC)アーキテクチャ全体で高い効率を達成する、PICシミュレーションのための一般化された並列化アルゴリズムを提示する。このアルゴリズムは、マイクロ空間領域分割と、領域間の効率的な粒子移動のための高性能粒子マネージャを組み合わせる。各領域はCPUスレッドまたはGPUスレッドブロックにマッピングされ、現実的なシナリオでもバランスの取れた並列ワークロードを保証する。実装は、アーキテクチャ固有のプログラミングモデル(CPUにはOpenMP、GPUにはCUDA/HIP)を使用する一方で、共通のアルゴリズム構造を維持しており、移植を容易にしている。代表的な2次元問題に対するベンチマーク結果は、単一デバイスと大規模HPCシステムの両方で優れた性能を示している。このアルゴリズムは、他のPIC変種やアーキテクチャにも拡張可能であることも示されている。