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 for the tracking elements 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 particularly Pelegant run. We divide the beamline elements to 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.
  4. Diagnostic: could run on master or slaves, 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.


next up previous
Next: Achieving high performance Up: Using Pelegant efficiently Previous: Using Pelegant efficiently
Robert Soliday 2011-02-01