n-Body Problem

The n-Body Problem is related to simulating a cluster of objects interacting through Newtonian forces. As part of a third year university assignment, I was tasked with simulating and optimising such an interaction.

High Performance Computing

Due to the high power needed to perform an accurate simulation, the project compares multiple scaling methods:

  • Single Core
  • Multi Core (CPU)
  • Many Core (GPGPU)

Single core acted as our baseline, and for multi-core we were able to see near linear speed up. After re-engineering the code to work on CUDA, we were able to see considerable speed up once again over thousands of CUDA cores. This method does however induce memory transfer bottlenecks, but overall a huge improvement.

The results can be viewed in the report, discussing the large scale up on the many core architecture.


Viewing the .vtk outputs in Paraview was used to validate correctness of the simulations.