  Gyrokinetic codes in plasma physics need outstanding computational resources
to solve increasingly complex problems, requiring the effective exploitation of
cutting-edge HPC architectures. This paper focuses on the enabling of ORB5, a
state-of-the-art, first-principles-based gyrokinetic code, on modern parallel
hybrid multi-core, multi-GPU systems. ORB5 is a Lagrangian, Particle-In-Cell
(PIC), finite element, global, electromagnetic code, originally implementing
distributed parallelism through MPI-based on domain decomposition and domain
cloning. In order to support multi/many cores devices, the code has been
completely refactored. Data structures have been re-designed to ensure
efficient memory access, enhancing data locality. Multi-threading has been
introduced through OpenMP on the CPU and adopting OpenACC to support GPU
acceleration. MPI can still be used in combination with the two approaches. The
performance results obtained using the full production ORB5 code on the Summit
system at ORNL, on Piz Daint at CSCS and on the Marconi system at CINECA are
presented, showing the effectiveness and performance portability of the adopted
solutions: the same source code version was used to produce all results on all
architectures.
