|
Prolog: Why bother?
- As an architect why should you be concerned with parallel programming?
- Understanding program behavior is very important in developing high-performance computers
- An architect designs machines that will be used by the software programmers: so need to understand the needs of a program
- Helps in making design trade-offs and cost/performance analysis i.e. what hardware feature is worth supporting and what is not
- Normally an architect needs to have a fairly good knowledge in compilers and operating systems
Agenda
- Parallel application case studies
- Steps in writing a parallel program
- Example
Ocean current simulation
- Regular structure, scientific computing, important for weather forecast
- Want to simulate the eddy current along the walls of ocean basin over a period of time
- Discretize the 3-D basin into 2-D horizontal grids
- Discretize each 2-D grid into points
- One time step involves solving the equation of motion for each grid point
- Enough concurrency within and across grids
- After each time step synchronize the processors
Galaxy simulation
- Simulate the interaction of many stars evolving over time
- Want to compute force between every pair of stars for each time step
- Essentially O(n2) computations (massive parallelism)
- Hierarchical methods take advantage of square law
- If a group of stars is far enough it is possible to approximate the group entirely by a single star at the center of mass
- Essentially four subparts in each step: divide the galaxy into zones until further division does not improve accuracy, compute center of mass for each zone, compute force, update star position based on force
- Lot of concurrency across stars
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|