I have a program that I am writing in python that utilizes multiple different PI boards. The main one is a raspberry pi running on raspios-buster-lite-armhf
. However, the nodes are all Nano Pi's running on sd-friendlycore-xenial-4.4-arm64
. I would like to utilize all if possible, that way making my program as efficient as I can at the moment. I have MPI installed on all of them, and it works to an extent. This is the output from the demo helloworld.py program that prints the ranks and sizes:
Hello, World! I am process 4 of 5 on Node04.
Hello, World! I am process 1 of 5 on Node02.
Hello, World! I am process 2 of 5 on Node01.
Hello, World! I am process 3 of 5 on Node03.
Hello, World! I am process 0 of 5 on HeadPi.
Which as you can see does work. However, if I try to have a signal sent it doesn't work. This is the general code:
from mpi4py import MPI
import sys
comm = MPI.COMM_WORLD
size = comm.Get_size()
rank = comm.Get_rank()
name = MPI.Get_processor_name()
if rank == 0:
shared = 'hi'
print('sending')
req = comm.isend(shared, dest=4, tag=1)
print('sent')
req.wait()
print('done waiting')
if rank == 4:
receive = comm.irecv(source=0, tag=1)
data = receive.wait()
print(data)
If I run that, it prints send
and then just stops indefinitely. However, if I have the message sent from one of the nodes to another one, it sends just fine. Obviously meaning that it is unable to communicate across the different platforms, or I set something up on the raspberry pi very wrongly. Is there a quick fix to this like to add an argument after mpiexec to make it able to work cross platform? If I switched the raspberry pi to an ARM 64 instead of the current ARMhf would that make it work? Is the only solution that may work trying to install the xenial firmware onto the raspberry pi and it will then work?