Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

arom
 Posts: 12
 Joined: Wed Jun 27, 2012 3:22 am
Post
by arom » Tue Aug 07, 2012 6:06 am
Hi guys!
I work on a program in which I'd like to substitute ZHETRD function with MAGMAF_ZHETRD. After substitution I got error message with information that parameter 9 is invalid (length of work array). LAPACK documentation says
Code: Select all
LWORK is INTEGER
The dimension of the array WORK. LWORK >= 1.
For optimum performance LWORK >= N*NB, where NB is the
optimal blocksize.
in magma_zhetrd you have the sane comment on
lwork size, but strictly check if lwork>=n*nb
Code: Select all
} else if (lwork < nb*n && ! lquery) {
*info = 9;
}
such behaviour seems not to be good.

mgates3
 Posts: 913
 Joined: Fri Jan 06, 2012 2:13 pm
Post
by mgates3 » Tue Aug 07, 2012 3:21 pm
I've updated the MAGMA documentation to read:
Code: Select all
LWORK (input) INTEGER
The dimension of the array WORK. LWORK >= N*NB, where NB is the
optimal blocksize given by magma_get_zhetrd_nb().
Most MAGMA algorithms require the full workspace size using the optimal blocksize, even where LAPACK can do the computation slowly using a smaller workspace. GPUs require blocked algorithms for good efficiency, even more than CPUs do.
mark