- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page