Synchronized Drawing

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.

Order Matters

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

Instead of:

mpiexec -np 2 -f machines python barrier.py

It just putting the program to execute at the end made the difference.

Time Analysis

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:

avg min max range std dev
0.009541388 0.008450031 0.011140108 0.00269 0.000529

 

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *