[ODE] Ideas for threading ODE...
Gopi Prashanth
gprashanth at Heavy-Iron.com
Thu Aug 18 12:30:25 MST 2005
I agree that at some point ODE has to be multi threaded, but then that
scenario is completely dependent on the user. OpenMP might be a solution,
but may not be the preferred solution to a lot of people. Also the island
idea might suit someone, but someone else might want to put different spaces
like effects/gameplay into different threads. So it is more user centric
than what appears...
-----Original Message-----
From: Tyler Streeter [mailto:tylerstreeter at gmail.com]
Sent: Thursday, August 18, 2005 12:19 PM
To: ode
Subject: [ODE] Ideas for threading ODE...
It seems wise to discuss ways to make ODE multithreaded. With all the
new hardware options becoming available (e.g. multi core general
purpose CPUs, general purpose vector machines like the CELL chip, and
specialized physics chips like Ageia's PhysX), it would be a shame to
be stuck in a single thread forever.
Since islands of bodies are by definition independent, each island
could be sent to a separate thread. During collision detection each
non-colliding space could be sent to a separate thread (e.g. ODE's
spaces, or the octants of an octree).
Using OpenMP (http://www.openmp.org) would make it easy to add support
for multiple threads. OpenMP is great for data parallelism, which I
think is the case here. Also, it requires minor code changes. For
example, just put "#pragma omp parallel for" in front of a for loop
(whose iterations must be totally independent), and OpenMP
automatically distributes the iterations to separate threads.
One major caveat is gcc support for OpenMP. As far as I know, gcc
doesn't support it yet. There is the GOMP project
(http://www.gnu.org/software/gcc/projects/gomp/), but I don't know how
far along it is. Besides that, a lot of compilers are supported,
including VC++ 8.0. Here's a list of supported compilers:
http://www.openmp.org/drupal/node/view/9
Tyler
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list