next up previous
Next: Achieving high performance Up: Using Pelegant efficiently Previous: Using Pelegant efficiently

Parallelization overview

To help users run simulations with Pelegant more efficiently, we would like to introduce our parallelization approach briefly. We parallelize elegant using a master/slaves (manager/workers) model. The time-intensive tracking parts of elegant are being parallelized gradually. The other parts are done (redundantly) by all the processors, which is acceptable since those processors have already been allocated to a particular Pelegant run. We divide the beamline elements into four classes:

  1. Parallel element: only the slave processors will do the tracking. Each slave is responsible for a portion of particles.

  2. MP (multiprocessor) algorithm: the master will participate in the tracking, but it only gets the result of collective computations (e.g., sum, average) from the slaves, without doing any computations itself.

  3. Uniprocessor element: must be done by master (for now) and modifies particle coordinates. An example would be wakefield elements.

  4. Diagnostic: same as the uniprocessor element, but doesn't change particle coordinates.

A flag was added to elegant's dictionary for each beamline element to identify its classification. The master is responsible for gathering and scattering particles as needed according to this classification. Communications are minimized to achieve the best efficiency of parallelization. For example, it is not necessary to communicate the coordinates of particles between master and slaves when tracking through two continuous parallel elements. Similarly, we only need to gather particle coordinates from slaves to master (without subsequent scattering) when the particles go through a diagnostic element, such as a WATCH point with coordinate output.


next up previous
Next: Achieving high performance Up: Using Pelegant efficiently Previous: Using Pelegant efficiently
Yusong Wang 2007-04-03