Open a local GLUT window for each process and repeat the
following one thousand times: synchronize all processes and draw a
local animating triangle. You can assume the DISPLAY variable for
each rank can be set like this (before glutInit!):
char myDisplay[100];
sprintf(myDisplay,"powerwall%d:0",rank);
setenv("DISPLAY",myDisplay,1);
WARNING: with this setup, since rank 6 is sending its output to
DISPLAY=powerwall6:0, you *cannot* use GLSL because rank 6 normally
runs on powerwall3 (=6/2, since there are 2 processors per machine),
and GLSL doesn't like being sent across the network. Also beware that
your reshape routine might *not* get called, so make sure your glViewport
and matrices will be correct regardless (for example, you could call
main_repaint directly from your main routine). I recommend starting from
a very simple OpenGL program like the 481_matrix/compact_noglui.cpp example
linked off the main page. (This problem is hard, but this will motivate
you to learn
the much nicer MPIglut, instead of bare MPI!)