Search found 99 matches

by lunkhound
Fri May 04, 2018 10:59 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

To reproduce problem with a small amount of code, I modified your sample (MultiThreadedDemo) a bit, i.e replaced fragment of method MultiThreadedDemo::createStack from: btRigidBody* body = localCreateRigidBody( mass, trans, boxShape ); body->setFriction( 1.0f ); body->setRollingFriction( gSliderRol...
by lunkhound
Fri May 04, 2018 9:14 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

I'll investigate this crash shortly.
by lunkhound
Sun Apr 15, 2018 8:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

Note that my pull-request for the multithreaded constraint solver has been accepted and merged (a couple of weeks ago). So this is now available in the main Bullet repo. Thanks Erwin! With this latest PR, the task scheduler is now included in the core libs, which should make it easier than ever to g...
by lunkhound
Thu Mar 08, 2018 7:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

Thanks. I was using the wrong master, which doesn't have the btSequentialImpulseConstraintSolverMt source files. I'll build it now and let you know what I think after a couple of days of testing. Sorry, that was my bad -- I had the wrong default branch on my repo. I fixed that now. If you should ru...
by lunkhound
Thu Mar 08, 2018 6:51 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

I've tried getting this working, but VS is throwing an assert: btAssert( gBtTaskScheduler != NULL ); // call btSetTaskScheduler() with a valid task scheduler first! - line 444 of btThreads.cpp I chose PPL in cmake and I'm creating the world like so: broadPhase = new btDbvtBroadphase(); collisionCon...
by lunkhound
Sat Mar 03, 2018 1:36 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

To show how the new parallel solver can improve on and integrate with the existing multithreading, consider the demo from the example browser found under "Benchmarks/1000 stack". In this scene we have a large island, a medium island and 3 small islands. This graphic shows a comparison of using the e...
by lunkhound
Fri Mar 02, 2018 9:47 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

Thanks, this is very interesting. Have you experimented with graph coloring (solving a large island in parallel)? Yes, that's what this is. I experimented with various ways of batching the constraints (graph coloring). I probably tried 5 different approaches, discarding all except for the grid-base...
by lunkhound
Tue Feb 27, 2018 12:35 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

https://github.com/bulletphysics/bullet3/pull/1579 Multithreaded constraint solver Adds a new class SequentialImpulseConstraintSolverMt, which is basically a multithreaded version of SequentialImpulseConstraintSolver. Supports all of the features of the normal sequential impulse solver such as: - s...
by lunkhound
Mon Jan 29, 2018 10:35 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

StabInTheDark wrote:
Mon Jan 29, 2018 1:36 am
Where is the correct link to this multithreaded code?
It has been in the main repo for some time now (https://github.com/bulletphysics/bullet3). However multithreading is not enabled by default, you have to turn it on in Cmake configuration.
by lunkhound
Sun Jan 28, 2018 1:01 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

I've run into a problem when using constraints with kinematic bodies (simulated bodies work fine). btSimulationIslandManagerMt calls buildAndProcessIslands(), which calls addConstraintsToIslands(), which calls btGetConstraintIslandId(), which returns -1. The next line, "Island* island = getIsland(i...
by lunkhound
Sun Sep 17, 2017 10:35 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

I didn't try. I reviewed the code itself and recalled comments about it that you had made. A combination of needing to move 6+ files, concerns over the interface, the lack of inclusion in the core library, and references to Bullet 3 code (I'm still very much using Bullet 2) all eliminated it as a p...
by lunkhound
Sat Sep 16, 2017 7:23 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

Mako_energy02, thanks for contributing to this thread and sharing your experiences. I appreciate it. Yes, parallelFor is called typically 5 times per simulation sub-step. In the work I am currently doing where I'm parallelizing the constraint solver, I'm leaning much harder on the task scheduler, an...
by lunkhound
Thu Aug 24, 2017 7:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

If you are hitting that assertion, then it means more than 64 unique threads have been used for doing tasks in bullet. Your task scheduler should only be creating/using one thread per CPU core (actually one less because the main thread already exists). The task scheduler should not be creating threa...
by lunkhound
Tue Aug 22, 2017 6:35 am
Forum: General Bullet Physics Support and Feedback
Topic: CPU multithreading is working!
Replies: 145
Views: 56853

Re: CPU multithreading is working!

A slight progress update with my experiences using the multithreaded stuff. First, I haven't yet gotten around to making a btSoftRigidDynamicsWorldMt class yet. I've only been treating this as a side project to other goals. But...other stuff I've found... I didn't want to use any of the TaskSchedul...
by lunkhound
Tue Jun 13, 2017 12:10 am
Forum: General Bullet Physics Support and Feedback
Topic: Performance tips? (OpenCL/multi-threading/etc)
Replies: 2
Views: 1755

Re: Performance tips? (OpenCL/multi-threading/etc)

I'm migrating my physics code for an application I'm working on from PhysX to Bullet, to do some performance testing. My application uses rigidbodies, constraints and cloth. Initially I was under the impression that Bullet supports OpenCL computations, which greatly improve simulation performance.....