convergence and memory issues in EPC

Post here questions linked with issue while running the EPW code

Moderator: stiwari

Post Reply
xxwu

convergence and memory issues in EPC

Post by xxwu »

Dear all,
I am trying to calculate the electron phonon coupling constant for cubic P. In the wannierize and phonon calculations, 8x8x8 kmesh and qmesh are used. I can perfectly reproduce the band structure and phonon spectrum in DFT. But the convergence of EPC constant is not good. I have plotted the lambda as a function of smearing for different kmesh and qmesh (see https://www.dropbox.com/s/ce1353m958m1dss/CubicP_EPW_lambda.png?dl=0). But the curves has never been flat when sigma approaches zero( I have used very dense kmesh and qmesh.). I have two questions?
(1) How to achieve the convergence in EPC calculation? Increase kmesh and qmesh continuously and see what happens ? But there is a limit in computer resources, sometimes the convergence seems impossible. How can we reach a relatively good convergence using limited computer resources?
(2) the memory issue. with 8x8x8 kmesh in wannierize calculations, I can obtain good band structure but the Fermi level and DOS at Ef differ from those in DFT. If I do calculations with 16x16x16 kmesh(I use 8x8x8 qmesh) in wannierize calculations, I can get very good DOS at Ef. However, now the code stops before writing *.epmatwp1 file. I think it is due to the exhaustion of memory. I have increased the number of cores and setted etf_mem = .false. but they donot work. With 16x16x16 kmesh, is there any other methods to reduce the memory?(I have used etf_mem=2, but I got an error in reading input).

Thanks in advance for the help!
Best wishes!
Xianxin Wu

My input in EPW

Code: Select all

&inputepw
  prefix      = 'CubicP_pbe'
  amass(1)    = 30.9740009308
  outdir      = './temp/'

  iverbosity  = 3

  elph        = .true.
!  epbwrite    = .false.
!  epbread     = .true.
  epbwrite    = .true.
  epbread     = .false.

  epwwrite    = .true.
  epwread     = .false.

  nbndsub     =  9
  nbndskip    =  0

  wannierize  = .true.
  num_iter    = 500
  iprint      = 2
!Ef=15.2443
  dis_win_max = 52
  dis_win_min= -10
  dis_froz_max=22
  proj(1)     = 'P:s;p;d'   

  wdata(1) = 'bands_plot = .true.'
wdata(2)= 'begin kpoint_path'
wdata(3)= 'R 0.500000000 0.50000000 0.50000000 G 0.000000000 0.00000000 0.00000000'
wdata(4)= 'G 0.000000000 0.00000000 0.00000000 X 0.500000000 0.00000000 0.00000000'
wdata(5)= 'X 0.500000000 0.00000000 0.00000000 R 0.500000000 0.50000000 0.50000000'
wdata(6)= 'R 0.500000000 0.50000000 0.50000000 M 0.500000000 0.50000000 0.00000000'
wdata(7)= 'M 0.500000000 0.50000000 0.00000000 G 0.000000000 0.00000000 0.00000000'
wdata(8)= 'G 0.000000000 0.00000000 0.00000000 X 0.500000000 0.00000000 0.00000000'
wdata(9)= 'X 0.500000000 0.00000000 0.00000000 M 0.500000000 0.50000000 0.00000000'
wdata(10)= 'end kpoint_path'
  wdata(11) = 'bands_plot_format = gnuplot'

!  elinterp    = .true.
!  phinterp    = .true.

!  tshuffle2   = .true.
!  tphases     = .false.

  elecselfen  = .false.
  phonselfen  = .true.
  a2f         = .true.

  parallel_k  = .true.
  parallel_q  = .false.

  fsthick     = 2.0 ! eV
  eptemp      = 300 ! K (same as PRB 76, 165108)
!double delta smearing
  degaussw    = 0.001 ! eV
  delta_smear = 0.02 ! eV
  nsmear      = 11

!phonon smearing
  degaussq    =0.1 ! Smearing for sum over q in the e-ph coupling in [meV]
  delta_qsmear=0.05
  nqsmear     =10

  delta_approx=.true.
  dvscf_dir   = '../ph/save'
  filukk      = './cubicP_PBE.ukk'
!  filqf       = 'meshes/path.dat'
!  band_plot=.true.
  nkf1        = 88
  nkf2        = 88
  nkf3        = 88

  nqf1         = 16
  nqf2         = 16
  nqf3         = 16
 
  nk1         = 8
  nk2         = 8
  nk3         = 8

  nq1         = 8
  nq2         = 8
  nq3         = 8
 /
      35 cartesian
0   0   0   0.001953125
0   0   0.125   0.01171875
0   0   0.25   0.01171875
0   0   0.375   0.01171875
0   0   -0.5   0.005859375
0   0.125   0.125   0.0234375
0   0.125   0.25   0.046875
0   0.125   0.375   0.046875
0   0.125   -0.5   0.0234375
0   0.25   0.25   0.0234375
0   0.25   0.375   0.046875
0   0.25   -0.5   0.0234375
0   0.375   0.375   0.0234375
0   0.375   -0.5   0.0234375
0   -0.5   -0.5   0.005859375
0.125   0.125   0.125   0.015625
0.125   0.125   0.25   0.046875
0.125   0.125   0.375   0.046875
0.125   0.125   -0.5   0.0234375
0.125   0.25   0.25   0.046875
0.125   0.25   0.375   0.09375
0.125   0.25   -0.5   0.046875
0.125   0.375   0.375   0.046875
0.125   0.375   -0.5   0.046875
0.125   -0.5   -0.5   0.01171875
0.25   0.25   0.25   0.015625
0.25   0.25   0.375   0.046875
0.25   0.25   -0.5   0.0234375
0.25   0.375   0.375   0.046875
0.25   0.375   -0.5   0.046875
0.25   -0.5   -0.5   0.01171875
0.375   0.375   0.375   0.015625
0.375   0.375   -0.5   0.0234375
0.375   -0.5   -0.5   0.01171875
-0.5   -0.5   -0.5   0.001953125
sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: convergence and memory issues in EPC

Post by sponce »

Dear Xianxin Wu,

The smaller the smearing the larger the required k/q grids to reach convergence (peaked functions required more points to be correctly described).

1) etf_mem = 2 will be release in the next version of QE/EPW. You can already download the development version of QE at https://github.com/QEF/q-e
Be aware that this is the development version and might sometimes be broken.

2) 16x16x16k and 8x8x8 q initial grid is indeed quite large. I'm not surprised you get memory issues.
You could try 12x12x12 k-point and 6x6x6 q-points. It seems what is most important here is a dense k-point grid to describe the Fermi surface. Maybe the q-grid is not as important.
This will significantly reduce your memory need. It might even be affordable to do 18x18x18 k-points and 6x6x6 q-points but I would first try 12.

Best,
Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com
xxwu

Re: convergence and memory issues in EPC

Post by xxwu »

Dear Samuel,
Thanks very much for prompt reply.
1. about the convergence. If we increase the k-mesh and q-mesh, the obtained lambda changes little when sigma approaches zeros. Then the result is converged. Am I right?
2. I will try to use the development version and see it can work or not.
3. Thanks very much for your good suggestions. I have done wannierize calculations with 12x12x12 but the wannier functions are not good enough. The wannier centers have some deviations from the atomic positions. I will try to calculate the DOS at Ef. Could you tell me how to estimate the required memory in EPW calculations(with different k-mesh and q-mesh)? I want to estimate the largest k-mesh and q-mesh in the calculations with our cluster.

Thanks very much for you help!
Best Regards!

Xianxin


the P atom is at (0,0,0) and there are nine wannier functions
the wannier functions with 12x12x12 kmesh:

Code: Select all

     Wannier Function centers (cartesian, alat) and spreads (ang):

     (   0.22973   0.10947  -0.11361) :   0.89579
     (   0.17558   0.11447   0.21694) :   0.83384
     (  -0.23138   0.09562  -0.10337) :   0.92173
     (   0.17888  -0.22165  -0.09104) :   0.83553
     (  -0.00484  -0.00296  -0.24956) :   0.89856
     (  -0.18920   0.07325   0.22259) :   0.83079
     (   0.03373  -0.18712   0.20446) :   0.94750
     (  -0.00642   0.24588  -0.02804) :   0.90855
     (  -0.18643  -0.22744  -0.05774) :   0.83002

The wannier functions with 16x16x16 kmesh:

Code: Select all

     Wannier Function centers (cartesian, alat) and spreads (ang):

     (   0.00000   0.00000   0.00000) :   0.80243
     (  -0.00000  -0.00000  -0.00000) :   1.05672
     (  -0.00000   0.00000  -0.00000) :   1.05665
     (  -0.00000  -0.00000   0.00000) :   1.05665
     (   0.00000  -0.00000   0.00000) :   1.33728
     (   0.00000   0.00000   0.00000) :   1.58670
     (  -0.00000   0.00000  -0.00000) :   1.58670
     (   0.00000   0.00000  -0.00000) :   1.33724
     (   0.00000  -0.00000   0.00000) :   1.58670


sponce wrote:Dear Xianxin Wu,

The smaller the smearing the larger the required k/q grids to reach convergence (peaked functions required more points to be correctly described).

1) etf_mem = 2 will be release in the next version of QE/EPW. You can already download the development version of QE at https://github.com/QEF/q-e
Be aware that this is the development version and might sometimes be broken.

2) 16x16x16k and 8x8x8 q initial grid is indeed quite large. I'm not surprised you get memory issues.
You could try 12x12x12 k-point and 6x6x6 q-points. It seems what is most important here is a dense k-point grid to describe the Fermi surface. Maybe the q-grid is not as important.
This will significantly reduce your memory need. It might even be affordable to do 18x18x18 k-points and 6x6x6 q-points but I would first try 12.

Best,
Samuel
sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: convergence and memory issues in EPC

Post by sponce »

Dear Xianxin,

The new version of EPW has some memory analysis printed to the output (during the interpolation part only) that can be helpful.

If you really need such 16x16x16 k-grid I can suggest to use a 4x4x4 q-grid. This should be much cheaper and probably sill quite good.

Best,
Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com
xxwu

Re: convergence and memory issues in EPC

Post by xxwu »

Dear Samuel,
I had used the new version of EPW and it can work with 16x16x16 kmesh(although much slower). I will first try your suggestions. I have one more question: Which Fermi level should I use, the one in DFT(insert it in the input) or the one obtained on the fine kmesh in EPW?(the interpolated bands match well with those in DFT). If the fine kmesh is dense enough, I think these two should be very close. Do you think the used Fermi level (DFT or EPW) will have a significant effect on the final result(fine kmesh is not dense)? Thanks in advance!

Best Regards!

Xianxin
sponce wrote:Dear Xianxin,

The new version of EPW has some memory analysis printed to the output (during the interpolation part only) that can be helpful.

If you really need such 16x16x16 k-grid I can suggest to use a 4x4x4 q-grid. This should be much cheaper and probably sill quite good.

Best,
Samuel
carla.verdi
Posts: 155
Joined: Thu Jan 14, 2016 10:52 am
Affiliation:

Re: convergence and memory issues in EPC

Post by carla.verdi »

Dear Xianxin,

What is the difference in the two Fermi levels? As a guidance, providing that the wannierization is good (which of course should be the case), the Fermi level from EPW is more accurate because it is calculated by integrating the electronic occupation over a much finer k mesh.

Best,
Carla
xxwu

Re: convergence and memory issues in EPC

Post by xxwu »

Dear Carla,
In the wannierize calculations, the interplated bands match very well with those of DFT(see this Figure https://www.dropbox.com/s/8ht86f6eh8qzchx/CubicP_QE_EPW_PBENC.png?dl=0 ). In QE, I can get very accurate Ef and DOS at Ef(use the linear tetrahedron method without smearing). With EPW, I can also get the Fermi level and DOS at Ef with different fine kmesh and smearing parameter. Sometimes, Ef from QE and EPW differ a little (5-10 meV, depends on smearing and fine kmesh) and the corresponding DOS at Ef also differ. It will affect the obtained lambda (lambda ~ 1/D(Ef) ). Which Fermi level should I use in the electron phonon calculations, from DFT or EPW? I think it will also affect the convergence of lambda.
About the convergence of lambda, what is the criteria?In most cases, the obtain lambda will depend on the smearing parameters and kmesh (see this figure https://www.dropbox.com/s/ce1353m958m1dss/CubicP_EPW_lambda.png?dl=0, K96 means 96x96x96 kmesh). Could you give some suggestions how to determine the sigma and kmesh?As I want to get pressure dependent lamba, sometimes, I get different behaviours(lambda as a function of pressure) with different sigma and kmesh, so it crucial to choose the right sigma and kmesh. Thanks in advance!


you can see that the DOS at Ef(from EPW) show oscillations as a function of kmesh and sigma, so I donnot know which kmesh should choose.

DOS and Ef from QE and EPW?
the Ef and DOS at Ef from QE are,
Ef(eV) DOS(eV-1)
0.1513 15.817

The obtained Ef and DOS from EPW are,
80x80x80 fine kmesh
sigma (eV) DOS(Ef)(eV-1) Ef(eV)
0.00100000 0.21741800 15.82923400
0.02100000 0.14081700 15.82862900
0.04100000 0.14419200 15.82788700
0.06100000 0.14417200 15.82738600
0.08100000 0.14174400 15.82653700
0.10100000 0.14101300 15.82548100
0.12100000 0.14184800 15.82436700
0.14100000 0.14314600 15.82319200
0.16100000 0.14451200 15.82199200
0.18100000 0.14586700 15.82085500
0.20100000 0.14716300 15.81985500

88x88x88 fine kmesh
sigma DOS(Ef) Ef
0.00100000 0.19092900 15.80489100
0.02100000 0.18174800 15.80601100
0.04100000 0.16736700 15.80754700
0.06100000 0.15826300 15.80898900
0.08100000 0.15383200 15.81004800
0.10100000 0.15174800 15.81080700
0.12100000 0.15031400 15.81154300
0.14100000 0.14925300 15.81235100
0.16100000 0.14873400 15.81317700
0.18100000 0.14877900 15.81394400
0.20100000 0.14923200 15.81460600

96x96x96 fine kmesh
sigma DOS(Ef) Ef
0.00100000 0.36786400 15.81028200
0.02100000 0.16363000 15.81039700
0.04100000 0.15589400 15.81087300
0.06100000 0.15279400 15.81145300
0.08100000 0.15216400 15.81200800
0.10100000 0.15288100 15.81248700
0.12100000 0.15396700 15.81298200
0.14100000 0.15477400 15.81351800
0.16100000 0.15508500 15.81407500
0.18100000 0.15496000 15.81461700
0.20100000 0.15457500 15.81510700

104x104x104 fine kmesh
sigma DOS(Ef) Ef
0.00100000 0.16305200 15.82215400
0.02100000 0.15921300 15.82128100
0.04100000 0.16483700 15.82089800
0.06100000 0.16900600 15.82048100
0.08100000 0.16843700 15.81983900
0.10100000 0.16597000 15.81917900
0.12100000 0.16318700 15.81856900
0.14100000 0.16062200 15.81803600
0.16100000 0.15843900 15.81759600
0.18100000 0.15668500 15.81725100
0.20100000 0.15535100 15.81699200

112x112x112 fine kmesh
sigma DOS(Ef) Ef
0.00100000 0.15268900 15.81922800
0.02100000 0.13324700 15.81805700
0.04100000 0.13691600 15.81776400
0.06100000 0.14360100 15.81766700
0.08100000 0.14764200 15.81794000
0.10100000 0.14941300 15.81825600
0.12100000 0.15028300 15.81834000
0.14100000 0.15086100 15.81816800
0.16100000 0.15135000 15.81783900
0.18100000 0.15178100 15.81746900
0.20100000 0.15213000 15.81714300

120x120x120 fine kmesh
sigma DOS(Ef) Ef
0.00100000 0.19636800 15.81635200
0.02100000 0.13533300 15.81732700
0.04100000 0.13849100 15.81793500
0.06100000 0.14020200 15.81789200
0.08100000 0.14143200 15.81743700
0.10100000 0.14316500 15.81691300
0.12100000 0.14541100 15.81655100
0.14100000 0.14759300 15.81639000
0.16100000 0.14936000 15.81636500
0.18100000 0.15064700 15.81639900
0.20100000 0.15151900 15.81644200

128x128x128 fine kmesh
sigma DOS(Ef) Ef
0.00100000 0.18180700 15.81197600
0.02100000 0.15505800 15.81233600
0.04100000 0.15558500 15.81254100
0.06100000 0.15726500 15.81295000
0.08100000 0.15692900 15.81348000
0.10100000 0.15572900 15.81407300
0.12100000 0.15447600 15.81468600
0.14100000 0.15359400 15.81524900
0.16100000 0.15310600 15.81570600
0.18100000 0.15287300 15.81603800
0.20100000 0.15277100 15.81625400



carla.verdi wrote:Dear Xianxin,

What is the difference in the two Fermi levels? As a guidance, providing that the wannierization is good (which of course should be the case), the Fermi level from EPW is more accurate because it is calculated by integrating the electronic occupation over a much finer k mesh.

Best,
Carla
carla.verdi
Posts: 155
Joined: Thu Jan 14, 2016 10:52 am
Affiliation:

Re: convergence and memory issues in EPC

Post by carla.verdi »

Dear Xianxin,

a possible suggestion would be to converge the Fermi level first using EPW, i.e. you can run calculations using different fine k meshes and stopping them just after the Fermi level is printed. Once you are happy with it, you can run all your subsequent electron-phonon calculations by including in your input
efermi_read = .true.
fermi_energy= XXX
so that your Fermi level will be exactly the same in all calculations.
For choosing sigma, I understand it can be pretty nasty - the general idea is that you should pick the lowest one you can before the results start having large deviations/instabiities.

Best,
Carla
Post Reply