help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave 3.6.4 VS2010 and the C++ API


From: Mike Puglia
Subject: Re: Octave 3.6.4 VS2010 and the C++ API
Date: Wed, 25 Sep 2013 07:55:18 -0700 (PDT)

Thanks for the help.  It is much appreciated.  I installed OpenBlas with both builds, which seemed to be recommended.  I'll try some of the other libraries out and see if they work.  It seems I might need to reinstall though, as only one library can be chosen during installation.  Do you know of an easier way?

Regarding the m-files, I don't think it is working at the command line.  I get the same behavior as with the oct file.  2x2 matrix multiplication works but the special case does not.  The following snippet works on the MINGW build, but not VS2010:

e0 = complex(0,0)
e1 = complex(1,1)
a = [e0 e1; e0 e1]
b = [e0 e0; e1 e1]
c = a*b
d = a(1,:)*b(:,1)

The octave output on the VS2010 build is:

c =

   0 + 2i   0 + 2i
   0 + 2i   0 + 2i

d =  0.0000e+000 + 5.7929e-195i


From: Michael Goffioul <address@hidden>
To: Mike Puglia <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Wednesday, September 25, 2013 9:37 PM
Subject: Re: Octave 3.6.4 VS2010 and the C++ API




On Wed, Sep 25, 2013 at 7:55 AM, Mike Puglia <address@hidden> wrote:
Hi Michael,

I think I've found the source of the complex matrix multiplication problem I'm having.  The xgemm function in CMatrix.h tests a couple cases before executing a LAPACK function to do the multiplication.  For most cases, ZGEMM is called and this works correctly in all builds.  However, if a 1xn matrix A is multiplied by a nx1 matrix B, as in c = A*B, XZDOTU is called instead and in the VS2010 build the result is not always (ever?) correct.  The octfile below should reproduce the problem.

It seems that this is a problem with the BLAS/LAPACK/ATLAS package being used in the VS2010 build.  Does this sound correct?  (I've never understood the difference between these three things, so maybe now is a good time to learn.)  There are some posts from 2007/08 that touch on this issue with XZDOTU.  Any information you might have about the packages used in the build (or how to find that information) would be greatly appreciated.



I didn't have time yet to investigate. But what surprizes me is that I would expect the same code path to be used for complex matrix multiplication in plain m-files.

That being said, it may be a problem of calling convention and returning a double complex object. What numerical library did you chose during installation? (OpenBLAS, ATLAS, Generic). Could you try if the problem exists with other flavours of the numerical libraries?

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]