Hi Philipp,

 

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.)

 

Regards,

Thomas

 

 

From: ublas-bounces@lists.boost.org [mailto:ublas-bounces@lists.boost.org] 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:
1,89705246692049
1,34040265444338
1,51170579623667
1,83956751945403

If I run the same data values on Matlab (Matlab uses also Boost & ATLAS / LAPack) I get:
2,04932000000000
1,45494000000000
1,61857000000000

2,02891000000000 

 

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