Scripted HTML version of Foils prepared 12 November 1996

Foil 5 Some Inefficiencies of the N2 Algorithm - I

From CPS615-End of N-Body Discussion and Beginning of Numerical Integration Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 15 October 96. by Geoffrey C. Fox *
Secs 54.7
Symmetry of force on particles: Fij = -Fji (Newton's Law of Action and Reaction!)
  • only half need to be computed so should use triangular arrays
  • i.e. just do loops with sum over particles i, sum over particles j <= i and then calculate algebraic form of Fij and then accumulate
  • Force on i increments by Fij
  • Force on j decrements by Fij
There is a Load balancing problem with triangular arrays
Assuming for example that processors assigned with block distribution in column direction.
  • To calculate the force between 2 particles
  • will take N/Nproc iterations in the
  • longest running processor
  • i.e. you don't get factor of two back!



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Fri Aug 15 1997