magma_dprint_gpu

12 views
Skip to first unread message

aran nokan

unread,
Apr 18, 2021, 3:52:40 PM4/18/21
to MAGMA User
Hi,

I have a problem when printing submatrices. If I start from dA(0,0) it is working fine, but If I want to print from dA(nb, k) it will jump to somewhere on top of the matrix which is wrong.
dA a matrix 8nbX8nb
magma_dprint_gpu(nb, nb, dA(0,0), ldda, queue); work fine
magma_dprint_gpu(nb, nb, dA(nb,0), ldda, queue); wrong result

Do you have any idea?

Regards,
AK

Stanimire Tomov

unread,
Apr 18, 2021, 4:28:24 PM4/18/21
to aran nokan, MAGMA User
Hi AK,

Thanks for the report. I just checked the routine but can not reproduce any problems with it.
I checked it with a small modification of testing_dprint to print sub-matrices. By default 
it will print a CPU and a GPU matrix (comment the #define REDIRECT, otherwise will compare
with a predefined file) , e.g.,

./testing_dprint -n 10,10

M = 10 , N = 10

A=[
   0.       0.0100   0.0200   0.0300   0.0400   0.0500   0.0600   0.0700   0.0800   0.0900
   1.0000   1.0100   1.0200   1.0300   1.0400   1.0500   1.0600   1.0700   1.0800   1.0900
   2.0000   2.0100   2.0200   2.0300   2.0400   2.0500   2.0600   2.0700   2.0800   2.0900
   3.0000   3.0100   3.0200   3.0300   3.0400   3.0500   3.0600   3.0700   3.0800   3.0900
   4.0000   4.0100   4.0200   4.0300   4.0400   4.0500   4.0600   4.0700   4.0800   4.0900
   5.0000   5.0100   5.0200   5.0300   5.0400   5.0500   5.0600   5.0700   5.0800   5.0900
   6.0000   6.0100   6.0200   6.0300   6.0400   6.0500   6.0600   6.0700   6.0800   6.0900
   7.0000   7.0100   7.0200   7.0300   7.0400   7.0500   7.0600   7.0700   7.0800   7.0900
   8.0000   8.0100   8.0200   8.0300   8.0400   8.0500   8.0600   8.0700   8.0800   8.0900
   9.0000   9.0100   9.0200   9.0300   9.0400   9.0500   9.0600   9.0700   9.0800   9.0900
];
dA=[
   0.       0.0100   0.0200   0.0300   0.0400   0.0500   0.0600   0.0700   0.0800   0.0900
   1.0000   1.0100   1.0200   1.0300   1.0400   1.0500   1.0600   1.0700   1.0800   1.0900
   2.0000   2.0100   2.0200   2.0300   2.0400   2.0500   2.0600   2.0700   2.0800   2.0900
   3.0000   3.0100   3.0200   3.0300   3.0400   3.0500   3.0600   3.0700   3.0800   3.0900
   4.0000   4.0100   4.0200   4.0300   4.0400   4.0500   4.0600   4.0700   4.0800   4.0900
   5.0000   5.0100   5.0200   5.0300   5.0400   5.0500   5.0600   5.0700   5.0800   5.0900
   6.0000   6.0100   6.0200   6.0300   6.0400   6.0500   6.0600   6.0700   6.0800   6.0900
   7.0000   7.0100   7.0200   7.0300   7.0400   7.0500   7.0600   7.0700   7.0800   7.0900
   8.0000   8.0100   8.0200   8.0300   8.0400   8.0500   8.0600   8.0700   8.0800   8.0900
   9.0000   9.0100   9.0200   9.0300   9.0400   9.0500   9.0600   9.0700   9.0800   9.0900
];

We know how these are initialized and the print is correct. If I add for example 5x5 sub matrix starting at A(5,0),

printf( "A(5:10, 0:5=" );
magma_dprint( 5, 5, hA+5, lda );

printf( "dA(5:10, 0:5=" );
magma_dprint_gpu( 5, 5, dA+5, ldda, opts.queue );

The output is:
 
A(5:10, 0:5=[
   5.0000   5.0100   5.0200   5.0300   5.0400
   6.0000   6.0100   6.0200   6.0300   6.0400
   7.0000   7.0100   7.0200   7.0300   7.0400
   8.0000   8.0100   8.0200   8.0300   8.0400
   9.0000   9.0100   9.0200   9.0300   9.0400
];
dA(5:10, 0:5=[
   5.0000   5.0100   5.0200   5.0300   5.0400
   6.0000   6.0100   6.0200   6.0300   6.0400
   7.0000   7.0100   7.0200   7.0300   7.0400
   8.0000   8.0100   8.0200   8.0300   8.0400
   9.0000   9.0100   9.0200   9.0300   9.0400
];

which is also correct.

Do you have some similar example where you see wrong results so that we can reproduce?
Note that we can not check bounds if they are wrong, e.g., if matrix is 10x10, lda=10, 
and you give to print say a 5x5 sub-matrix starting at A(7,0).

Thanks,
Stan



--
You received this message because you are subscribed to the Google Groups "MAGMA User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magma-user+...@icl.utk.edu.
To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/magma-user/CAKHt_Ya%2BRFOSsE8cfYAaOmXXnWresdu2pZ774oOntA0AOmqACw%40mail.gmail.com.

Mark Gates

unread,
Apr 19, 2021, 9:35:49 AM4/19/21
to aran nokan, MAGMA User
Hi Aran,

How are you computing dA( nb, 0 )? I assume you have some macro to compute that – just want to verify that the macro is correct. Also, what specific values do you have for the size of dA (m x n), nb, and ldda?

Mark
Reply all
Reply to author
Forward
0 new messages