I was tasked with using MPI_Barrier to synchronously draw two triangles on two different raspberry pi boards. I was unsuccessful, but not unproductive.
The reason I wasn’t successful is this: When I executed Dr. Johnson’s triangle.py program, the program would give me the following error:
numconfig= c_long(1) Traceback (most recent call last): File "triangle.py", line 27, in <module> program = context.get_program(vertexShader, fragmentShader, binding) AttributeError: 'EGL' object has no attribute 'get_program'
This is after installing the pyopengles library. Googling provided little help.
One lesson I reminded myself of is that “Order matters” order referring to the sequence of things. I spent all too much time trying to get Dr. Bui’s barrier.py code up and running again with both our machines on my local network. I was trying this command:
mpiexec -np 2 python barrier.py -f machines
mpiexec -np 2 -f machines python barrier.py
It just putting the program to execute at the end made the difference.
The next thing I accomplished was some analysis on the delay it took between when the initial board would write its output and the other boards to receive the message and write their own. If this time is too long, they videos will not look as if they are playing at the same time.
Taking the log files generated from Dr. Bui’s barrier.py program, here are the results of analyzing the difference in time between when bramble00 and bramble01 wrote the same line to their log files. There are 736 samples. All values are in seconds: