Spin-coupled DOS and PDOS does not work in parallel
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Siesta | Status tracked in Trunk | |||||
4.1 |
Fix Released
|
High
|
Nick Papior | |||
Trunk |
Fix Released
|
High
|
Nick Papior |
Bug Description
(This is a re-opening of bug #1645749, which was only partially fixed --- in particular, the parallel operation issue was not solved. Thanks to Roberto Robles and Ramón Cuadrado)
The calculation of DOS and PDOS only works in serial. In parallel they are not calculated as controlled in subroutine init_projected_DOS of projected_DOS.F. However, the relevant routines (pdos2g, pdos2k, pdos3g, pdos3k) seem to consider a parallel run, but they give wrong results in their current form. For example, pdos3g gives correct results for the first two components, but wrong results for third and fourth (tested with the Pt2 example with magnetization oriented along x or y). It would be nice to do everything in parallel. For example, sometimes a finer grid of K-points is needed for smooth DOS, and the calculations can take quite some time.
This affects all versions, and the new full-SOC branch.
I am wondering whether this is due to line 177 in pdos3g?
LocalToGlobalOrb is called with iband =1:nuo*2, however, that is the band index, not the orbital index.
I.e. should probably be something like:
LocalToGlobalOr b((iband+ 1) / 2, ...,...,ibandg)
ibandg = (ibandg-1)*2 + mod(iband, 2)
Just a guess?