All projects
Parallel computing / MPICompleted

Parallel Mandelbrot Set Computation and Rendering.

Sequential and MPI-based Mandelbrot computation, comparing execution times and cyclic row distribution while generating PGM images.

Parallel computation

The sequential implementation calculates each pixel and writes the result in PGM format. The MPI version distributes rows cyclically: process p calculates rows p, p + size, p + 2 × size, and so on.

This spreads regions with different computational costs across processes. Each process stores its local rows; process 0 gathers the results and reconstructs their original order.

Benchmark

The documented benchmark reports 3.76× speedup with eight processes at a maximum of 15,000 iterations on an Intel Core i7-1355U: 26.750105 s sequentially versus 7.110930 s with MPI.

The implementations produce 1920 × 1080 images. Timings exclude PGM file writing; the sequential version uses CPU time from clock(), while the MPI version uses elapsed time from MPI_Wtime(), including gathering and reconstruction.

Source code and benchmark commands are available in the parallel Mandelbrot repository.

Back to the index