next up previous contents
Next: Mesh Partitioning Up: METHODOLOGY Previous: Stress-based Selection Approach   Contents

Parallel Implementation using Charm++

Problems requiring a large number of computations or those having long simulation times may benefit from some form of parallelization. Since the CVFE scheme is based on an explicit central difference method, it lends itself well to code parallelization. Distributing a problem across many processors allows us to decrease the solution time or increase the problem size.

Two well known parallelization techniques are OpenMP and MPI. OpenMP is a collection of compiler directives and library routines which take advantage of shared memory parallelism of codes (Padua, 2000). OpenMP allows us to take a serial code and apply parallelism to the individual loops within it. This is a good method for simple loops but is not viable for more complex loops typical of the CVFE method or where race conditions may exist. A race condition occurs when multiple processors attempt to write to the same memory location causing future read attempts to potentially access incorrect data.

MPI or Message Passing Interface is a more robust method by which slave processors communicate data with the master processor. Each processor gets a single chunk of memory on which it performs all necessary calculations. The downside of MPI is that the serial code must be completely rewritten so that it fits the MPI format.

A better parallelization method is Charm++ which is based on the MPI method. The advantage of this method is that the communication occurs deeper in the background. Using the Charm++ finite element framework we are able to write a parallel version of our code that closely resembles the serial version, but still takes advantage of the various other Charm++ features such as: runtime load balancing, monitoring of performance, etc. (Lawlor, 2000).



Subsections
next up previous contents
Next: Mesh Partitioning Up: METHODOLOGY Previous: Stress-based Selection Approach   Contents
Mariusz Zaczek 2002-10-13