Page 1 of 1

Bad Allocation error

Posted: Mon Feb 16, 2015 10:19 am
by abarry92
Hello,
I am trying to run a Forward Dynamics simulation on a model but it continues to fail due to a bad allocation error.
ForwardTool::run() caught exception
bad allocation
Printing results of investigation FULLHAND to../../OpenSim
Exception in forward: bad allocation
I assumed this error was happening because of the lack of memory on the computer I was using but when I moved it to a larger machine the error still persisted. The larger computer has 20 GBs of RAM and only about 4 are being used during the process.

Through my searches on this site I found that perhaps the program was running slowly due to the bushing forces I had input to my figure's joints. So I removed these forces and continuously received the following error with varying failure times with regards to step size and error tolerances:
ForwardTool::run() caught exception
SimTK Exception thrown at AbstractIntegratorRep.cpp:428:
Integrator step failed at time 0.000546394587733392 apparently because:
SimTK Exception thrown at AbstractIntegratorRep.cpp:547:
Error detected by Simbody method AbstractIntegrator::takeOneStep(): Unable to advance time past 0.000546395.
(Required condition 't1 > t0' was not met.)
I am quite lost as to what the problem here might be and any help would be greatly appreciated.

Thanks,
Alex

Re: Bad Allocation error

Posted: Mon Feb 16, 2015 10:20 am
by abarry92
Also I have tried running it through the Command Prompt but have produced identical results.

Re: Bad Allocation error

Posted: Mon Feb 16, 2015 11:22 am
by sherm
Hi, Alexander. This is likely to be due to a problem with your model. Possiblilities include massless or inertialess bodies, singular configurations, constraints that can't be satisifed, and force elements that are producing NaNs. The best way to debug these problems is to start with a very small subset of your model that is known to work, then systematically add back in the missing model components until you find one that causes the problem.

Sherm