We have observed a problem with OpenSceneGraph (OSG) in which parallel, multi-threaded, applications do not scale properly to multiple graphics cards. The problem has been isolated to within the OSG software.
The program should be compiled as any typical OSG program. (Our testing was done with OSG version 2.9.10 and 3.0.)
Before running, you should set the following environment variables:
export __GL_SYNC_TO_VBLANK=0
export OSG_SERIALIZE_DRAW_DISPATCH=OFF
export OSG_THREADING=CullThreadPerCameraDrawThreadPerContext
Here is how to run the program from the command line:
./osgMultiCardTest displayNumbers file
Three sample input files are provided as well.
When you run these tests, you should see a window appear on each of the specified displays. Each of these windows should show a 3D model consisting of many small colored spheres. With your cursor in one of windows, press the 's' key; this will display the frame rate in the upper left corner of the window(s).
The frame rate gives the rendering speed in frames per second (FPS). When we run these tests, we observe an unexpected reduction of frame rates as more cards are used. For example, if the FPS is 100 using one card, the frame rate drops to 50 for 2 cards and 25 for 4 cards in use. We would expect that if the application were working properly, the FPS would be the same in all cases.