[Q-e-developers] Undefined variables in espresso
Paolo Giannozzi
paolo.giannozzi at uniud.it
Mon Jun 10 10:16:04 CEST 2013
Hi Vittorio and Filippo and others
(please do not use any longer giannozz at democritos.it )
there is something wrong, but not in the "shape", but in the "size"
of arrays tbecsum and becsum. In fact:
- tbecsum is dimentioned "nspin_mag"
- the third dimension of becsum is "nspin". See allocate_nlpot.f90:
allocate (becsum( nhm * (nhm + 1)/2, nat, nspin))
- there is one case in which nspin_mag and npsin do not coincide.
From setup.f90:
nspin_mag = nspin
IF (nspin==4) THEN
IF (domag) THEN
...
ELSE
nspin_mag=1
ENDIF
ENDIF
I don't know how to fix it, though. AdC may know better.
In c6_tfvw.f90 there is also something clearly wrong
do i=1,mesh
pp(i) = pp(i) + pp(i-1)
end do
Likely this part of the code is no longer in use.
I don't think there is anything wrong in file O.pbe-rrkjus.UPF
Paolo
On Mon, 2013-06-10 at 15:38 +0800, Filippo Spiga wrote:
> Dear Vittorio,
>
> On Jun 10, 2013, at 2:47 PM, Vittorio Zecca <zeccav at gmail.com> wrote:
> > In addusdens.f90 line 104 there is a shape mismatch because tbecsum
> > has one element,
> > while becsum has four.
>
>
> 'tbecsum' is a one-dimentional array created to 'store' values of
> 'becsum' varying 'nspin_mag' (latest dimension of a three-dimensional
> array). It can have only one or two or four elements (it depends by
> the input case, see modules/noncol.f90). I said that 'becsum' is
> a three-dimensional array because inside the routine 'addusdens_g' the
> array 'becsum' comes from USPP (Modules/uspp.f90). If you look at the
> file you will see at line 136-137 that 'becsum' is defined as …
>
>
> REAL(DP), ALLOCATABLE :: &
> becsum(:,:,:) ! \sum_i f(i) <psi(i)|beta_l><beta_m|
> psi(i)>
>
>
> Dimensions across these arrays seems consistent to me. Searching
> across the source code I can find some four-dimensional "becsum"-like
> arrays but they also have different names…
>
>
> Carlo? Paolo? Anything to add?
>
>
> Regards,
> Filippo
>
> --
> Mr. Filippo SPIGA, M.Sc.
> http://www.linkedin.com/in/filippospiga ~ skype: filippo.spiga
>
> «Nobody will drive us out of Cantor's paradise.» ~ David Hilbert
>
>
--
Paolo Giannozzi, Dept. Chemistry&Physics&Environment,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
More information about the developers
mailing list