Skip to content

papstchaka/hpc_barnsleyfern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hpc_barnsleyfarn

This repositoriy is directly related to Lehrstuhl für Datenverarbeitung course High Performance Computing for machine intelligence at TU Munich. Goal of the course was to use parallelism in combination with C++ to speed-up different kinds of algorithms. First, algorithms were implemented using multiple threads on one single machine, later on - using OpenMP and OpenMPI - on mulitple machines."




Goal

Parallel implementation of Barnsley Farn Algorithm in C++. Repository follows up the producer-consumer-model and is aware of upcoming race conditions (= threadsafe) by using mutexes. The implementation of the consumer-producer model is held modular, so it is very simple to change the desired algorithm without loosing a framework that works parallel and therefore very performant and efficient.




Usage

All requiered functionality to compile, send or clean the project is provided by given Makefile:

  • make compile - deletes old executables, tar-archives and build/ folder, builds a new executable (of new version) and moves this executable directly to root folder. That can afterwards be started by ./barnsley_fern
  • make clean - cleans project folder by removing old executables, tar-archives and build/ folder
  • make send - packs src/ folder and Makefile into tar archive and sends it via scp to desired target
  • make unpack - provides the possibility to untar the tar archive and rebuild the given folder structure at new place
  • ./barnsley_fern - starts the compiled script that produces the output image

More detailed information on algorithms' implementation and task of the respective scripts is given in src




Result

Algorithm produces a BarnsleyFern with high resolution (10k x 20k pixels), stored in a file named barnsley_fern.png. Standart working time for 2 consumers and 2 producers (with each 10^8 points) is ~6mins. Desired resolution can be changed in RealConsumer.h



resulting barnsley fern




Requirements

Recommended environment for compiling are Windows Subsystem for Linux or any other linux-based operating system!

Install cmake, gcc, clang, gdb and build-essential by running

sudo apt-get update
sudo apt-get install cmake gcc clang gdb built-essential

Install libraries to work with pngs by running

sudo apt-get install imagemagick libpng-dev zlib1g-dev




Supporting developers:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages