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?

Thanks.

David.

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.

Hi.

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.

David.

David,

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.

Tim

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya