[BUG, Fixed] (d/s)potrf_batched doesn't send back errors

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
vishwakftw
Posts: 11
Joined: Mon Dec 10, 2018 2:32 am

[BUG, Fixed] (d/s)potrf_batched doesn't send back errors

Post by vishwakftw » Wed Feb 06, 2019 6:55 am

Hi,

I'm using MAGMA to perform Cholesky decomposition on batches of matrices.

While passing the batched routine matrices that are not positive definite, it doesn't seem to be passing back the errors as expected. However, the single batch version of this routine (d/spotrf_gpu) does it correctly for individual matrices in the batch, and flags such inputs.

Can someone look into this and confirm this behavior?

Best,

Vishwak
Last edited by vishwakftw on Sun May 12, 2019 11:43 pm, edited 2 times in total.

abdelfattah83
Posts: 8
Joined: Mon Dec 10, 2018 3:02 pm

Re: [BUG] (d/s)potrf_batched doesn't send back errors

Post by abdelfattah83 » Wed Apr 24, 2019 4:24 pm

Can you please give some details about your specific test case.

I have tried some simple tests on my side, which seem to be always detected. Sometimes the value of info is not returned correctly (a non-zero value, but pointing to the wrong column/diagonal) but the routine always catches the error. The error in the value of info will be fixed soon.

Ahmad

vishwakftw
Posts: 11
Joined: Mon Dec 10, 2018 2:32 am

Re: [BUG] (d/s)potrf_batched doesn't send back errors

Post by vishwakftw » Wed May 08, 2019 10:56 am

Hi Ahmad,

Thank you for the message.

The specific case where I see that the error code is not sent back correctly is when you have a constant matrix.

I verified that this is not working correctly by modifying the tests for magma_dpotrf_batched. When I initialize the matrix with 1 at every entry, the MAGMA tests pass whereas the LAPACK tests fail.

I defined this method:

Code: Select all

void magma_dmake_cons( magma_int_t N, double* A, magma_int_t lda, double val )
{
    magma_int_t i, j;
    for ( i=0; i < N; ++i ) {
        for ( j=0; j < N; ++j ) {
            A(i,j) = val;
        }
    }
}
in magma_dutil.cpp, and initialized the matrices in the testing_dpotrf_batched using val = 1.

abdelfattah83
Posts: 8
Joined: Mon Dec 10, 2018 3:02 pm

Re: [BUG] (d/s)potrf_batched doesn't send back errors

Post by abdelfattah83 » Thu May 09, 2019 12:58 pm

Hi Vishwak,

Thank you for reporting this. I have committed a fix for reporting the correct info. Please check it out and let me know.

One of the reasons was NaN checking, which was missing from the panel factorization kernel. The way the kernel was written made it encounter NaNs when factorizing a constant matrix.

Ahmad

vishwakftw
Posts: 11
Joined: Mon Dec 10, 2018 2:32 am

Re: [BUG] (d/s)potrf_batched doesn't send back errors

Post by vishwakftw » Sun May 12, 2019 11:42 pm

Hi Ahmad,

Thank you for fixing this. I can confirm that it reports the correct error code now.

Best,

Vishwak

Post Reply