[ODE] Running ODE in a thread
Vrej Melkonian
vmelkon at yahoo.com
Tue Nov 22 05:55:33 MST 2005
SOLVED!
There was an unintentional coding error on my part so
I was in fact running ODE in 2 threads, but I wanted
to run only in the worker thread.
What if I want to create many worker threads and run a
copy of ODE in them. Is there a solution for that?
Thanks for the replies
--- "Jon Watte (ODE)" <hplus-ode at mindcontrol.org>
wrote:
>
> ODE is not thread safe. If you only ever call ODE
> from that other
> thread, then it "might" be safe, but any problems
> you run into probably
> will be new, exciting, and up to you to debug :-)
>
> Also, note that ODE can be very stack hungry, and a
> new thread may not
> get as much stack as the main thread. There are some
> defines you can
> turn on to use malloc() instead of alloca() to make
> this less of a problem.
>
> Cheers,
>
> / h+
>
>
> Vrej Melkonian wrote:
> > I tried running ODE in a separate thread (using
> > _beginthread) but it crashed after a couple of
> seconds
> > into the simulation.
> >
> > I'm using ODE 0.5, compiled as a DLL, VC++6,
> > multithreaded DLL, debug version
> >
> > ode\src\step.cpp,
> >
> >
>
//****************************************************************************
> > // an optimized version of dInternalStepIsland1()
> >
> > void dInternalStepIsland_x2 (dxWorld *world,
> dxBody *
> > const *body, int nb,
> > dxJoint * const *_joint, int nj, dReal
> > stepsize)
> >
> >
> > At the line
> >
> > // no feedback is required, let's compute cforce
> the
> > faster way
> > MultiplyAdd1_8q1 (cforce + 8*b1->tag,JJ,
> > lambda+ofs[i], info[i].m);
> >
> > where b1 is 0x00000000
> >
> > Any ideas?
> >
> >
> >
> > __________________________________
> > Yahoo! FareChase: Search multiple travel sites in
> one click.
> > http://farechase.yahoo.com
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> >
>
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
More information about the ODE
mailing list