We present the graphics processing unit (GPU) porting of a Monte Carlo particle-following code, called ASCOT5. The code solves the distribution function of minority species in fusion plasmas. Originally developed with an MPI-OpenMP hybrid parallelism taking full advantage of single instruction, multiple data operations, the code has been ported to GPU architecture using the OpenACC programming model. Subsequently, modifications were made to implement three distinct algorithmic strategies: history-based, event-based, and event-based-packing. In the first implementation, each GPU processing unit deals with the entire history of one or more particles, while the event-based algorithm operates on the principle of executing a single low-level event type at a time for all particles still alive (with or without packing particles). Performance results on NVIDIA GPUs are presented to showcase the effectiveness and efficiency of the code adaptations for GPU execution. These results provide insights into the comparative performance of the implemented approaches on the specified hardware architecture. Portability across other architectures such as INTEL and AMD GPUs with OpenMP Offload is also presented.
我々は、ASCOT5と呼ばれるモンテカルロ粒子追跡コードのグラフィックス処理ユニット(GPU)への移植を紹介する。このコードは、核融合プラズマ中の少数種の分布関数を解く。元々は、単一命令・複数データ操作を完全に活用するMPI-OpenMPハイブリッド並列処理で開発されたが、このコードはOpenACCプログラミングモデルを用いてGPUアーキテクチャに移植された。その後、履歴ベース、イベントベース、およびイベントベース・パッキングという3つの異なるアルゴリズム戦略を実装するための修正が行われた。最初の実装では、各GPU処理ユニットが1つ以上の粒子の全履歴を処理する。一方、イベントベースのアルゴリズムは、生存している全粒子に対して、一度に単一の低レベルイベントタイプを実行するという原理に基づいて動作する(粒子のパッキングの有無にかかわらず)。NVIDIA GPU上での性能結果は、GPU実行のためのコード適応の有効性と効率を示すために提示される。これらの結果は、指定されたハードウェアアーキテクチャ上での実装されたアプローチの比較性能に関する洞察を提供する。OpenMP Offloadを用いたINTELおよびAMD GPUなどの他のアーキテクチャへの移植性も提示される。