GP-GPU project 3A MMIS: Arthir Vivière, Abdelmouttaleb Dakri, Ilyes Moudden
This project aims at studying different aspects of real-time viusalisations of N-body simulations. We try and implement a sequential all-pair algorihtm to set up a proper physical simulation and visualization. We then explore different optimisation methids in order to boost the performance of our rendered scene (mainly the Barnes-Hut approximation and GPU parallelization).
This project is entirely coded in C/C++/CUDA and contains to different builds that can be run independantly. The following librairies are only necessary for the use case:
-
CUDA : Needed for the GPU parallel computing part, not needed if one only wants to test the sequential code.
-
OpenGL & Freeglut : For the graphics part, needed to render the simulation.
-
Cmake : For the packaging, build and compilation .
Of course running the parallel code needs an NVIDIA GPU, in our case an NVIDIA GTX 1060TI. And of course one needs to install the necessary librairies.
We leave it to the reader (for now) to download the necessary libraires through the package manager (OpneGL, Freeglut and CUDA's nvcc). Freeglut is already provided in the OpenGL_libs folder. Of course gcc/g++ compilers are needed as well as CMake.
For the sequential part:
cmake -DPARALLEL=OFF -S ../ -B .
The executable in this case is named nbody and can be executed once compiled.
For the parallel part, the executable is name nbody_cuda and can be built like this:
cmake -DPARALLEL=ON -S ../ -B .
We obtain some results through our simulations, a more in depth discussion was led through our project report. We otherwise this show this demo for the actual physical simulation (one we used to check the validity od our simulations):