Search found 99 matches

by lunkhound
Mon Jul 27, 2015 5:29 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Thanks for those fixes!

I haven't merged the determinism one yet because I want to see what the performance implications are. I'll have a look at it later.
by lunkhound
Sat Jul 25, 2015 4:37 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

I created a new branch in my repo with a fix for this issue. I added a new branch for it because I'm not comfortable adding this to my pull-request just yet. So its really not good for the constraint solver to be writing to the companionId field of CollisionBody objects that are potentially shared b...
by lunkhound
Fri Jul 24, 2015 10:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Well, a rigid body can only ever exist in a single simulation island, and can only be touched by that island's thread. A kinematic body can be part of more than one island, however, so multiple threads could be touching it. Sounds like a good hypothesis. Ah, of course! I didn't realize non-kinemati...
by lunkhound
Fri Jul 24, 2015 6:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

I just noticed that the companion id is a member of btCollisionObject, so I'm guessing that multiple threads are changing this value concurrently (body.setCompanionId). That doesn't explain why it only seems to be crashing when using kinematic objects though.. Martijn Well, a rigid body can only ev...
by lunkhound
Fri Jul 24, 2015 6:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

I'm not sure, but I think the parallel narrowphase kills determinism because the order of the manifolds changes, which in turn causes the solver to yield different results. Martijn Yes, the multithreaded narrowphase is currently implemented in a very simple way which doesn't ensure a deterministic ...
by lunkhound
Thu Jun 18, 2015 8:04 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Finally, after tests i changed sheduler to PPL (at MSVC 2010 OpenMP works not smoothly). But for MSVC 2010 need to change code for PPL in ParallelFor.h (because partitioner-argument is not supported for parallel_for) like this: And now my gameEngine works even faster. Thanks a lot for your work! :)...
by lunkhound
Sun Jun 14, 2015 5:48 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

ai-music wrote:The same result: https://youtu.be/faK1yXDL6fM
I think that bug around functions included in internalSimulationStep()... Need to compare with clean-2.83.
Did you apply the bugfix? That video looks exactly like the bug that I fixed.
by lunkhound
Sat Jun 13, 2015 10:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Thanks for answers. I'll try to find out the cause of the brake openMP at MSVC 2010. If the multithreadedDemo is crashing when you launch spheres into the scene, it may be running out of persistent manifolds. In that case, remove this line: m_dispatcher->setDispatcherFlags( btCollisionDispatcher::C...
by lunkhound
Sat Jun 13, 2015 8:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

If you can reproduce the problem in the example browser, I'll take another look. Try this code: MultiThreadedDemo.cpp (press 'n' key once for long time) and you can see effect as at video: https://youtu.be/A8SPOrGukcw Pretty sure I found the bug. I updated my repo with the fix. Thanks for your help...
by lunkhound
Fri Jun 12, 2015 10:10 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

I tried to reproduce Ccd problem you mentioned. Here is what I did. Go to the file bullet3/examples/Benchmarks/BenchmarkDemo.cpp, line 116 (right after the resetCamera() method of the BenchmarkDemo class). Add the following method: virtual bool keyboardCallback( int key, int state ) { bool handled =...
by lunkhound
Fri Jun 12, 2015 1:06 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Setup like your sample (MultiThreadingDemo) - sequential impulse solver etc... CCD working incorrect without multithreading too (but clean bullet-3-master (2.83) working correct). Maybe you can see this bug when you try shooting (some CCD rigid body like a bullet) to example boxes. And maybe create...
by lunkhound
Fri Jun 12, 2015 4:37 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Awesome work! Will the multi-threading optimization work on iOS/Neon processors ? In theory it should work on iOS (assuming TBB or OpenMP is available). However I don't know if anyone has built it for iOS. Some cmake tweaks might be needed. If you try it on iOS, please report the results back here.
by lunkhound
Fri Jun 12, 2015 4:26 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

Nice work! Thanks. Really good initiative! But check CCD, it working incorrect. Trouble like this - https://code.google.com/p/bullet/issues/detail?id=356 video - http://www.youtube.com/watch?v=Q17MnAMujTI And when i tested your code in my application (miltithreading mode with kinematic characters, ...
by lunkhound
Thu May 28, 2015 5:51 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

I updated my branch in github with the fix to make the MLCP solver threadsafe.
by lunkhound
Wed May 27, 2015 11:02 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 85548

Re: CPU multithreading is working!

The MLCP solver is not threadsafe at the moment. The issue is that there are a number of scratch working structures that are declared "static". Open up btMLCPSolver.cpp and search for "static" and you'll see them. With multiple threads all trying to read and write to the same scratch data simultaneo...