HI Stefan,

On 2/7/07, Stefan Eilemann <[EMAIL PROTECTED]> wrote:
Dual core, though I don't think OpenThreads detects this:

int OpenThreads::GetNumberOfProcessors()
{
#if defined(__linux__)
     return sysconf(_SC_NPROCESSORS_CONF);
#else
     return 1;
#endif
}

Any chance that yourself or another OSX users can add the
implementation under OSX. It'll obviously be very useful for getting
the best out of threading of the OSG under OSX.


> Another point on the map...
>
> The above suggests that original mode was probably single threaded. It
> might be worth adding some debugging to get a definitive answer.  Note
> that the osgViewer::Viewer now by default automatically suggests the
> threading model to use, if you have a single core machine and single
> window it suggest SingleThreaded.

I did interrupt the running viewer in gdb, and it only had one thread.

> The above should just open on one window on screen 0.  Is this what
> happens?

Yes, same as the default as I only have one X11 screen.

> If only I could recreate the same problem then I might have a chance
> to dig what might be up.  I have single core Linux laptop that I fire
> occassional, and everything works fine save for the exit from
> osgwindows.  Here a get a crash in the OpenGL driver.  No clue to
> cause yet.
> What happens when you run osgwindows cow.osg?

An infinite loop:

ViewerDoubleBufferedRenderingOperation::release() causing draw to exit
get op 0 0x43c140
increment Barrier
Doing op Barrier 0x43c140
    Waiting for OperationsThread to cancel 0x43be10
get op 0 0x43c140
increment SwapBuffers
Doing op SwapBuffers 0x43c140
get op 0 0x43c140
increment RunOperation
Doing op RunOperation 0x43c140
Doing op Render 0x42cb80
ViewerDoubleBufferedRenderingOperation::release() causing draw to exit
get op 0 0x43c140
increment Barrier
Doing op Barrier 0x43c140
    Waiting for OperationsThread to cancel 0x43be10
get op 0 0x43c140
increment SwapBuffers
Doing op SwapBuffers 0x43c140
get op 0 0x43c140
increment RunOperation
Doing op RunOperation 0x43c140
Doing op Render 0x42cb80
ViewerDoubleBufferedRenderingOperation::release() causing draw to exit

Curious, this suggests that its running multi-threaded and not exiting
the thread.  Either that or its running single threaded and the main
frame loop isn't exiting.

Its really frustrating that I don't have the machine in front of me.

How many windows are being opened up?  Could you try disconecting the
second display and see what happens.

>> I use more or less the same code in Equalizer, I tried with and
>> without
>> the XInitThreads() - and it works.
>
> Do you have completely your own X11 viewer code in Equalizer, or does
> this sit ontop of the OSG's viewer lib?

It is my own X11 code, but doing similar stuff. I was planning
to make a Equalizer-based osgViewer as a drop-in for the osgcluster
code whenever I have some spare cycles.

That would be cool.  Frustating that things don't work giving you the
spare cycles :-)

If I can get an idea of the set up might have of recreate things at me end.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to