Re: Fwd: AMD x86_64 dMassCheck() and bNormalizationResult errors
"Bram Stolk" <[email protected]> Mon, 19 Nov 2007 07:22:34 -0800
| Newsgroups | gmane.comp.lib.ode |
|---|---|
| Message-ID | <[email protected]> |
--===============2086906666== Content-Type: multipart/alternative; boundary="----=_Part_19305_32285513.1195485754328" ------=_Part_19305_32285513.1195485754328 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Nov 19, 2007 12:18 AM, Funky Fred <[email protected]> wrote: > > Ok, narrowed it down a bit more. Looks like the body->avel value in > dxStepBody is NaN. > I stepped through things a little bit more and narrowed it down to the > dxQuickStepper call @868 in quickstep.cpp > If I'm reading the gdb output right (it's getting late). It looks like the > dMULTIPLYADD0_331 macro/function is doing it. Looking at the code, a logical cause for this would be a zero mass, causing a NaN body_invMass; I expect that if you do an... ASSERT(!dIsNan(body[i]->invMass)); ...in that code, it will be triggered. Bram // compute the velocity update: // add stepsize * invM * fe to the body velocity IFTIMING (dTimerNow ("compute velocity update");) for (i=0; i<nb; i++) { dReal body_invMass = body[i]->invMass; for (j=0; j<3; j++) body[i]->lvel[j] += stepsize * body_invMass * body[i]->facc[j]; for (j=0; j<3; j++) body[i]->tacc[j] *= stepsize; dMULTIPLYADD0_331 (body[i]->avel,invI + i*12,body[i]->tacc); } -- Zapp: Captain's log, stardate...er.. Kif: Ohhh. April 13th. Zapp: April 13th. Point 2. ------=_Part_19305_32285513.1195485754328 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Nov 19, 2007 12:18 AM, Funky Fred <<a href="mailto:[email protected]">[email protected]</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>Ok, narrowed it down a bit more. Looks like the body->avel value in dxStepBody is NaN.<br>I stepped through things a little bit more and narrowed it down to the dxQuickStepper call @868 in quickstep.cpp<br>If I'm reading the gdb output right (it's getting late). It looks like the dMULTIPLYADD0_331 macro/function is doing it. </blockquote><div><br>Looking at the code, a logical cause for this would be a zero mass, causing a NaN body_invMass;<br><br>I expect that if you do an...<br>ASSERT(!dIsNan(body[i]->invMass));<br>...in that code, it will be triggered. <br><br> Bram<br><br><br> // compute the velocity update:<br> // add stepsize * invM * fe to the body velocity<br><br> IFTIMING (dTimerNow ("compute velocity update");)<br> for (i=0; i<nb; i++) { <br> dReal body_invMass = body[i]->invMass;<br> for (j=0; j<3; j++) body[i]->lvel[j] += stepsize * body_invMass * body[i]->facc[j];<br> for (j=0; j<3; j++) body[i]->tacc[j] *= stepsize; <br> dMULTIPLYADD0_331 (body[i]->avel,invI + i*12,body[i]->tacc);<br> }<br><br></div></div><br>-- <br>Zapp: Captain's log, stardate...er..<br>Kif: Ohhh. April 13th.<br>Zapp: April 13th. Point 2. ------=_Part_19305_32285513.1195485754328-- --===============2086906666== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ODE mailing list [email protected] http://ode.org/mailman/listinfo/ode --===============2086906666==--