[Pw_forum] lapack error in efg calculation

Lilong Li lilong at unc.edu
Wed Mar 16 20:07:02 CET 2005


Thanks for the tip that flib/invmat.f90 is called by PW/init_paw_1.f90.  
Here's what i found:

In init_paw_1.f90, there are the following lines

  do nt = 1, ntyp
     do nb = 1, paw_nbeta (nt)
        paw_nh (nt) = paw_nh (nt) + 2 * aephi(nt,nb)%label%l + 1
        paw_lmaxkb = max (paw_lmaxkb,  aephi(nt,nb)%label%l)
     enddo
     if (paw_nh (nt) .gt.paw_nhm) paw_nhm = paw_nh (nt)
  enddo

which set paw_lmaxkb to largest l number for all types of atoms. In my 
case it's 3.  Then in the same file,  There are the following lines,

        do l=0,paw_lmaxkb
           allocate (s(paw_nl(l,nt),paw_nl(l,nt)))
           allocate (sinv(paw_nl(l,nt),paw_nl(l,nt)))
           do ih=1,paw_nl(l,nt)
              n1=paw_iltonh(l,ih,nt)
              do jh=1,paw_nl(l,nt)
                 n2=paw_iltonh(l,jh,nt)
                 call step_f(aux,psphi(nt,n1)%psi(1:msh(nt)) * &
                      psphi(nt,n2)%psi(1:msh(nt)),r(:,nt),rs,rc,pow,msh(nt))
                 call simpson (msh (nt), aux, rab (1, nt), s(ih,jh))
              enddo
           enddo
           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.

Any suggestions to solve the problem?

Lilong

Paolo Giannozzi wrote:

>On Tuesday 15 March 2005 19:58, Lilong Li wrote:
>
>  
>
>>I got such an error when running efg.x
>>
>>  On entry to DGETRF parameter number 4 had an illegal value
>>    
>>
>
>DGETRF should be called by flib/invmat.f90, called by PW/init_paw_1.f90.
>Print the integer arguments to DGETRF. Electric field gradient calculation
>is implemented but not thoroghly tested
>
>  
>
>>I am ignorant to programming, so digging into the source code is not
>>a good choice
>>    
>>
>
>it is, if you want to know what you are calculating!
>
>Paolo
>_______________________________________________
>Pw_forum mailing list
>Pw_forum at pwscf.org
>http://www.democritos.it/mailman/listinfo/pw_forum
>  
>




More information about the Pw_forum mailing list