Re: [osg-users] OpenThreads, scheduling, etc ... policies

2015-05-06 Thread Curtis Rubel
Robert, Attached is a copy of the PThread.cpp file from OSG 3.3.7 that I modified that allows Linux systems to take full advantage of the pthread scheduling parameters. The changes I made are all within the #ifdef ALLOW_PRIORITY_SCHEDULING define and the static int

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2015-05-04 Thread Curtis Rubel
Hi, I would like to revisit this topic again as I see that even in the current trunk(3.3.8) as of this date May 04, 2015, the linux platform is still crippled inside of Openthreads/PThread API, from running priority/real-time scheduling policies. I will like to open a discussion about

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2015-05-04 Thread Robert Osfield
Hi Curtis, On 4 May 2015 at 14:32, Curtis Rubel cru...@compro.net wrote: I would like to revisit this topic again as I see that even in the current trunk(3.3.8) as of this date May 04, 2015, the linux platform is still crippled inside of Openthreads/PThread API, from running

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2015-05-04 Thread Curtis Rubel
Robert, When I mentioned crippled, I did not mean that as a bad or derogatory comment. Maybe saying something like intentionally disabled would have been a better choice of words, my apologies if my wording offended anyone in any way. Basic threading is working fine under Linux. If the user

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2015-05-04 Thread Robert Osfield
Hi Curtis, There has to be a historical reason for need for the #ifndef __linux__ around the thread scheduling assignment. As I'm not the author of this block of code I can only check the code and svn log's. I'm currently working on a complex bug fix on another area of the OSG so can't dive

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2015-05-04 Thread Curtis Rubel
Robert, There is already a define around all the priority scheduling calls to protect people from accidentally using them: #ifdef ALLOW_PRIORITY_SCHEDULING Which seems to have to be defined in the calling program as I cannot find this any place inside of OSG other than the pthreads source.

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Robert Osfield
HI Nick, On 5 May 2014 20:07, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Curtis implemented the same code with pthreads (attached) which seam to work, so it is definitely a bug in OpenThreads (for linux only, Windows implementation seam to be working). Just FYI I am currently

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Trajce Nikolov NICK
Hi Robert, I spent few hours on this and I have things to report. First, there are code mods I did to fix it actually, but, there is a comment like // Must protect linux from realtime., PThread.cpp around ln: 323. I have mods to submit but can not do that yet since there are issue with the

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Robert Osfield
Hi Nick, On 6 May 2014 16:25, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: I spent few hours on this and I have things to report. First, there are code mods I did to fix it actually, but, there is a comment like // Must protect linux from realtime., PThread.cpp around ln: 323. I

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Curtis Rubel
Hi Robert, My first problem was that I had selected the option to build OpenThreads with QT in cmake for some reason. So I rebuilt with this option off.. My apologies on that issue... At least it is now using the pthreads section properly. However, as Nick stated in his post, the openthreads

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Trajce Nikolov NICK
Hi Robert, here is the log cd /home/ubuntu/OpenSceneGraph/src/OpenThreads/pthreads /usr/bin/c++ -DHAVE_PTHREAD_CANCEL -DHAVE_PTHREAD_SETCANCELSTATE -DHAVE_PTHREAD_TESTCANCEL -DHAVE_SCHED_YIELD -DHAVE_THREE_PARAM_SCHED_SETAFFINITY -DOPENTHREADS_EXPORTS -DOpenThreads_EXPORTS -D_GNU_SOURCE -Wall

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Robert Osfield
Hi Nick, On 6 May 2014 17:26, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Robert, here is the log cd /home/ubuntu/OpenSceneGraph/src/OpenThreads/pthreads /usr/bin/c++ -DHAVE_PTHREAD_CANCEL -DHAVE_PTHREAD_SETCANCELSTATE -DHAVE_PTHREAD_TESTCANCEL -DHAVE_SCHED_YIELD

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Curtis Rubel
Nick, __linux__ is defined someplace in the gcc compiler as it finds the current arch and os, etc., installed. you can: cpp -dM /dev/null and see all the gcc defines output. I see that __linux is still there as well, at least for the time being. ALLOW_PRIORITY_SCHEDULING, however seems to

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Trajce Nikolov NICK
interesting ... my ubuntu has __unix and __unix__ instead of linux. Nick On Tue, May 6, 2014 at 7:01 PM, Curtis Rubel cru...@compro.net wrote: Nick, __linux__ is defined someplace in the gcc compiler as it finds the current arch and os, etc., installed. you can: cpp -dM /dev/null

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Robert Osfield
Hi Nick, On 6 May 2014 18:11, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: interesting ... my ubuntu has __unix and __unix__ instead of linux. I have 64bit Kubuntu 14.04 installed here and when I follow Curtis's suggestion I get: $ cpp -dM /dev/null | grep __linux #define __linux 1

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-06 Thread Trajce Nikolov NICK
Ubuntu 13.04 raring got it from the store installed on the laptop I bought in a rush :-) Nick On Tue, May 6, 2014 at 7:17 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, On 6 May 2014 18:11, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: interesting ... my

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-05 Thread Curtis Rubel
Hi, Checked out the latest trunk version myself and I am still having the same issues here with the OpenThread calls and the example code I sent to Nick. We are running OpenSuse 12.3 64-bit here. The calls all return good status. In fact the getSchedulePolicy and the getSchedulePriority

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-05 Thread Trajce Nikolov NICK
Hi Robert, Curtis implemented the same code with pthreads (attached) which seam to work, so it is definitely a bug in OpenThreads (for linux only, Windows implementation seam to be working). Just FYI Nick On Mon, May 5, 2014 at 3:23 PM, Curtis Rubel cru...@compro.net wrote: Hi, Checked out

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-02 Thread Robert Osfield
Hi Nick, Last month I checked in a fix for this issue, could you try out svn/trunk to see if it things work now as you were expecting? Robert. On 1 May 2014 18:49, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community my client found interesting behaviour on OpenThreads

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-02 Thread Trajce Nikolov NICK
Thanks Robert. I am going to try it right away. Just to clarify, this is the address of the current trunk, right? http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk On Fri, May 2, 2014 at 11:56 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, Last month I checked in a fix

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-02 Thread Robert Osfield
On 2 May 2014 10:12, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Thanks Robert. I am going to try it right away. Just to clarify, this is the address of the current trunk, right? http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk Yep, that is correct. Robert.

Re: [osg-users] OpenThreads, scheduling, etc ... policies

2014-05-02 Thread Trajce Nikolov NICK
Hi Robert, I just build the latest from the trunk - revision 14188, and no changes. Still geting failures (-1) on these calls. But on Windows it works well. Any ideas? Could you give it a shot to the attached file, it is selfcontained Thanks a bunch! Nick On Fri, May 2, 2014 at 12:18 PM,

[osg-users] OpenThreads, scheduling, etc ... policies

2014-05-01 Thread Trajce Nikolov NICK
Hi Community my client found interesting behaviour on OpenThreads under 64bit OpenSuSE linux. It seam none of the calls like setSchedulePolicy, setProcessorAffinity and setSechedulePriority of OpenThreads::Thread are working. After running a code, they all return 0 (success) but after inspecting