Very simple example fails

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
laurentiuduca
Posts: 5
Joined: Wed Dec 17, 2014 4:37 am

Very simple example fails

Post by laurentiuduca » Wed Dec 24, 2014 7:51 am

Hello,

I have made a few very simple examples to solve an Ax=b system and
some of them fails both in MAGMA and LAPack Intel MKL (the functions
does not give a solution and return info=3).
I would be grateful for any help.
Please find attached the code.
testing_magma_dgesv_gpu.cpp
(2.78 KiB) Downloaded 96 times
Thank you,
Laurentiu

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: Very simple example fails

Post by mgates3 » Wed Dec 24, 2014 10:12 pm

Per the LAPACK and MAGMA documentation:

Code: Select all

           INFO
                     = 0:  successful exit
                     < 0:  if INFO = -i, the i-th argument had an illegal value
                     > 0:  if INFO = i, U(i,i) is exactly zero. The factorization
                           has been completed, but the factor U is exactly
                           singular, and division by zero will occur if it is used
                           to solve a system of equations.
Having info = 3 means that the matrix is singular, i.e., there is no unique solution to Ax = b. You can see this because the 3rd row is a linear combination of the first two rows:
2 * [ 1, 1, 1 ] - [ 0, 1, 1 ] = [ 2, 1, 1 ]

Note that the LU factorization is actually successful, but U has a zero on the diagonal, so it isn't useful for solving Ax = b.

-mark

Post Reply