3 Replies Latest reply on Sep 13, 2012 2:14 PM by amd_chip

    BUG in ACML 4.4 (ZDOTC & ZDOTU)


      ZDOTC and ZDOTU methods in ACML 4.4 are not return result of dot product operation.


      Microsoft Vistual C++ (Studio 2010), ACML ifort32 or pgi32:


      static const doublecomplex x[]= { {1,2}, {3,-4}, {-5,6} };

      static const doublecomplex y[]= { {10,9}, {-6,5}, {2,1} };

      static const int n

      = 3;

      static const int inc1

      = 1;



      doublecomplex r = {0, 0};

      static const doublecomplex r_ETHALON = {-22, 75};

      ZDOTC( &r, const_cast<int*>(&n), const_cast<RMT_BLASSLAPACK_COMPLEX_DOUBLE*>(x), const_cast<int*>(&inc1), const_cast<RMT_BLASSLAPACK_COMPLEX_DOUBLE*>(y), const_cast<int*>(&inc1) );


      in this example r is always zero.

      P.S.: r_ETHALON is correct answer.

        • Re: BUG in ACML 4.4 (ZDOTC & ZDOTU)

          Can someone test this code with other versions of libraries?


          I think in version 4.4, these methods have misunderstood the order of the input parameters.

          Disassembly shows that ZDOTC and ZDOTU try to read the length of the vectors (n) from the first parameter, although there is stored address of the variable result.


          It is very important to me, because with this bug I can not use ACML in my x86 code.