<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13139" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2022-01-13T12:37:33+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13139</id>

		<entry>
		<author><name><![CDATA[paokakis]]></name></author>
		<updated>2022-01-13T12:37:33+00:00</updated>

		<published>2022-01-13T12:37:33+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43807#p43807</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43807#p43807"/>
		<title type="html"><![CDATA[Re: Setting up bullet physics multithreading]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43807#p43807"><![CDATA[
Interested. Did you add <div class="codebox"><p>Code: </p><pre><code>#define BT_THREADSAFE = 1</code></pre></div>?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13868">paokakis</a> — Thu Jan 13, 2022 12:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YessMasster]]></name></author>
		<updated>2021-01-18T13:21:34+00:00</updated>

		<published>2021-01-18T13:21:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43256#p43256</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43256#p43256"/>
		<title type="html"><![CDATA[Setting up bullet physics multithreading]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43256#p43256"><![CDATA[
Hello,<br><br>I have the following problem - im trying to set up multi-threaded calculations in BP, however, not all seems to be going as it should. Here's the init code:<div class="codebox"><p>Code: </p><pre><code>static CustomTaskScheduler TaskScheduler(TEXT("bullet physics task scheduler"), PhysicsThreadCount);TaskScheduler.setNumThreads(PhysicsThreadCount);btSetTaskScheduler(&amp;TaskScheduler);CollisionConfiguration = new btDefaultCollisionConfiguration();Dispatcher = new btCollisionDispatcherMt(CollisionConfiguration);OverlappingPairCache = new btDbvtBroadphase();SolverPool = new btConstraintSolverPoolMt(PhysicsThreadCount);DynamicsWorld = new btDiscreteDynamicsWorldMt(Dispatcher, OverlappingPairCache, SolverPool, nullptr, CollisionConfiguration);</code></pre></div>CustomTaskScheduler is a custom scheduler i wrote.<br><br>When I launch the simulation, however, all the task threads in the scheduler i wrote. Breakpoints in <strong class="text-strong">parallelFor()</strong> and <strong class="text-strong">parallelSum()</strong> are not being hit at all. In the thread list i see the threads from the CustomTaskScheduler, but no other additional Bullet-related threads. So all in all, it seems like despite everything, Bullet still operated on a single thread. Is there something im missing in my initialization?<br><br>EDIT: Previously i forgot to use Mt version of dispatcher. After the fix, however, it still doesnt seem to use other threads.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13880">YessMasster</a> — Mon Jan 18, 2021 1:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
