N-Body program, a parallel version

  • Background material

    See gravityMPI.cpp from BSP N-body Particle System, MPI Parallel Processing. This is an MPI parallel version of the N-body simulation.

  • C versions: gravityMPIShell.c (C version of their original gravityMPI.c, 1000 particles); gravityMPIShell6Particles.c (6 particles to start with)

    An array of particle objects is used with:

    1. x,y position
    2. mass
    3. velocity components in the x and in the y directions

    Assignment

    1. Explain in written form how this parallel algorithm in gravityMPI.cpp is working. For example, use 6 particles and 4 processors and trace through a particular scenario. For help, here's an example 6 particle version - gravityMPIShell6Particles.c

    2. Run this MPI program on the Cray SV1 and record the data of the movements of a number of particles. Graph with Gnuplot or Openoffice Excel the results of a number of time steps the x,y movements of your test particles. Compare these movements based on non-parallel vs parallel versions of the program.

    3. (Unfinished - I'll have more experiments later for you to try)