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).
Carlos Eduardo Leal de Castro - o/
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
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 |