[ODE] OpenMP for running multiple simulations

Michael Jones m.pricejones at gmail.com
Sat Aug 12 04:23:52 MST 2006


Hi,

I'm current using the ODE as the basis for testing virtual creatures in an
evolutionary system. As part of it i need to run thousands of ODE sims to
check the different creatures over the generations. I've added basic
multi-threading using OpenMP to run a different simulations on different
threads, but I'm beginning to wonder if that was a good idea. Can the ODE be
implemented with many parallel simulations like this? Or will there be
confusion between the threads?

Each sim is contained within a fitnessTest function and the 'for' loop that
runs all the fitness tests is multi-threaded with openMP. It works without
complaining if I create everything within the function and destroy it at the
end, but only use dCloseODE at the end of the entire program. If the
dCloseODE is used at the end of each fitness function then it all falls
apart.

I thought i might be able to get away with all this as you create a separate
world and space, etc for each sim, but i'm not sure bodyIDs and JointIDs
might start getting confused between the multiple runs.

Sadly because of the nature of the program it's hard to tell if anything is
going wrong. I currently evolve near random motion anyway (though i hope
this'll improve in the future!) so if there are any problems it's hard to
tell as it'd just produce different random motion.

Any help clearing this up would be much appreciated,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060812/7b3c7956/attachment.htm


More information about the ODE mailing list