We’ll keep here our efforts for the “UFRGS Portas Abertas”. Our idea is to run an enourmous fractal in an interactive manner for our visitors at the Informatics Institute data center.
People involved:
- Prof. Lucas Mello Schnorr (@schnorr)
- Rayan Raddatz de Matos (@rddtz)
- Francisco Pegoraro Etcheverria (@thedoubleace)
- Kenichi Brumati (@Kenichi220)
If you want to get yourself involved, get in touch. ;-)
To build the project, ensure you have MPI and Raylib installed.
You can adjust the Raylib installation path in the Makefile.
Then, simply run:
makeThis will create three executables inside the bin/ directory:
grafica(GUI client, requires Raylib)textual(command line client with no graphical output, useful for benchmarking)coordinator(parallel server, requires MPI)
There is logging available for the textual client and the coordinator.
By default, the build uses LOG_BASIC logging.
You can override this at compile time by setting the LOG_LEVEL variable:
make LOG_LEVEL=LOG_NONEAvailable options include:
LOG_NONENo logging outputLOG_BASICDefault option, includes coordinator timing logs and worker timing logs per client requestLOG_FULLIncludesLOG_BASIClogs, as well as logs for individual discretized tasks executed by each worker.
The coordinator should be run using mpirun.
You should specify at least 2 processes with option -n (one for the coordinator itself and at least one worker).
Example:
mpirun -n 4 ./bin/coordinator <port>Runs the server, listening on a given port. Note that 4 processes means the server will be launched with 3 workers.
To connect to the coordinator and interact with the fractal using the GUI client:
./bin/grafica <host> <port>For benchmarking or running without graphical output, you can use the textual client:
./bin/textual <host> <port> <granularity> <fractal_depth> <screen_width> <screen_height> <ll_x> <ll_y> <ur_x> <ur_y>The granularity is the size of the square blocks the server will discretize the fractal space into.
The fractal depth is the max number of iterations to run the mandelbrot algorithm for each pixel.
ll_x / ll_y are the lower left corner x and y fractal coordinates, and ur_x / ur_y
are the upper right corner x and y fractal coordinates.
You can go further in the fractal by selecting a new zone to zoom in
when in selection mode. You can enter selection mode by pressing ENTER.
| KEY | FUNCTION |
|---|---|
| ENTER | Enters “Selection Mode” |
| BACKSPACE | Exits “Selection Mode” |
| ENTER (in selection mode) | Sends current selected area as next payload |
| ARROWKEYS / WASD * | Move selection box |
| S-UPARROW or S-w * | Increase selection box size |
| S-DOWNARROW or S-s * | Decrease selection box size |
| C-z ** | Go back to the previous payload |
| SPACE | Change the actual color mode |
| c | Show the workers colors within the actual color mode |
| G + | Increase the granularity |
| G - | Decrease the granularity |
| P + | Increase the depth of the fractal |
| P - | Decrease the depth of the fractal |
When in selection mode, you can also move the box using the mouse by left clicking the selection box and draggin it. And also change it’s size with the mouse scroll.
*You can hold “CONTROL” to move the box or change it’s size with precision.
**C stands for “CONTROL” and S stands for “SHIFT”.