Skip to content

a serial and MPI implementation of the Barnes-Hut simulation

Notifications You must be signed in to change notification settings

Jrokisky/MPI-Barnes-hut

Repository files navigation

Barnes-Hut Simulation using MPI

More information about the Barnes-Hut Simulation can be found here.

This implementation contains a serial and MPI version of the simulation and produces a gif of the simulated particle movement.

Setup

The gifmerge executable needs to be compiled first. This can be done by running:

gcc gifmerge.c gifmerge.h -o gifmerge

Running

The following scripts will generate a gif of the simulation in the anim.gif file

To run the serial version:

./run_serial_barnes_hut.sh $NUMBER_OF_PARTICLES $NUMBER_OF_SIMULATION_STEPS

To run the MPI version:

./run_mpi_barnes_hut.sh $NUMBER_OF_MPI_PROCESSES $NUMBER_OF_PARTICLES $NUMBER_OF_SIMULATION_STEPS

About

a serial and MPI implementation of the Barnes-Hut simulation

Resources

Stars

Watchers

Forks