MPI Distributed Fractal Generator
Distributed system based on MPI for fractal generation, utilizing a Master-Worker architecture for dynamic load balancing.

The project explores parallel programming using the MPI (Message Passing Interface) library to distribute fractal computations across multiple processes. Unlike shared memory, this system uses exclusive message-passing communication (e.g., MPI_Bcast, MPI_Gatherv, MPI_Reduce).
Load Balancing Strategies
Due to the unequal density of Julia fractals (where certain areas require the maximum number of iterations), two distribution strategies were analyzed:
- Interleaved Distribution (Static): Processes calculate rows in jumps (
y += size), ensuring each takes a representative workload from all areas of the image. - Dynamic Load Balancing (DLB): Utilizes a Master/Worker model where the Master process maintains a global queue of rows.
- Worker processes send results via MPI messages and automatically receive a new row as soon as they become available.
Performance and Analysis
The implemented system significantly reduces execution time compared to the sequential version (from 2.94 seconds to 0.24 seconds on 100 processes). The analysis showed that the DLB approach is optimal for an intermediate range of processes (e.g., 10 - 50 processes), but it generates a bottleneck at 100 processes due to the high volume of control messages handled by the Master process.