Git repository for the High-Performance Computing project, NBody simulation with MPI.
Diffusion PHPCNBody (master)
Recent Commits
Recent Commits
Commit | Author | Details | Committed | ||||
---|---|---|---|---|---|---|---|
392fefcf0a37 | lefebvre | Modified README extension | Jun 4 2017 | ||||
a8018ae01f72 | lefebvre | - Visibility on the code - Moved batch scripts into a folder - Added a README… | Jun 4 2017 | ||||
4de25281a801 | lefebvre | -Modify batch script for weak scaling | Jun 4 2017 | ||||
a0e15371f57d | lefebvre | -Modify batch script for weak scaling | Jun 4 2017 | ||||
b4dfe078bb1a | lefebvre | -Modify batch script to get time on 1 proc for multiple cases | Jun 4 2017 | ||||
984efdb46e59 | lefebvre | -Modify batch script to add 32k particles for Strong Scaling | Jun 3 2017 | ||||
9afe72168ddb | lefebvre | -Modify batch script to add 32k particles for Strong Scaling | Jun 3 2017 | ||||
79847ab50e22 | lefebvre | -Modify batch script -Update code for visibility | Jun 3 2017 | ||||
61e9fe3c420b | lefebvre | -Modify batch script | Jun 3 2017 | ||||
21208eff60c7 | lefebvre | -Modify batch script | May 22 2017 | ||||
7040b21fd814 | lefebvre | -Modify batch script | May 22 2017 | ||||
eac4085773cc | lefebvre | -Modify batch script | May 22 2017 | ||||
ca6d27d36356 | lefebvre | -Modify batch script | May 22 2017 | ||||
dee681021ca9 | lefebvre | -Modify batch script | May 22 2017 | ||||
273ae4d4822f | lefebvre | -Modify batch script | May 22 2017 |
README.md
README.md
Parallel implementation of the N-Body problem applied to the gravity force. The algorithm used is Barnes-Hut and the forces computations are parallelized using the MPI library.
To compile the program :
- Run the CMakeList with cmake .
- Run the makefile with make
To run the program the following arguments are necessary :
- Number of bodies
- Number of cluster of bodies
- Time step
- Final time
- Threshold for force computation
- Number of time step between each output
These arguments must be given in the order given above, example :
mpirun -np 2 ./NBodyMPI 40 1 0.01 50 3 1
The output is found in the file Output.dat in the following format for 3 time steps :
Body1_position_x Body1_position_y Body2_position_x Body2_position_y Body1_position_x Body1_position_y Body2_position_x Body2_position_y Body1_position_x Body1_position_y Body2_position_x Body2_position_y
The MATLAB file DrawBodies.m can be run to plot the output.
c4science · Help