- Code: Select all
georg@crumb0 /net/crumb0/home/georg/src/mpitutorial $ time ./apple_serial 4096
RE_START = -2
RE_STOP = 2
IM_START = 0
IM_STOP = 2
XPIX = 2048
YPIX = 1024
MAXITER = 4096
1023
real 1m2.730s
user 1m1.910s
sys 0m0.250s
georg@crumb0 /net/crumb0/home/georg/src/mpitutorial $ time mpiexec -H crumb0,crumb1,crumb2,crumb3 apple_mpi_nblock.2 4096
RE_START = -2
RE_STOP = 2
IM_START = 0
IM_STOP = 2
XPIX = 2048
YPIX = 1024
MAXITER = 4096
MPI_Wtime is global
[...]
real 0m18.129s
user 0m16.790s
sys 0m0.840s
For this particular case there is nearly perfect scaling: one node takes 63 seconds to compute while four nodes need about 18 seconds.
Check out my MPI tutorial at https://github.com/GeorgBisseling/MPI-Tutorial/blob/master/tutorial.pdf?raw=true with full source code at https://github.com/GeorgBisseling/MPI-Tutorial/blob/master/mpitutorial.tar.gz?raw=true.
[mod edit: Links changed at the request of the OP]
DISCLAIMER: If you want to do fast computations, then do not even consider the Raspberry Pi! Clustering them is just done for fun and to learn about the problems and pitfalls of distributed memory computing.You couldn't do that with lower energy and space requirements, I guess.

