Using MAGMA GPU library

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Posts: 2
Joined: Fri Jan 11, 2019 12:14 am

Using MAGMA GPU library

Post by Aidonithith » Fri Jan 11, 2019 12:19 am


Sorry if I chose the wrong section to post my question. My question is related to MAGMA library usage in the code. After compilation my abinit crashes and reports:

Code: Select all

On entry to magma_zhegvd, parameter 11 had an illegal value (info = -11)
--- !ERROR
src_file: abi_xhegv.f90
src_line: 170
mpi_rank: 0
message: |
    Problem in abi_xhegv, info= -11
In the file /abinit-8.8.2/src/28_numeric_noabirule/abi_xhegv.f90 (line 107 and below) we see

Code: Select all

lwork_=33*n + (n**2)
       call magmaf_zhegvd(itype,jobz,uplo,n,a,lda,b,ldb,w, work(1:2*lwork_),lwork_,rwork(1:lrwork_),lrwork_,iwork(1:liwork),liwork,info)
Parameter 11 is lwork_. What is lwork_ and why do we need it? Why lwork is not used here? What is 33*n+n**2? There is no such expression in the MAGMA documentation. What if 2*lwork_ is larger than work extent?

Posts: 902
Joined: Fri Jan 06, 2012 2:13 pm

Re: Using MAGMA GPU library

Post by mgates3 » Tue Apr 23, 2019 4:51 pm

lwork is the length of the work array that is passed to MAGMA's routine. Per the documentation, it should be:

Code: Select all

     -      If JOBZ = MagmaNoVec and N > 1, LWORK >= N + N*NB.
     -      If JOBZ = MagmaVec   and N > 1, LWORK >= max( N + N*NB, 2*N + N**2 ).
            NB can be obtained through magma_get_zhetrd_nb(N).
I guess whoever wrote abi_xhegv.f90 assumed that NB = 33, but that is a bad assumption. It should be queried as described in the documentation above.


[Sorry for the delay in posting. A misconfiguration left messages in the moderation queue.]

Post Reply