
From June 24 to July 03, our research group participated in the CINECA Open Hackathon with the team BSCBIT, composed of Xavier Sáez, Eduardo Cabrera and Alejandro Soba.
The CINECA Open Hackathon was a virtual multi-day event co-organized by NVIDIA and the OpenACC organization. Launched in 2014, these hackathons are designed to help scientists and developers accelerate and optimise computational codes on GPUs with the support of expert mentors.
The goal of our team, BSCBIT, was to port BIT1 to GPU using OpenACC. BIT1 is a code developed by Dr. David Tskhakaya at the Institute of Plasma Physics of the CAS, Prague, Czech Republic, for simulating the behavior of plasma particles near the edge of fusion devices, particularly along magnetic field lines near a divertor. In particular, BIT1 is an electrostatic Particle-in-Cell (PIC) code optimized for plasma edge modelling and incorporates nonlinear plasma, neutral and impurity interactions via Direct Simulation Monte Carlo (DSMC) collision operators.
BIT1 is written in C and has been parallelized with MPI using domain decomposition. The code is computationally demanding, and GPU acceleration can offer the computational potential for achieving longer simulations needed to resolve fusion-relevant scenarios.

Over four days of intensive development (from 1 to 4 July), with the support of the expert mentors assigned to our team, Filippo Spiga (NVIDIA), Giacomo Baldan (Politecnico di Milano) and Michael Herrera Sanchez (BNP Paribas CIB), we achieved the following milestones:
- Profiling: We applied NVIDIA Tools Extension SDK (NVTX) and NVIDIA Nsight Systems to identify bottlenecks. We discovered that data movement between CPU and GPU was a major performance limiter, so we decided to minimize data movement between CPU and GPU by maximizing the time data remains on the GPU.
- GPU Porting: We successfully accelerated several routines in an iterative process with OpenACC. We also began exploring a new algorithmic design for a non-parallelizable routine.
After completing our participation in the Hackathon, our next steps are to validate the implemented code in the event, finalize the porting of selected candidate routines and share results with the code developer.
We would like to thank the organizers and our mentors for their work in the Hackathon, as this event provided us with the opportunity to learn from GPU experts with experience in porting real scientific codes to GPUs. For this reason, events like this are highly useful for porting complex codes not originally designed with acceleration in mind to modern hardware platforms.