skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: An efficient and portable SIMD algorithm for charge/current deposition in Particle-In-Cell codes

Journal Article · · Computer Physics Communications
 [1];  [2];  [2];  [3];  [2]
  1. Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States); Alternative Energies and Atomic Energy Commission (CEA), Gif-Sur-Yvette (France). Lasers Interactions and Dynamics Laboratory (LIDyL)
  2. Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States)
  3. Intel Corporation, OR (United States)

In current computer architectures, data movement (from die to network) is by far the most energy consuming part of an algorithm (≈20pJ/word on-die to ≈10,000 pJ/word on the network). To increase memory locality at the hardware level and reduce energy consumption related to data movement, future exascale computers tend to use many-core processors on each compute nodes that will have a reduced clock speed to allow for efficient cooling. To compensate for frequency decrease, machine vendors are making use of long SIMD instruction registers that are able to process multiple data with one arithmetic operator in one clock cycle. SIMD register length is expected to double every four years. As a consequence, Particle-In-Cell (PIC) codes will have to achieve good vectorization to fully take advantage of these upcoming architectures. In this paper, we present a new algorithm that allows for efficient and portable SIMD vectorization of current/charge deposition routines that are, along with the field gathering routines, among the most time consuming parts of the PIC algorithm. Our new algorithm uses a particular data structure that takes into account memory alignment constraints and avoids gather/scat;ter instructions that can significantly affect vectorization performances on current CPUs. The new algorithm was successfully implemented in the 3D skeleton PIC code PICSAR and tested on Haswell Xeon processors (AVX2-256 bits wide data registers). Results show a factor of ×2 to ×2.5 speed-up in double precision for particle shape factor of orders 1–3. The new algorithm can be applied as is on future KNL (Knights Landing) architectures that will include AVX-512 instruction sets with 512 bits register lengths (8 doubles/16 singles). Program summary Program Title: vec_deposition Program Files doi:http://dx.doi.org/10.17632/nh77fv9k8c.1 Licensing provisions: BSD 3-Clause Programming language: Fortran 90 External routines/libraries:  OpenMP > 4.0 Nature of problem: Exascale architectures will have many-core processors per node with long vector data registers capable of performing one single instruction on multiple data during one clock cycle. Data register lengths are expected to double every four years and this pushes for new portable solutions for efficiently vectorizing Particle-In-Cell codes on these future many-core architectures. One of the main hotspot routines of the PIC algorithm is the current/charge deposition for which there is no efficient and portable vector algorithm. Solution method: Here we provide an efficient and portable vector algorithm of current/charge deposition routines that uses a new data structure, which significantly reduces gather/scatter operations. Vectorization is controlled using OpenMP 4.0 compiler directives for vectorization which ensures portability across different architectures. Restrictions: Here we do not provide the full PIC algorithm with an executable but only vector routines for current/charge deposition. These scalar/vector routines can be used as library routines in your 3D Particle-In-Cell code. However, to get the best performances out of vector routines you have to satisfy the two following requirements: (1) Your code should implement particle tiling (as explained in the manuscript) to allow for maximized cache reuse and reduce memory accesses that can hinder vector performances. The routines can be used directly on each particle tile. (2) You should compile your code with a Fortran 90 compiler (e.g Intel, gnu or cray) and provide proper alignment flags and compiler alignment directives (more details in README file).

Research Organization:
Lawrence Berkeley National Laboratory (LBNL), Berkeley, CA (United States)
Sponsoring Organization:
USDOE Office of Science (SC), High Energy Physics (HEP)
Grant/Contract Number:
AC02-05CH11231; 624543
OSTI ID:
1393602
Alternate ID(s):
OSTI ID: 1396479
Journal Information:
Computer Physics Communications, Vol. 210, Issue C; ISSN 0010-4655
Publisher:
ElsevierCopyright Statement
Country of Publication:
United States
Language:
English
Citation Metrics:
Cited by: 23 works
Citation information provided by
Web of Science

References (7)

Vector calculation of particle code journal December 1985
Vectorizing the interpolation routines of particle-in-cell codes journal January 1987
Particle code optimization on vector computers journal December 1989
A vector-efficient and memory-saving interpolation algorithm for PIC codes on a cray X-MP journal August 1990
Exact charge conservation scheme for Particle-in-Cell simulation with an arbitrary form-factor journal April 2001
Particle-in-Cell algorithms for emerging computer architectures journal March 2014
Hybrid Ordered Particle Simulation (HOPS) code for plasma modelling on vector-serial, vector-parallel, and massively parallel computers journal May 1995

Cited By (7)

Identification of Coupling Mechanisms between Ultraintense Laser Light and Dense Plasmas journal March 2019
Few-cycle laser wakefield acceleration on solid targets with controlled plasma scale length journal March 2019
A Space and Bandwidth Efficient Multicore Algorithm for the Particle-in-Cell Method book January 2018
Identification of coupling mechanisms between ultraintense laser light and dense plasmas text January 2018
Porting WarpX to GPU-accelerated platforms journal December 2021
Interaction of Ultraintense Radially-Polarized Laser Pulses with Plasma Mirrors journal December 2020
Efficient Data Structures for a Hybrid Parallel and Vectorized Particle-in-Cell Code conference May 2017