0

I made a clustercomputer for a school project. Only i am having some problems with making a code that uses all eight Raspberry pi's.

https://www.instructables.com/id/How-to-Make-a-Raspberry-Pi-SuperComputer/ This is the base i used to make it. running:

mpiexec -f machinefile -n 8 hostname

output: all the hostnames of the Pi's. the machinefile contains all the IP's of the Pi's. Running a program:

mpiexec -f machinefile -n 8 python test.py 

output: It just runs the program seperatly on all Pi's.

How can i make a code or a command that makes the Pi's split the load of the program?

My goal is to have all 8 Pi's working together but not doing the same calculations and thereby speeding the proces up significantly.

Samuelvde
  • 1
  • 2
  • You should use some message passing library to be able to synchronize the processes. Take a look at [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface) – Poshi Mar 07 '19 at 15:14
  • That's what I'm trying to do, but I really don't know how to sync the processes – Samuelvde Mar 07 '19 at 19:02
  • You can get all the processes in sync with a barrier (`MPI_barrier`). Check the docs of [one of the implementations](https://mpi4py.readthedocs.io/en/stable/) – Poshi Mar 07 '19 at 19:52

0 Answers0