Page 1 of 1

magma_dgeqrf vs. magma_dgeqrf4

Posted: Mon Sep 16, 2013 5:39 am
by christianHEL
I am using MAGMA v1.4 with MKL, CUDA v5.5 and 2 Tesla M2070 GPUs. I am getting wrong results for matrices larger than 6000x6000 when using the magma_dgeqrf() function (with 1 GPU). I am comparing the solution to the corresponding dgeqrf() function in MKL. Interestingly, the results are correct when using the magma_dgeqrf4() with either 1 or 2 GPUs.

Re: magma_dgeqrf vs. magma_dgeqrf4

Posted: Mon Sep 23, 2013 12:32 pm
by mgates3
When you say you're comparing results to MKL, do you mean you're doing something like this?

Code: Select all

  A1 = your matrix
  A2 = A1
  normA = norm( A1 )
  magma_dgeqrf( ... A1 ... )
  mkl_dgeqrf( ... A2 ... )
  R = A1 - A2   // where A1 and A2 are the result of geqrf
  error = norm( R ) / normA
What error do you get? Can you reproduce this problem using the MAGMA tester, testing_dgeqrf? This actually implements two different tests. The -c flag will do || R - Q^T A || and ||I - Q^T Q||. The -c2 flag will do ||A1 - A2||, as above.

Code: Select all

./testing_sgeqrf -c
./testing_sgeqrf -c2
Note that the QR factorization is not unique -- it's possible to have two different, correct QR factorizations of the same matrix. So directly comparing the QR factorizations may indicate an error when none is present. However, our experience is that MAGMA and MKL produce the same QR factorization, since we use MKL for factoring panels.

-mark