Skip to content

carloselcastro/mandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mandelbrot Set

This repository contains some of programs-exercises of class MAC5742 - Introduction to Concurrent, Parallel and Distributed Programming (2020) - Institute of Mathematics and Statistics, São Paulo University (IME-USP).

Members

Carlos Eduardo Leal de Castro - o/

Felipe de Lima Peressim

José Luiz Maciel Pimenta

Luis Ricardo Manrique

Rafael Fernandes Alencar

Goal

The main goal of this work was to generate the Mandelbrot Set using different approaches: Sequential, Pthreads, OpenMP, OpenMPI and Cuda.

The Mandelbrot Set is the set of all complex points such that the sequence , given by where remains bounded.That is, for any that remains on this set, there exists a

Mandelbrot full set

Performance tests

We performed some performance tests to compare all the methods used here: sequential, pthreads, openmp, openmpi, cuda, openmpi+openmp and openmpi+cuda. In these experiments, we measure the average time of 15 executions on each method, varying 3 different parameters:

  • Dimensions (x,y) of grid and blocks (CUDA);
  • Number of Threads (Pthreads and OMP);
  • Number of processes (OMPI).
Algorithm Executions
Sequential ---
OpenMP 2^0 to 2^10 threads
Pthreads 2^0 to 2^10 threads
CUDA 2^2 a 2^6 clock size
CUDA+OpenMPI (one node) Block size n = (2,4,...,32), for each n, 2^2 to 2^6 clock size
CUDA+OpenMPI (two nodes) Block size n = (2,4,...,64) in two nodes, each one with n/2 processes, for each n, 2^2 to 2^6 block size
OpenMPI (two nodes) Block size n = (2,4,...,32)
OpenMPI (two nodes) Block size n = (2,4,...,64) in two nodes, with n/2 processes each
OpenMPI+OpenMP (one node) Block size n = (2,4,...,32), for each n, 2^2 to 2^6 threads
OpenMPI+OpenMP (two nodes) Block size n = (2,4,...,64) in two nodes, with n/2 processes each and, for each n we have 2^2 to 2^6 threads

Some results

Best Peformance

Best Peformance

Worst Peformance

Worst Performance

Peformance by varyng the number of threads

Peformance by varyng the number of threads

Peformance by varyng the number of processes (one node)

Peformance by varyng the number of processes (one node)

Peformance by varyng the number of processes (two nodes)

Peformance by varyng the number of processes (two node)

Peformance by varyng the dimensions of blocks and with 8 processes (Cuda and Cuda+OpenMPI)

Peformance by varyng the number of blocks with 8 processes (Cuda and Cuda+OpenMPI)

Peformance by varyng the dimensions of blocks and with 32 processes (Cuda and Cuda+OpenMPI)

Peformance by varyng the number of blocks with 32 processes (Cuda and Cuda+OpenMPI)

About

The main goal of this work is to generate the Mandelbrot Set using different approaches: Sequential, Pthreads, OpenMP, OpenMPI and Cuda.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published