Skip to content

O(N²) algorithm. Accelerated with OpenACC directives targeting NVIDIA GPGPUS.

Notifications You must be signed in to change notification settings

alexshi0000/OpenACC_NBody_Galaxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenACC NBody Galaxy

brute force algorithm suitable for simulating and visualizing spiral galaxy evolution. accelerated with OpenACC directives targeting NVIDIA GP GPUs. originally started this project as a barneshut simulation: https://github.com/alexshi0000/Astrocom

Demo

  • particles: 112,640
  • realization time: ~ 29 minutes

Alt Text

  • particles: 33,693
  • realization time: ~ 9 minutes

Alt Text

Getting Started

clone this repository on to your machine

git clone https://github.com/alexshi0000/OpenACC-PGI-NBODY

Prerequisites

NVIDIA gpu. recommended: NVIDIA Tesla k20 or higher. update drivers

sudo apt-get purge nvidia* 
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-370 (or better)

shutdown and check for new driver using smi. install glut

nvidia-smi
sudo apt-get install freeglut3 freeglut3-dev

install PGI compiler

https://developer.nvidia.com/openacc-toolkit

how to install CUDA (version 6 and up)

http://developer.download.nvidia.com/compute/cuda/7.5/Prod/docs/sidebar/CUDA_Installation_Guide_Linux.pdf

Installation

using make

sudo apt install make
./../src/make pgi

or

sudo chmod +x ./../src/pgi_make.sh
./../src/pgi_make.sh

Run

on linux

./../bin/main

on windows

./../bin/main.exe

About

O(N²) algorithm. Accelerated with OpenACC directives targeting NVIDIA GPGPUS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published