exclude_bands bug (and spinors with W90)
Posted: Mon May 23, 2016 10:08 pm
Hi,
there is a bug when running Wannier90 (or more precisely pw2wannier90) through EPW when exclude_bands are used. In this case the code crashes with SIGSEGV.
The reason is at the end of the computation of Mmn matrices (in pw2wan90epw.f90) in the code
Because if there are excluded bands the size of the two matrices is different, so the code is writing out of bounds.
Actually, this bug existed in an old version of pw2wannier90.f90 in library mode, but has since been fixed when we committed the new extended version to the QE repository:
If possible, I would strongly suggest to realign your code to the current pw2wannier90.f90 codebase. Even better, if I can suggest (even if I understand that this will take time) would be to use the same function calls - this could be a good occasion to factor out the common parts of the routines so pw2wannier90.f90 and EPW use the same code - mainly because if bugs or improvements are done in pw2wannier90, these will be also in EPW.
On a slightly different note: I want to use spin-orbit with EPW. I did not try to run the Pb example yet, but there you do not specify explicitly the spinors input flag (I guess the reason is that W90 is ignoring that flag when running in Library mode...). In my system, this is an issue because I have difficulties converging to the right Wannier functions - do you have an easy solution for this, i.e., to tell Pw2Wannier90 + Wannier90 to use the correct (spinor) projections?
Thanks!
Giovanni Pizzi
THEOS and MARVEL, EPFL, Switzerland
there is a bug when running Wannier90 (or more precisely pw2wannier90) through EPW when exclude_bands are used. In this case the code crashes with SIGSEGV.
The reason is at the end of the computation of Mmn matrices (in pw2wan90epw.f90) in the code
Code: Select all
DO n=1,nbnd
IF (excluded_band(n)) CYCLE
DO m=1,nbnd
IF (excluded_band(m)) CYCLE
m_mat(m,n,ib,ik_g)=Mkb(m,n)
ENDDO
ENDDO
Because if there are excluded bands the size of the two matrices is different, so the code is writing out of bounds.
Actually, this bug existed in an old version of pw2wannier90.f90 in library mode, but has since been fixed when we committed the new extended version to the QE repository:
Revision 10880 - Message:
Committed the new pw2wannier interface [...]
It includes the new features as spinor-projections,
and the evaluation of the matrix elements needed for the
calculation of spin and orbital magnetization
[...] Also includes a couple of bugfixes to the 'library' mode of
the interface
If possible, I would strongly suggest to realign your code to the current pw2wannier90.f90 codebase. Even better, if I can suggest (even if I understand that this will take time) would be to use the same function calls - this could be a good occasion to factor out the common parts of the routines so pw2wannier90.f90 and EPW use the same code - mainly because if bugs or improvements are done in pw2wannier90, these will be also in EPW.
On a slightly different note: I want to use spin-orbit with EPW. I did not try to run the Pb example yet, but there you do not specify explicitly the spinors input flag (I guess the reason is that W90 is ignoring that flag when running in Library mode...). In my system, this is an issue because I have difficulties converging to the right Wannier functions - do you have an easy solution for this, i.e., to tell Pw2Wannier90 + Wannier90 to use the correct (spinor) projections?
Thanks!
Giovanni Pizzi
THEOS and MARVEL, EPFL, Switzerland