Finite element approach to global gyrokinetic particle-in-cell simulations using magnetic coordinates. We present a fully-global linear gyrokinetic simulation code (GYGLES) aimed at describing the unstable spectrum of the ion-temperature-gradient modes in toroidal geometry. We formulate the particle-in-cell method with finite elements defined in magnetic coordinates, which provides numerical convergence. The poloidal mode structure corresponding to k ∥ =0 is extracted without approximation from the equations, which reduces drastically the numerical resolution needed. The code can simulate routinely modes with both very long and very short toroidal wavelengths, can treat realistic MHD equilibria of any size, and runs on a massively parallel computer.