[ODE] OpenMP for running multiple simulations

Bill Sellers wis at mac.com
Sat Aug 12 06:54:35 MST 2006


For this sort of thing I use a client-server arrangement with ODE  
client applications running on multiple machines and a server  
application set up producing the models I want to test. I started off  
using various proprietary communications protocols (MPI, VPN) but in  
the end decided that they just got in the way so now I use raw  
sockets to communicate and an XML data stream. It's probably not the  
most efficient setup if you are confined to a single machine but as  
soon as you want to run on multiple machines it is very flexible.  
Since my simulations are quite small but also quite slow there is  
actually very little time spent communicating anyway. By avoiding  
multithreading it's much easier to debug and the way I've got it set  
up it works nicely across firewalls, and when I have more idle  
machines they can contribute too (and the whole thing is error  
tolerant for the clients). ODE certainly doesn't leak memory between  
simulations otherwise I'd have big problems :-> However it is a shame  
that different architectures give slightly different answers...

Cheers
Bill

On 12 Aug 2006, at 12:23, Michael Jones wrote:

> 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
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list