<font><font face="verdana,sans-serif">I forgot to mention that this stems from using vtkLandmarkTransform.</font></font><br><br><div class="gmail_quote">2012/1/31 Dženan Zukić <span dir="ltr"><<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font><font face="verdana,sans-serif">This is the end of the command line (there are a lot of /I and /D options before):<br>
<span style="font-family:courier new,monospace">/D "_MBCS" /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fp"Spine.dir\Release\Spine.pch" /Fa"Release" /Fo"Spine.dir\Release\" /Fd"D:/Repo/Spine/Release/Spine.pdb" /Gd /TP /errorReport:queue</span><br>
There are also "Additional options": <span style="font-family:courier new,monospace">/Zm1000 /bigobj /bigobj </span><br><br>But this alone does not cause the Jacobi warning. It happens with one poly model I use.<br>
<br>At the warning point, matrix "a" is usually full of NaNs:<br>-1.#QNAN -1.#QNAN -1.#QNAN -1.#QNAN<br>-1.#QNAN -1.#QNAN -1.#QNAN -1.#QNAN<br>-1.#QNAN -1.#QNAN -1.#QNAN -1.#QNAN<br>-1.#QNAN -1.#QNAN -1.#QNAN -1.#QNAN<br>
<br></font></font><font><font face="verdana,sans-serif">Here is one offending matrix:<br>-20.432407408240863 -6.916861332864527 4.552990997176626 24.110079331569615 <br>-6.916861332864527 -0.14227080645425705 -11.855738368063925 -17.76674202740249 <br>
4.552990997176626 -11.855738368063925 12.501563019018828 10.426774322765672 <br>24.110079331569615 -17.76674202740249 10.426774322765672 8.0731151956762908 <br></font></font><br>Here is another:<br>-20.908967195946744 -7.4695433223552188 4.3289567952431929 24.110079331569615 <br>
-7.4695433223552188 0.33428898125162654 -11.855738368063925 -17.990776229335921 <br>4.3289567952431929 -11.855738368063925 12.978122806724711 10.979456312256364 <br>24.110079331569615 -17.990776229335921 10.979456312256364 7.5965554079704081 <br>
<br>Also, the numbers are different each time I run my program, with all the conditions being identical.<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">2012/1/31 David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the info. Can you post your compiler optimization flags to<br>
the list? There is definitely a problem with JacobiN that needs to be<br>
fixed. The fix should be very easy to do if we can get a matrix that<br>
reliably causes JacobiN to fail when certain optimization flags are<br>
used, so if either of you can print out such a matrix (with all<br>
numbers printed with a precision of 20 digits), it would be a big<br>
help.<br>
<br>
- David<br>
<br>
<br>
2012/1/31 Dženan Zukić <<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>>:<br>
<div><div>> I also saw this warning recently, from the block that "never gets called".<br>
> And it only happened in release version of my program.<br>
><br>
> On Tue, Jan 31, 2012 at 00:48, Maarten Beek <<a href="mailto:beekmaarten@yahoo.com" target="_blank">beekmaarten@yahoo.com</a>> wrote:<br>
>><br>
>> Hi David,<br>
>><br>
>> Ai, seems these crashes are hard to get rid off....<br>
>><br>
>> I currently use VTK within Amira modules.<br>
>><br>
>> I changed the type of vtkPoints from the default VTK_FLOAT to VTK_DOUBLE<br>
>> when I convert an Amira object to a VTK object. This reduces the occurrences<br>
>> of the errors, but doesn't solve the issue.<br>
>> (Ps: why is the default in vtkPoints still float, while everywhere else<br>
>> floats were changed into doubles a long while ago?)<br>
>><br>
>> I don't really know much about different optimizations, so I just<br>
>> copy-paste what I found in MSVS:<br>
>><br>
>> I build my VTK with:<br>
>> /O2 /Ob2 /FD /EHsc /MD /Fo"vtkCommon.dir\Release\\"<br>
>> /Fd"G:\vtk-5.6.0\build_vs90_noQt\bin\Release/vtkCommon.pdb" /W4 /nologo /c<br>
>> /TP /errorReport:prompt/Zm 1000 and a couple of '/I'-s and '/D'-s<br>
>><br>
>> I build my Amira modules with:<br>
>> /O2 /Ob1 /Oi /Oy /GF /FD /EHsc /MD /GS- /Gy /fp:fast /openmp<br>
>> /Fo"./../../obj/arch-Win64VC9-Optimize/GraphPackage/"<br>
>> /Fd"./../.././bin/arch-Win64VC9-Optimize/GraphPackage.pdb" /W3 /nologo /c<br>
>> /Zi /wd4068 /wd4305 /wd4018 /wd4244 /wd4800 /wd4275 /wd4251<br>
>> /errorReport:prompt and a couple of '/I'-s and '/D'-s<br>
>><br>
>> I am working on getting vtkMath::JacobiN to print the matrix in the<br>
>> if-loop that 'gets never called' using vtkGenericWarningMacro to avoid<br>
>> having to include Amira stuff. Having a hard time getting that to work. (<br>
>> char* test = "hello";vtkGenericWarningMacro( test ); won't do the trick).<br>
>> Any suggestions?<br>
>><br>
>> Maarten<br>
>><br>
>> ________________________________<br>
>> From: David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>><br>
>> To: Maarten Beek <<a href="mailto:beekmaarten@yahoo.com" target="_blank">beekmaarten@yahoo.com</a>><br>
>> Cc: VTK list <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
>> Sent: Monday, January 30, 2012 2:31:38 PM<br>
>> Subject: Re: [vtkusers] ICP Error: vtkMath::Jacobi: Error extracting<br>
>> eigenfunctions<br>
>><br>
>> Hi Maarten,<br>
>><br>
>> I think there are two issues here, one is that vtkLandmarkTransform<br>
>> should have a check as you have described, but another potentially<br>
>> serious issue is that, as far as I understand it, JacobiN should never<br>
>> fail. I did a google search and found a message from 2002 by the<br>
>> Numerical Recipes authors stating that the NR Jacobi code can become<br>
>> numerically unstable due to certain compiler optimizations. I'm<br>
>> guessing that certain compiler optimizations could similarly make the<br>
>> VTK Jacobi code become unstable.<br>
>> <a href="http://www.nr.com/forum/showthread.php?p=4913" target="_blank">http://www.nr.com/forum/showthread.php?p=4913</a><br>
>><br>
>> Can you provide info about your compiler/flags etc? Also, is it<br>
>> possible to get your code to print a matrix that causes JacobiN to<br>
>> fail?<br>
>><br>
>> - David<br>
>><br>
>><br>
>> On Mon, Jan 30, 2012 at 9:44 AM, Maarten Beek <<a href="mailto:beekmaarten@yahoo.com" target="_blank">beekmaarten@yahoo.com</a>><br>
>> wrote:<br>
>> > Hi all,<br>
>> ><br>
>> > I get the following warning when using ICP:<br>
>> ><br>
>> > vtkMath::Jacobi: Error extracting eigenfunctions<br>
>> ><br>
>> > It comes from vtkMath::vtkJacobiN that calculates the eigenvalues,<br>
>> > -vectors<br>
>> > of a matrix.<br>
>> > The function returns 0, when this error occurs (otherwise 1), but<br>
>> > vtkLandmarkTransform doesn't check for the return value and thus uses<br>
>> > undefined values for the eigenvalues, -vectors.<br>
>> > This means my point set becomes invalid.<br>
>> > I believe the way to avoid this error is to 'giggle' the coordinates a<br>
>> > little when it happens, but how can I intervene when<br>
>> > vtkLandmarkTransform<br>
>> > stubbornly uses whatever values it gets from vtkMath::vtkJacobiN?<br>
>> > Is there a way to intercept the error message?<br>
>> ><br>
>> > I also noticed that if I apply ICP on A and B1 resulting in the error<br>
>> > message, applying ICP on A and B2 (loading the same data file that gives<br>
>> > me<br>
>> > B1) works fine. I don't see vtkMath::vtkJacobiN using a random number or<br>
>> > doing something similar, which makes me believe the error message I get<br>
>> > is<br>
>> > due to floating point accuracy? Even more a reason to think that<br>
>> > 'giggling'<br>
>> > might work (if I were able to intervene before the invalid transform is<br>
>> > applied to my data...)<br>
>> ><br>
>> > Thanks - Maarten<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>