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."
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.
All requiered functionality to compile
, send
or clean
the project is provided by given Makefile
:
make compile
- deletes old executables,tar
-archives andbuild/
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 andbuild/
foldermake send
- packssrc/
folder andMakefile
intotar
archive and sends it viascp
to desired targetmake unpack
- provides the possibility to untar thetar
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
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
Recommended environment for compiling are Windows Subsystem for Linux
or any other linux-based
operating system!
Install
cmake
,gcc
,clang
,gdb
andbuild-essential
by running
sudo apt-get update
sudo apt-get install cmake gcc clang gdb built-essential
Install libraries to work with
png
s by running
sudo apt-get install imagemagick libpng-dev zlib1g-dev
Alexander Christoph
[implementation]Martin Gottwald
[concept / instructor]Alice Hein
[concept / instructor]