[Pw_forum] lapack error in efg calculation

Paolo Giannozzi giannozz at nest.sns.it
Thu Mar 17 11:15:07 CET 2005

On Wednesday 16 March 2005 20:07, Lilong Li wrote:

>            write (stdout, *) 'paw_nl(',l,nt,')',paw_nl(l,nt)
>            call invmat (paw_nl(l,nt), s, sinv, norm)
> It fails when another atom only has the largest l number of 1.
> paw_nl(2,nt) would then be zero when it calls invmat, and the N
> and LDA will also be zero when invmat calls DGETRF.

this is obviously wrong

> Any suggestions to solve the problem?

try to put the problematic piece of code into an if...endif block, like this:

do l=0,paw_lmaxkb
   if (paw_nl(l,nt) > 0) then
      allocate (s(paw_nl(l,nt),paw_nl(l,nt)))
      allocate (sinv(paw_nl(l,nt),paw_nl(l,nt)))
   end if
end do

Paolo Giannozzi             e-mail:  giannozz at nest.sns.it
Scuola Normale Superiore    Phone:   +39/050-509876, Fax:-563513 
Piazza dei Cavalieri 7      I-56126 Pisa, Italy

More information about the users mailing list