Skip to content
README.md 904 B
Newer Older
Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
# Nbody

## Description

Nbody simulation is a simulation of a dynamical system of particles, usually under the influence of physical forces, such as gravity.

## Versions

Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
We have several implementations of this benchmark:

Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
* **01.nbody_cuda:** Parallel version using CUDA tasks
Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
* **02.nbody_hybrid:** parallel version using a combination of CUDA and SMP tasks in alternating iterations
Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed

## Execution instructions

Before executing the program, it is necessary to configure Nanos6 to use the GPU-enabled hierarchical scheduler, thus it is necessary to set the environment variable *NANOS6_SCHEDULER* to *hierarchical*

Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
To run the program use:
```
Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
NANOS6_SCHEDULER=hierarchical ./nbody [input-file]
Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
```

Aimar Rodriguez Soto's avatar
Aimar Rodriguez Soto committed
Input files can be found in the *data/input* folder. 
The programs creates a *nbody_out.xyz* file which can be compared with the reference file in the *data/output* folder to check for correctness.