n-Body Gravity Simulator 
========================

In the "nbody.c" file, you will find a sequential implementation of a
program written in C that simulate the n-body problem.

See https://www.cs.ru.nl/~pkal/teach/pc26/assignments/nbody/ for more
information.

Our template assumes you have access to a Linux or at least Unixoid
work environment.  If you don't own such a device yourself, you can
use your Science account to use a system administered by C&CZ:

  https://cncz.science.ru.nl/en/howto/hardware-servers/

Usage (of the synchronous version)
-----

You can compile the executable using "make".  By defalt this should
generate a "nbody2d" and "nbody3d" executable.

You specify the main parameters of the simulation (the bodies, their
position, velocity and mass) by command line arguments.  These are
parsed The simulation can be configured by specifying flags.  For
instance,

  $ ./nbody -v -- '0.5,0' '-0.5,0' '0,0.8660254'

will start a simulation with three bodies


In the examples/ directory, you can find a collection of shell scripts
that include pre-configured simulations you can test.  Start each by
supplying the command to execute your simulation as arguments (note
that the example scripts assume your program still understands the
command line arguments implemented in the sequential version):

  $ ./examples/solar.sh ./nbody -v

The scripts use Gnuplot[0] and FFmpeg[1] to visualize the data, so
make sure to install these programs if you use the example scripts.

[0] http://gnuplot.info/
[1] https://ffmpeg.org/

Assignment (reminder)
----------

Copy and adjust mb.c for each variation you work on:

- OpenMP
- MPI
- OpenCL [optional]

Make sure to add the build instructions to the Makefile, and document
the contributions of each team member.  It is not important that your
program behaves just like the synchronous version, you can make (and
document) any changes you deem helpful.  See

  https://www.cs.ru.nl/~pkal/teach/pc26/benchmarking.html

for details on what our expectations are from the benchmarks.