Subject: Re: [ublas] numeric bindings nrm2 differences
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2011-11-29 07:53:07
There are tests for this functionality, and the blas1 functionality is the one most likely to break on different os/compiler combinations, due to a wide array of return conventions.
If you tell me your fortran and c++ compiler (or whether you use clapack, ATLAS, MKL, ACML, or the optimized OS-X libs), I could tell you the used return convention.
The opinion of Karl Meerbergen on this issue (in the past) was that his measurements show no advantages of using blas1 routines over normal C++ code optimized by a compiler. So he questioned whether trying to support this chaos of return conventions is even necessary. (Is there any alternative to handling these differences via macros that the user has to define in order to indicate the compiler/library combination used?)
In conclusion, even so it should be possible to find out what goes wrong in your case, avoiding blas1 calls might be the better option for you. (Despite this, I still think that it's a good thing that the bindings try to be able to also bind "challenging" fortran function signatures.)
From: ublas-bounces_at_[hidden] [mailto:ublas-bounces_at_[hidden]] On Behalf Of Kraus Philipp
Sent: Tuesday, November 29, 2011 12:33 PM
To: ublas mailing list
Subject: [ublas] numeric bindings nrm2 differences
Hello I'm using the numeric bindings to call ATLAS / LAPack functions.
If I use the boost::numeric::bindings::blas::nrm2 method, I get a numeric difference.
I'm running the nrm2 command with a double datatyp I get the values:
If I run the same data values on Matlab (Matlab uses also Boost & ATLAS / LAPack) I get:
Does the nrm2 call delegate to the ATLAS nrm2 (cblas) ? So the numeric binding is a wrapper structure only for the ATLAS calls?
I try to find out which part creates this numeric difference, because the difference creates a big problem within my algorithm
I have tested the code under OSX and Linux x64 and on both systems the problem is still be found.
Thanks a lot