Numerical differences in DGELSS between identical calls

Numerical differences in DGELSS between identical calls

When calling DGELSS multiple times with the same arguments, I find that the results of the FIRST call differ ever so slightly from subsequent calls which are all indentical. Typically, the differences are in the last couple of digits.

I have not found such problems with any other MKL functions.

I am using MKL7.0 on Windows XP Pro, Pentium IV 3Ghz. Visual C++ 7.1

Perhaps MKL is altering the floating point precision via the _controlfp / control87 functions?



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

Assuming that you are using the P4 library, are you passing data with identical alignments? If not, supposing that you are declaring your data in C, try __declspec(align 16) declarations.


Yes I'm using the P4 kernel. I'm also developing in C++.

The data and workspace are in new'ed arrays - which are not always 16 bit aligned. When I replaced the new with an _aligned_malloc the problem disappeared.

Thanks for your help.



Yes, I think the MKL documents mention the possibility of better performance with aligned arguments, but perhaps not the possibility of slightly different round-off where mis-alignment requires more serial operations. Glad to hear that you found a reasonable solution.


Leave a Comment

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