Check if a number is perfect or not using MPI (Message Passing Interface) library in C, dividing the work into different processes, increasing calculation speed. (For more information click here)
To compile and run this code, its needed OpenMPI. You can install it using this command:
sudo apt-get install openmpi-bin
Open "PerfectNumber_Proyect" folder and run:
make run <number of processes> <number to check>
There are some other options working in the Makefile:
- Compile and not run the code
make perfnum
- Execute tiempos.sh with default processes and number to check.
make times
This script is used to get a list of the execution times with different processes to check if the number given is perfect or not (same result as running several times the program incrementing processes for each execution). This script can be also executed specifying arguments:
tiempos.sh <max number of processes> <number to check>
- Clean folder and leave only code files.
make clean