SVD illegal instruction

SVD illegal instruction

I wrote a pseudoinverse using the dgesvd routine, and it works for small matrices. At size = 9X9 or larger, it crashes with illegal instruction "movups" on windows 2000, visual studio 6, and older mkl (5.3 I think). The 'context' of the error is inside dswap in Blas(called by svd???). I am writing in C.

Any fix / comments?
I could post the code, if needed, but this seems like a lib problem.

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Its mkl 5.2

The problem was random numbers -- the matrix was filled with calls to rand() and became numerically bad (I was timing different sizes). It works with rand()/rand() or magic squares or other sensible matrices. I am ok with that -- our matrices are from a controls algorithm and are well conditioned. So the problem may guide the developers toward a possible problem with an assembler instruction butno fix is required on my end.

CPUs since P-III and Athlon should accept this instruction, unless you have disabled SSE in the BIOS. Did you run with bounds checking to see if you were over-writing memory, which could cause various bad things to happen?

I did not run with checking (how do you turn that on in C?), but that cannot be it -- I have allocated all the locations to be 300*300 (so any size that multiplies to that or less is fine) and the explosion was on a 10*10. It has to be a problem with complex eigenvalues or something along those lines (I am not using complex, as in the end this will not be an issue, everythign is 'double'). Also, the same code works find on other matrices of the same size, and I tested it on a 100*100 identity matrix and that works as well. Whenever the numerics do *something* (I have not yet chased down the exact cause) it does the illegal instruction, mostly on random double arrays of large size (filled with rand/rand witha fix for the0 division). I do not know about that bios settingbut I will take a look. do you want a stripped down code that creates this?

Or it could just be that sse does not exist on this aged amd processor... its a amd thunderbird @1ghz. The bios does not have an option for it. If thats the case, I'm in good shape -- I just grabbed the mlk because we had it and I didn't want to build all of lapack just to get two or three functions. The end target is linux and we will buildlapack over there.

An illegal instruction means that there is a mismatch between the library you are using and the processor you are using. For a library as old as the one you are using you have to choose the processor support. You can try linking in mkl_def.lib, which uses nothing but x87 instructions and should execute on any X86 processor.

If you were to update your software to MKL 7.2.1 (the latest release) you would not have this issue since the library selects at run time the best code to run on your processor.

Bruce

Ok thanks. For the 3 functions I need(and the code is done now), upgrading is overkill. If our requirements change I certainly will get a newer version, and hopefully a new computer to go with it.

Leave a Comment

Please sign in to add a comment. Not a member? Join today