Parallel Galaxy Evolution Simulator
A galaxy evolution simulator is a tool that helps simulate the generation of beautiful spiral patterns as a result of rotation, collision and fusion between different galaxies. In the project, we implemented a galaxy evolution simulator using two algorithms: Barnes-Hut algorithm and Morton-Code algorithm. Also, we paralleled these sequential algorithms using CUDA and evaluated the performance on NVIDIA Tesla K40 GPU.
Video 1. A short video that shows the galaxy evolution simulation [click the graph]
Figure 1. depicts the spiral pattern of galaxy evolution using Barnus-Hut method and also the bounds of quad-tree in that iteration during the simulation period
Figure 2. depicts the spiral pattern of galaxy evolution using MortonCode method and also the bounds of the morton tree during the iteration period. This picture also shows the different bound pattern since the way to build the tree is different compared with the previous Barnus-Hut’s Quad-Tree.
Figure 3. Running time (ms/iteration) as the increase of number of galaxy
Figure 4. Speedup of CUDA version compared to the corresponding sequential version as the increase of number of galaxy
Figure 3 & 4 show that as the increase of galaxy’s number, the running time of sequential version increases due to more particles (objects) for computation. However, the running time of CUDA version doesn’t increase too much. Also, it’s clear that the speedup still increases as the increase of galaxy in Figure 4. The reason we identified is that the the program still doesn’t achieve the peak computing capacity with Tesla K40.