ternaus / quest-qmc

Automatically exported from code.google.com/p/quest-qmc
2 stars 11 forks source link

Wondering if there's a typo in dqmc_gtau.F90? #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In dqmc_gtau.F90 Line:182
allocate(tau%itau_up(nnb)) !which I think it should be
                           !allocate(tau%itau_up(nb))

In dqmc_gtau.F90 Line:299~302
do i = 0, nb - 1
   ! Pointers to sub-diagonal blocks (except when i=0)
   jsl  =  mod(isl+i*nor-1, L) + 1
   t(i+1) = jsl

t is a pointer that refers to tau%itau_up.
nnb = nb * n

So I assume that only the first nb elements are initialized in array t. And I 
further assume that tau%itau_up should be in the size of nb. Is that correct? 

Original issue reported on code.google.com by cmjiang1...@gmail.com on 23 Jan 2014 at 12:25

GoogleCodeExporter commented 9 years ago

Original comment by iglovi...@gmail.com on 23 Jan 2014 at 11:50

GoogleCodeExporter commented 9 years ago
Yes, it appears that only the first nb elements of itau_up/itau_dn are referred.
I think it is safe to redefine itau_up/itau_dn as an 1D array of size nb, 
because
we only need to know initial indices of each sub-block of A. These indices are
stored in itau_up/itau_dn. The rest can be worked out easily. 

Original comment by cxc639 on 7 Feb 2014 at 9:19

GoogleCodeExporter commented 9 years ago
After last comment, I believe that I fixed the bug in the revision cc56e18890a1 

Thank you for the bug report.

Original comment by iglovi...@gmail.com on 7 Feb 2014 at 11:35