EPW stop when reading “patterns.1.xml” file

Post here questions linked with issue while running the EPW code

Moderator: stiwari

Post Reply
hellolori

EPW stop when reading “patterns.1.xml” file

Post by hellolori »

Dear experts, recently I use QE6.6 (and also QE6.7) to calculate EPC property of a 2D materials. However, I run into a promblem that the code stop when reading the "patterns.1.xml" file, with notification of "*** Error in `epw.x': malloc(): memory corruption: 0x0000000009c7a340 ***".

My process of the calculation and related inputs are descripbe as follows:
1. scf calculation for phonon (pw.x)

Code: Select all

&control
   prefix = 'nite2'
   calculation = 'scf'
  wf_collect=.true.
   disk_io='low'
pseudo_dir='./'
/
&system
   ibrav = 8
   A =  6.70130333
   B =  3.91367719
   C =  25.3
   nat = 13
   ntyp = 2
   ecutwfc = 80
   occupations  =  'smearing' ,
              smearing  =  'cold' ,
              degauss  =  0.01 ,
/
&electrons
   electron_maxstep = 200
   conv_thr = 1.0d-14
   mixing_mode = 'plain'
 /
ATOMIC_SPECIES
  Ni   58.69   Ni.pbe-mt_fhi.UPF
  Te   127.6   Te.pbe-mt_fhi.UPF
ATOMIC_POSITIONS crystal
...
K_POINTS automatic
12 18 1 1 1 1
2. phonon calculation (ph.x)

Code: Select all

--
&inputph
   prefix = 'nite2',
   outdir = './'
   tr2_ph=1.0d-15
   fildyn = 'nite2.dyn'
   fildvscf = 'dvscf'
   ldisp = .true.,
      nq1 = 3,
      nq2 = 6,
      nq3 = 1,
/
3.scf calculation for EPW (pw.x)
The input is the same as that in part 1(scf for phonon)

4.nscf calculation for EPW with full uniformed k points generated by kgrid.x (pw.x)

Code: Select all

&control
   prefix = 'nite2'
   calculation = 'nscf'
  wf_collect=.true.
   tstress = .true.
   tprnfor = .true.
   disk_io='low'
pseudo_dir='./'
/
&system
nosym=.true.
   ibrav = 8
A =  6.70130333
B =  3.91367719
C =  25.3
   nat = 13
   ntyp = 2
   ecutwfc = 80
   occupations  =  'smearing' ,
               smearing  =  'cold' ,
               degauss  =  0.01 ,
/
&electrons
   electron_maxstep = 200
  conv_thr = 1.0d-8
   mixing_mode = 'plain'
/
ATOMIC_SPECIES
……
ATOMIC_POSITIONS crystal
……
K_POINTS crystal
216
  0.00000000  0.00000000  0.00000000  4.629630e-03
  0.00000000  0.05555556  0.00000000  4.629630e-03
  0.00000000  0.11111111  0.00000000  4.629630e-03
  0.00000000  0.16666667  0.00000000  4.629630e-03
  0.00000000  0.22222222  0.00000000  4.629630e-03
  0.00000000  0.27777778  0.00000000  4.629630e-03
  0.00000000  0.33333333  0.00000000  4.629630e-03
  0.00000000  0.38888889  0.00000000  4.629630e-03
  0.00000000  0.44444444  0.00000000  4.629630e-03
  0.00000000  0.50000000  0.00000000  4.629630e-03
  0.00000000  0.55555556  0.00000000  4.629630e-03
  0.00000000  0.61111111  0.00000000  4.629630e-03
  0.00000000  0.66666667  0.00000000  4.629630e-03
  0.00000000  0.72222222  0.00000000  4.629630e-03
  0.00000000  0.77777778  0.00000000  4.629630e-03
  0.00000000  0.83333333  0.00000000  4.629630e-03
  0.00000000  0.88888889  0.00000000  4.629630e-03
  0.00000000  0.94444444  0.00000000  4.629630e-03
  0.08333333  0.00000000  0.00000000  4.629630e-03
5.EPW calculation (epw.x)

Code: Select all

&inputepw
 prefix      =  'nite2'
  outdir      = './'
  ep_coupling = .true.
  elph        = .true.
 kmaps       = .false.
  epwwrite = .true.
  wannierize  = .true.
  dis_froz_min= 0.3466
  dis_froz_max= 6.5966
 proj(1) = 'Te:l=1'
 proj(2)='Ni:l=2,mr=2,3'
 wdata(1) = 'Begin Kpoint_Path'
  wdata(2) = 'G 0.00 0.00 0.00   X 0.50 0.00 0.00'
  wdata(3) = 'X 0.50 0.00 0.00   S 0.5 0.5 0.00'
  wdata(4) = 'S 0.5 0.5 0.0  Y 0.00 0.50 0.00'
  wdata(5) = 'Y 0.0 0.5 0.0  G 0.00 0.0 0.00'
  wdata(6) = 'G 0.0 0.0 0.0  S 0.50 0.5 0.00'
  wdata(7) = 'End Kpoint_Path'
  wdata(8) = 'bands_plot = .true.'
  wdata(9) = 'bands_num_points = 52'
  wdata(10) = 'guiding_centres = .true.'
  wdata(11) = 'dis_num_iter = 5000'
 bands_skipped = 'exclude_bands =1:25'

  system_2d=.true.
  etf_mem     =  1
  nbndsub     = 34,
  iverbosity  = 2
  fsthick     = 0.1  ! eV
  degaussw    = 0.01 ! eV
  delta_smear = 0.01 ! eV
  degaussq     = 0.5 ! meV
  nqstep       = 500
  delta_approx = .true.,
  phonselfen = .true.,
  a2f = .true. ,
  dvscf_dir   = '../phonon/save/'
  nk1         = 12
  nk2         = 18
  nk3         = 1
  nq1         = 3
  nq2         = 6
  nq3         = 1

  nkf1 = 80
  nkf2 = 120
  nkf3 = 1
  nqf1 = 40
  nqf2 = 60
  nqf3 = 1
 /
The EPW.x stop with the last servel lines of the standard input:

Code: Select all

536      -------------------------------------------------------------------
537      WANNIER      :    148.37s CPU    202.39s WALL (       1 calls)
538      -------------------------------------------------------------------
539
540      Calculating kgmap
541
542      Progress kgmap: ########################################
543      kmaps        :      0.65s CPU      2.10s WALL (       1 calls)
544      Symmetries of Bravais lattice:   8
545      Symmetries of crystal:           4
I try to modified the code to find out where epw.x stop, and find that epw.x stop at the 499th line of the file "elphon_shuffle_wrap.f90" after entering the subroutine "read_disp_pattern_only".

Code: Select all

486     DO iq_irr = 1, nqc_irr
487       u_from_file = .TRUE.
488       !tmp_dir_ph = './_ph0/'
489       !
490       !  read the displacement patterns
491       !
492       IF (u_from_file) THEN
493          ierr = 0
494          dirname = TRIM(dvscf_dir) // TRIM(prefix) // '.phsave'
495          filename = TRIM(dirname) // '/patterns.' // TRIM(int_to_char(iq_irr)) // '.xml'
496          INQUIRE(FILE = TRIM(filename), EXIST = exst)
497          IF (.NOT. exst) CALL errore('elphon_shuffle_wrap', &
498                    'cannot open file for reading or writing', ierr)
499          CALL read_disp_pattern_only (iunpattern, filename, iq_irr, ierr)
I modified the code to print the variable "filename" and "iq_irr" in the 499th line, and the results are "patterns.1.xml" and "1", respectively. Therefore, I confirm that epw.x stop when read the file "patterns.1.xml".

I also found the the variable "nqc_irr" in the 486th of "elphon_shuffle_wrap.f90" as shown above is not equal to the number of irreducible q points in my phonon calculations (10 vs 8). I modified the code to force the nqc_irr = 8, but the same error still happened.

By Further examination, after the epw.x enter the subroutine "read_disp_pattern_only ", I found that epw.x stops at the 840-841th line of "ph_restart.f90" when entering subroutine of "iotk_open_read".

Code: Select all

 822     !---------------------------------------------------------------------------
 823     SUBROUTINE read_disp_pattern_only(iunpun, filename, current_iq, ierr)
 824     !---------------------------------------------------------------------------
 825     !!
 826     !! Wrapper routine used by EPW: open file, calls read_disp_pattern
 827     !!
 828     !
 829     IMPLICIT NONE
 830     !
 831     INTEGER, INTENT(in) :: iunpun
 832     !! Unit
 833     INTEGER, INTENT(in) :: current_iq
 834     !! Current q-point
 835     CHARACTER(LEN=*), INTENT(in) :: filename
 836     !! self-explanatory
 837     INTEGER, INTENT(out) :: ierr
 838     !! Error code
 839     !
 840     CALL iotk_open_read ( iunpun, FILE = TRIM(filename), binary = .FALSE., &
 841          ierr = ierr)
The error with notifications

Code: Select all

   1 *** Error in `epw.x': malloc(): memory corruption: 0x0000000009c7a340 ***
   2 *** Error in `epw.x': malloc(): memory corruption: 0x0000000009f6e4f0 ***
   3 *** Error in `epw.x': malloc(): memory corruption: 0x0000000009763d80 ***
   4 *** Error in `epw.x': malloc(): memory corruption: 0x000000000ab0cdc0 ***
   5 *** Error in `epw.x': malloc(): memory corruption: 0x000000000a005c70 ***
   6 *** Error in `epw.x': malloc(): memory corruption: 0x000000000943db00 ***
   7 *** Error in `epw.x': malloc(): memory corruption: 0x00000000096f7de0 ***
   8 *** Error in `epw.x': malloc(): memory corruption: 0x000000000a904e90 ***
   9 *** Error in `epw.x': malloc(): memory corruption: 0x00000000096ccdb0 ***
  10 *** Error in `epw.x': malloc(): memory corruption: 0x000000000a3ec2c0 ***
  11 ======= Backtrace: =========
  12 /lib64/libc.so.6(+0x82b36)[0x2b64b9cabb36]
  13 /lib64/libc.so.6(__libc_malloc+0x4c)[0x2b64b9cae78c]
  14 epw.x(for__get_vm+0x42)[0x1088802]
  15 epw.x(for__acquire_lun+0x11c9)[0x1055159]
  16 epw.x(for_inquire+0x39c9)[0x104f579]
  17 epw.x[0xf0e32b]
  18 epw.x[0xf03109]
The first servel lines of "patterns.1.xml" are:

Code: Select all

   2 <?iotk version="1.2.0"?>
   3 <?iotk file_version="1.0"?>
   4 <?iotk binary="F"?>
   5 <?iotk qe_syntax="F"?>
   6 <Root>
   7   <IRREPS_INFO>
   8     <QPOINT_NUMBER type="integer" size="1">
   9          1
  10     </QPOINT_NUMBER>
  11     <QPOINT_GROUP_RANK type="integer" size="1">
  12          4
  13     </QPOINT_GROUP_RANK>
  14     <MINUS_Q_SYM type="logical" size="1">
  15 T
  16     </MINUS_Q_SYM>
  17     <NUMBER_IRR_REP type="integer" size="1">
  18         39
  19     </NUMBER_IRR_REP>
  20     <REPRESENTION.1>
  21       <NUMBER_OF_PERTURBATIONS type="integer" size="1">
  22          1
  23       </NUMBER_OF_PERTURBATIONS>
  24       <PERTURBATION.1>
  25         <SYMMETRY_TYPE_CODE type="integer" size="1">
  26          1
  27         </SYMMETRY_TYPE_CODE>
  28         <SYMMETRY_TYPE type="character" size="1" len="15">
  29 A_g
  30         </SYMMETRY_TYPE>
  31         <DISPLACEMENT_PATTERN type="complex" size="39">
  32  0.000000000000000E+000, 0.000000000000000E+000
  33  0.000000000000000E+000, 0.000000000000000E+000
  34  0.000000000000000E+000, 0.000000000000000E+000
  35  0.000000000000000E+000, 0.000000000000000E+000
  36  0.000000000000000E+000, 0.000000000000000E+000
  37  0.000000000000000E+000, 0.000000000000000E+000
  38  0.000000000000000E+000, 0.000000000000000E+000
  39  0.000000000000000E+000, 0.000000000000000E+000
  40  0.000000000000000E+000, 0.000000000000000E+000
  41  0.000000000000000E+000, 0.000000000000000E+000
Can anyone give me some suggestions how to solve this problem? Thanks in advance!
hlee
Posts: 415
Joined: Thu Aug 03, 2017 12:24 pm
Affiliation: The University of Texas at Austin

Re: EPW stop when reading “patterns.1.xml” file

Post by hlee »

Dear hellolori:

First I would suggest you to remove the following line in your nscf.in:
nosym=.true.
If you still encounter the error with this change, please provide me with the full EPW output.

Sincerely,

H. Lee
Post Reply