[Q-e-developers] Problem of calculation of electron-phonon coupling matrix elements

Paolo Giannozzi paolo.giannozzi at uniud.it
Thu Sep 4 18:49:13 CEST 2014


It is almost impossible to get exactly the same results on
a different number of processors. Differences are usually 
very tiny, but the electron-phonon matrix elements seem to
be very sensitive to everything. Moreover: in presence of
degeneracies, you have no guarantee to find the same linear 
combination of degenerate Kohn-Sham states.

Also check that you are writing electron-phonon matrix elements
AFTER they have been summed over different processors!

Paolo

On Wed, 2014-09-03 at 18:38 +0800, ylniu at iccas.ac.cn wrote:
> Dear all,
>  
> I modified the Quantum Espresso to output the electron-phonon coupling
> matrix elements.
> For test, I added the following code into the souce code
> file PHonon/PH/elphon.f90
> ===================== PHonon/PH/elphon.f90 =========================
> ...
> 33   USE io_global, ONLY: ionode
> ...
> 306  if (ionode) write(81,'(2es25.15)') elphmat
> ...
> ====================================================================
> But the results were different for different number of CPUs (q: 2,
> irr: 2).
> (
> ======================= ph.in =====================================
> elph test
> &inputph
>   tr2_ph          = 1.0d-12
>   prefix          = graphene
>   fildyn          = graphene.dyn
>   fildvscf        = "graphene.dvscf"
>   outdir          = "./scratch"
>   ldisp           = .true.
>   trans           = .true.
>   recover         = .false.
>   amass(1)        = 12.01078
>   electron_phonon = interpolated
>   start_q         = 2
>   last_q          = 2
>   start_irr       = 2
>   last_irr        = 2
>   nq1             = 4
>   nq2             = 4
>   nq3             = 1
> /
> ====================================================================
> )
> My question is how can I get same el_ph_mat (electron-phonon coupling
> matrix elements)
> when I use different cpus?
>  
> For 1 cpu:
> =========================== fort.81 ================================
>     1     2.111912598770554E-01   -6.122639691709350E-02
>     2     5.646932759590451E-01    1.045595099527000E-01
>     3     1.436535775520254E-10    1.083914503494771E-11
>     4     1.094600778801666E-09    2.504425167943168E-11
>     5     7.406599464895909E-03   -5.581622507957913E-04
>     6     3.942451213059297E-11    7.370401683617228E-12
>     7    -9.974265984403387E-05   -2.139288784503638E-02
>     8     3.052548739767885E-02    1.640485990372430E-02
>     9    -7.681900372094940E-11    6.161802834776561E-11
>    10     8.557927431341962E-11    1.277138964601295E-10
>    11     3.178778299742998E-03    1.780936714147213E-02
>    12    -2.313869774610804E-08   -3.323111134144729E-09
>    13    -1.051576778201094E-01    4.251159246757611E-01
>    14    -1.026152360177541E-10   -4.531254820717961E-11
>    15     3.982685844382961E-02    7.995931830909098E-02
>    16    -8.740606048333697E-11    7.298086675600054E-11
>    17     6.622031149305701E-11   -3.157736485190878E-11
>    18     2.573175847093366E-03   -1.137866938049060E-03
>    19     2.295305517972012E-02   -4.483954632608098E-02
>    20    -2.000200445129395E-11   -3.772488498091808E-11
> ====================================================================
> For 2 cpu2:
> =========================== fort.81 ================================
>     1    -2.121388054865546E-01   -5.785768025260994E-02
>     2    -4.419400133461050E-01   -3.667423421446154E-01
>     3    -8.808838259990732E-12   -2.170332412865152E-11
>     4    -1.955122727126737E-10   -9.647281124999796E-10
>     5     7.408874237136150E-03   -5.272362799164949E-04
>     6     5.779954654729292E-12    1.007403277542557E-11
>     7    -1.854532980357099E-02   -1.066184835345434E-02
>     8    -3.465409530304538E-02    2.505231280653718E-04
>     9    -2.153588354036421E-12    2.118436676672506E-12
>    10     1.266670046405443E-11    2.339256224262198E-11
>    11    -1.668690509592920E-02    6.987643133170195E-03
>    12    -6.776197927390573E-11    2.339056658431926E-08
>    13     1.175445896610968E-01    4.218586406365152E-01
>    14    -2.463043811994011E-11   -1.676870038427847E-11
>    15    -2.582075285123000E-02   -8.551695002500706E-02
>    16     7.494644308684727E-11   -9.442933058538721E-13
>    17    -2.975030897848215E-12    1.316728289461655E-11
>    18    -2.194224142005811E-03   -1.762019256332976E-03
>    19    -5.032454009263448E-02   -2.218677935776754E-03
>    20     2.533689991702891E-11    3.969460625376762E-11
> ====================================================================
> I check the scratch file:
> scratch/graphene.save/K00001
> The eigenvalues in eigenval.xml are different too. So I guess the
> wavefucntions
> in evc are different. Maybe this is one reason for different
> el_ph_mat.
> For 1 cpu:
> =========================== eigenval.xml ===========================
>   1 <?xml version="1.0"?>
>   2 <?iotk version="1.2.0"?>
>   3 <?iotk file_version="1.0"?>
>   4 <?iotk binary="F"?>
>   5 <?iotk qe_syntax="F"?>
>   6 <Root>
>   7   <INFO nbnd="40" ik="1"/>
>   8   <UNITS_FOR_ENERGIES UNITS="Hartree"/>
>   9   <EIGENVALUES type="real" size="40">
> 10 -9.372967763235482E-001
> 11 -2.859114711106425E-001
> 12  2.423809457262652E-002
> 13  3.936657793790457E-002
> 14  3.936658173590124E-002
> 15  9.971894818709115E-002
> 16  1.190274661273175E-001
> 17  2.257048498897421E-001
> 18  3.329934680466993E-001
> 19  3.454525069461828E-001
> 20  3.454525104092048E-001
> ====================================================================
> For 2 cpu2:
> =========================== eigenval.xml ===========================
>   1 <?xml version="1.0"?>
>   2 <?iotk version="1.2.0"?>
>   3 <?iotk file_version="1.0"?>
>   4 <?iotk binary="F"?>
>   5 <?iotk qe_syntax="F"?>
>   6 <Root>
>   7   <INFO nbnd="40" ik="1"/>
>   8   <UNITS_FOR_ENERGIES UNITS="Hartree"/>
>   9   <EIGENVALUES type="real" size="40">
> 10 -9.372956079934280E-001
> 11 -2.859105837217967E-001
> 12  2.423788487560791E-002
> 13  3.936777622696248E-002
> 14  3.936778002499225E-002
> 15  9.971873811833652E-002
> 16  1.190272536967113E-001
> 17  2.257059978019067E-001
> 18  3.329933593817723E-001
> 19  3.454536601077474E-001
> 20  3.454536635707072E-001
> ====================================================================
> I compiled Quantum Espresso with external scalapack.
>  
> Attatched
> ======================= scf.in =====================================
> &control
>     calculation     = 'scf'
>     restart_mode    = 'from_scratch',
>     wf_collect      = .true.
>     tstress         = .true.
>     tprnfor         = .true.
>     prefix          = 'graphene',
>     pseudo_dir      = './pseudo',
>     outdir          = './scratch'
> /
> &system
>     ibrav           =  4
>     a               =  2.4637
>     b               =  2.4637
>     c               = 10.0000
>     cosab           = -0.5
>     cosbc           =  0.0
>     cosac           =  0.0
>     nbnd            = 40
>     nat             =  2
>     ntyp            =  1
>     ecutwfc         = 10
>     ecutrho         = 40
>     occupations     = 'smearing'
>     smearing        = 'mp'
>     degauss         = 0.01
>     london          = .true.
> /
> &electrons
>     diagonalization = 'david'
>     conv_thr        = 1.0d-8
>     mixing_beta     = 0.7
> /
> ATOMIC_SPECIES
>   C  12.01078  C.pbe-n-rrkjus_psl.0.1.UPF
> ATOMIC_POSITIONS {crystal}
> C        0.666666667   0.333333333   0.000000000
> C        0.333333333   0.666666667   0.000000000
> K_POINTS {automatic}
> 8 8 1 0 0 0
> ====================================================================
> ======================= nscf.fit.in ================================
> &control
>     calculation     = 'nscf'
>     restart_mode    = 'from_scratch',
>     wf_collect      = .true.
>     tstress         = .true.
>     tprnfor         = .true.
>     prefix          = 'graphene',
>     pseudo_dir      = './pseudo',
>     outdir          = './scratch'
> /
> &system
>     ibrav           =  4
>     a               =  2.4637
>     b               =  2.4637
>     c               = 10.0000
>     cosab           = -0.5
>     cosbc           =  0.0
>     cosac           =  0.0
>     nbnd            = 40
>     nat             =  2
>     ntyp            =  1
>     ecutwfc         = 10
>     ecutrho         = 40
>     occupations     = 'smearing'
>     smearing        = 'mp'
>     degauss         = 0.01
>     london          = .true.
>     la2F            = .true.
> /
> &electrons
>     diagonalization = 'david'
>     conv_thr        = 1.0d-8
>     mixing_beta     = 0.7
> /
> ATOMIC_SPECIES
>   C  12.01078  C.pbe-n-rrkjus_psl.0.1.UPF
> ATOMIC_POSITIONS {crystal}
> C        0.666666667   0.333333333   0.000000000
> C        0.333333333   0.666666667   0.000000000
> K_POINTS {automatic}
> 8 8 1 0 0 0
> ====================================================================
> ======================= nscf.in ====================================
> &control
>     calculation     = 'scf'
>     restart_mode    = 'from_scratch',
>     wf_collect      = .true.
>     tstress         = .true.
>     tprnfor         = .true.
>     prefix          = 'graphene',
>     pseudo_dir      = './pseudo',
>     outdir          = './scratch'
> /
> &system
>     ibrav           =  4
>     a               =  2.4637
>     b               =  2.4637
>     c               = 10.0000
>     cosab           = -0.5
>     cosbc           =  0.0
>     cosac           =  0.0
>     nbnd            = 40
>     nat             =  2
>     ntyp            =  1
>     ecutwfc         = 10
>     ecutrho         = 40
>     occupations     = 'smearing'
>     smearing        = 'mp'
>     degauss         = 0.01
>     london          = .true.
> /
> &electrons
>     diagonalization = 'david'
>     conv_thr        = 1.0d-8
>     mixing_beta     = 0.7
> /
> ATOMIC_SPECIES
>   C  12.01078  C.pbe-n-rrkjus_psl.0.1.UPF
> ATOMIC_POSITIONS {crystal}
> C        0.666666667   0.333333333   0.000000000
> C        0.333333333   0.666666667   0.000000000
> K_POINTS {automatic}
> 4 4 1 0 0 0
> ====================================================================
> ======================= ph.in =====================================
> elph test
> &inputph
>   tr2_ph          = 1.0d-12
>   prefix          = graphene
>   fildyn          = graphene.dyn
>   fildvscf        = "graphene.dvscf"
>   outdir          = "./scratch"
>   ldisp           = .true.
>   trans           = .true.
>   recover         = .false.
>   amass(1)        = 12.01078
>   electron_phonon = interpolated
>   start_q         = 2
>   last_q          = 2
>   start_irr       = 2
>   last_irr        = 2
>   nq1             = 4
>   nq2             = 4
>   nq3             = 1
> /
> ====================================================================
>  
> Thanks in advance for your help and any reply!
>  
> 
> ______________________________________________________________________
> Ying-Li Niu
> -------------------------------------
> Institute of Chemistry
> Chinese Academy of Sciences
> Zhong Guan Cun North First Street 2,
> 100190 Beijing, China
> Phone: +86-10-62552723
> email: ylniu at iccas.ac.cn
>         
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers

-- 
 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