Hi WeSee,

You submissions was rejected as it added only complexity and add no useful
functionality.  I have never really understood why you were unable to set
the processor affinity, you never actually gave a working example to test
so I had to take on trust that you actually tried what I suggested, but it
seems you can't of.  To test things directly out myself I have just added a
small code segment to the osgterrain example that sets the processor
affinity.  It's simple, straight forward as I suggested a long time ago:

    // add a viewport to the viewer and attach the scene graph.
    viewer.setSceneData( rootnode.get() );

    // if required set the DatabaseThread affinity, note must call after
viewer.setSceneData() so that the osgViewer::Scene object is constructed
with it's DatabasePager.
    if (setDatabaseThreadAffinity)
    {
        for (unsigned int i=0;
i<viewer.getDatabasePager()->getNumDatabaseThreads(); ++i)
        {
            osgDB::DatabasePager::DatabaseThread* thread =
viewer.getDatabasePager()->getDatabaseThread(i);
            thread->setProcessorAffinity(cpuNum);
            OSG_NOTICE<<"Settings affinity of DatabaseThread="<<thread<<"
isRunning()="<<thread->isRunning()<<" cpuNum="<<cpuNum<<std::endl;
        }
    }

    // run the viewers main loop
    return viewer.run();

I have just test on my system checking with the KDE System Monitor and each
time I run it with --db-affinity cpuNum option that sets the
setDatabaseThreadAffinity/cpuNum used above I see the appropriate processor
hit 100%.

It works.  Could you please try this on your own system.

It's frustrating that you clearly never properly tried my suggestions or
tried to debug why they didn't work, instead we've been run around the
houses with your over complicated attempts to solve a problem that never
existed.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to