Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-16 Thread J.P. Delport
Hi Ralph, if you can make a small OT vs OpenMP test app that people can run on a variety of Linux flavours, maybe something will jump out. E.g. how standard is the pthread lib in RHEL5.2? jp Ralph R. Peters wrote: Hi Robert all, I did the simple thing to test if the call

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Ralph R. Peters
Hi, I will try to be much more concise! :-) The problem appears to be that SetProcessorAffinityOfCurrentThread(unsigned int cpunum) is always being called with a cpunum value of zero. More information follows. I am trying to use OpenMP with an application that uses OpenScenGraph.

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
Hi Ralf, SetProcessorAffinityOfCurrentThread(0) is just setting the affinity of thread to cpu number 0, this is a perfectly normal reasonable setting, it in itself is nothing to worry about, the main rendering thread being assigned to cpu number 0 is exactly what you want for most apps. What the

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
Hi Ralf, As a sanity test I've just added some debug code into src/osgViewer/ViewerBase.cpp and src/OpenThreads/pthreads/PThead.c++ to track what cpu numbers as being assigned from the viewer, and what is being recieved by OpenThreads, running osgwindow cow.osg I get: numProcessors = 4 cpunum=1

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Csaba Halász
On Wed, Oct 15, 2008 at 5:46 PM, Robert Osfield [EMAIL PROTECTED] wrote: numProcessors = 4 cpunum=1 cpunum=2 cpunum=3 cpunum=0 running and setting thread 0x737238 for cpunum=3 running and setting thread 0x737638 for cpunum=0 running and setting thread 0x734bf8 for cpunum=1 running and

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
Hi Csaba, On Wed, Oct 15, 2008 at 5:07 PM, Csaba Halász [EMAIL PROTECTED] wrote: So all looks correct in terms of num of processors and cpu number assigned for affinity. I wonder why OSG assigns threads to cpus by itself and not rely on the operating system. Because a OS will let that

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Csaba Halász
On Wed, Oct 15, 2008 at 6:15 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Csaba, On Wed, Oct 15, 2008 at 5:07 PM, Csaba Halász [EMAIL PROTECTED] wrote: So all looks correct in terms of num of processors and cpu number assigned for affinity. I wonder why OSG assigns threads to cpus by

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Ralph R. Peters
Hi Robert, Would you please send me your modified code and we can run the same code! Ralph {snip Hi Ralf, As a sanity test I've just added some debug code into src/osgViewer/ViewerBase.cpp and src/OpenThreads/pthreads/PThead.c++ to track what cpu numbers as being assigned from the viewer,

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Csaba Halász
On Wed, Oct 15, 2008 at 6:47 PM, Robert Osfield [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 5:30 PM, Csaba Halász [EMAIL PROTECTED] wrote: As a related question, in the stats display if multiple cpus are used properly, should that manifest itself as overlapping bars? Because I don't see

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
On Wed, Oct 15, 2008 at 5:58 PM, Ralph R. Peters [EMAIL PROTECTED] wrote: Would you please send me your modified code and we can run the same code! I already did, please trace back through the thread. Robert. ___ osg-users mailing list

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Csaba Halász
On Wed, Oct 15, 2008 at 7:07 PM, Robert Osfield [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 6:01 PM, Csaba Halász [EMAIL PROTECTED] wrote: Here is what stats I get: http://imagebin.ca/view/lDtnJ9ET.html I have tried your debugging mods, with the osgcamera example I get the expected

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
Hi Csaba, On Wed, Oct 15, 2008 at 5:30 PM, Csaba Halász [EMAIL PROTECTED] wrote: But if OSG happens to force 2 cpu intensive threads to the same core, performance will suffer anyway, and more than a simple cache efficiency issue. I have 3 cameras, two of which are using the same graph and a

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
On Wed, Oct 15, 2008 at 6:45 PM, Csaba Halász [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 7:23 PM, Csaba Halász [EMAIL PROTECTED] wrote: The threading is set like so: viewer = new osgViewer::Viewer; viewer-setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext);

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Csaba Halász
On Wed, Oct 15, 2008 at 8:28 PM, Robert Osfield [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 6:45 PM, Csaba Halász [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 7:23 PM, Csaba Halász [EMAIL PROTECTED] wrote: The threading is set like so: viewer = new osgViewer::Viewer;

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Ralph R. Peters
Hi Robert all, I did the simple thing to test if the call pthread_setaffinity_np( pthread_self(), sizeof(cpumask), cpumask) was causing OpenMP problems. A code snippet from the function SetProcessorAffinityOfCurrentThread in PThread.c++ follows. Changing doit from true to false and

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Robert Osfield
Hi Ralf, I'm afraid there isn't anything more I can do to help you, as I have absolutely no experience with OpenMP, and am not an expert on the pthread affinity functions. Perhaps others on the list might be able to help. What it does look like is that pthread_setaffinity_np/OpenMP

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-15 Thread Csaba Halász
On Wed, Oct 15, 2008 at 8:44 PM, Csaba Halász [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 8:28 PM, Robert Osfield [EMAIL PROTECTED] wrote: This sounds like a bug in osgViewer, it shouldn't matter which order your set the threading model. Hmm, upon closer look Viewer::realize() does

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-14 Thread Robert Osfield
HI Ralf, On Tue, Oct 14, 2008 at 6:21 PM, Ralph R. Peters [EMAIL PROTECTED] wrote: Hi Robert, I get an email digest and so I have been responding directly with thunderbird. What should I put in the subject line so that I maintain the thread? Is what I put above sufficient? Please tell me

Re: [osg-users] OpenThreads/pthreads OpenMP on RHEL5.2

2008-10-14 Thread Robert Osfield
HI Ralf, Could you please keep your posts on the same thread so it makes it possible for others to follow, there are a great many posts that get posted on osg-users and unless you keep to the thread basically it becomes unmanageable for us to follow things. And when you say Hi... and he