Self-consistent GW with spin fails in parallel with PAW

GW, Bethe-Salpeter …

Moderators: maryam.azizi, bruneval

Locked
meinert
Posts: 3
Joined: Wed Jun 13, 2012 3:02 pm

Self-consistent GW with spin fails in parallel with PAW

Post by meinert » Wed Jun 13, 2012 3:12 pm

Dear community and abinit developers,

I've encountered an error during self-consistent GW calculations with abinit v6.12.3. Please consider the QPscGW run for Si with PAW below.

- It runs fine with just one spin, but fails with two spins. Of course, that's pointless for Si, but I found the same problem with Fe, so it seems to be a general problem with spin-polarized GW.

- The problem is related to MPI parallel execution: running abinit with a single MPI process is fine.

- Further, with a TM pseudo the run is fine in parallel, so it is related to PAW.


Code: Select all

# Crystalline silicon : computation of the total energy
# 1: ground state
# 2: KSS file
# 3: self-consistent GW

ndtset 3

###################################################################
# Dataset 1
prtden1 1           # write out the density for the KSS run
###################################################################

###################################################################
#Dataset 2
iscf2       -2      # non-self-consistent run
getden2     -1      # read previous density
nband2     100
nbandkss2  100
kssform2     3
###################################################################

###################################################################
#Dataset 3
optdriver3   8      # self-consistent GW
gwcalctyp3  29      # QPscGW with contour integration
gw_sctype3   4      # full self-consistency
gw_toldfeig3 0.0018 # self-consistency tolerance for eigenvalues 0.05 eV
gw_nstep3    5      # should be sufficient
gw_sigxcore3 1      # evaluate core orbitals on Fock-level
gwpara3      1      # parallelize over k-points
getkss3     -1      # get KSS from previous dataset
nband3     100      # bands for the screening calculation
symchi3      1      # symmetrize susceptibility
spmeth3      1      # use spectral method
ecutwfn3     5.0    # automatically set to ecut if not specified
ecuteps3     4.0    # dimension of the screening matrix
ecutsigx3   20.0    # cutoff for the Coulomb matrix
                    # Use contour deformation for the GW calculation
nfreqim3    10      # number of imaginary frequencies
nfreqre3    20      # number of real frequencies
freqremax3   4.0    # maximum real frequency
nomegasf3  200      # frequencies for spectral method

nkptgw3    10
kptgw3              # kpts for the GW calculation, same as for groundstate run
                       0.00000000E+00  0.00000000E+00  0.00000000E+00
                       2.00000000E-01  0.00000000E+00  0.00000000E+00
                       4.00000000E-01  0.00000000E+00  0.00000000E+00
                       2.00000000E-01  2.00000000E-01  0.00000000E+00
                       4.00000000E-01  2.00000000E-01  0.00000000E+00
                      -4.00000000E-01  2.00000000E-01  0.00000000E+00
                      -2.00000000E-01  2.00000000E-01  0.00000000E+00
                       4.00000000E-01  4.00000000E-01  0.00000000E+00
                      -4.00000000E-01  4.00000000E-01  0.00000000E+00
                      -4.00000000E-01  4.00000000E-01  2.00000000E-01
bdgw3         
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15
           1 15

###################################################################

#do not use time-reversal symmetry
istwfk *1

#PBE xc functional
ixc 11

#Definition of the unit cell
acell 3*10.18          # This is equivalent to   10.18 10.18 10.18
rprim  0.0  0.5  0.5   # In lessons 1 and 2, these primitive vectors
       0.5  0.0  0.5   # (to be scaled by acell) were 1 0 0  0 1 0  0 0 1
       0.5  0.5  0.0   # that is, the default.

#Definition of the atom types
ntypat 1          # There is only one type of atom
znucl 14          # The keyword "znucl" refers to the atomic number of the
                  # possible type(s) of atom. The pseudopotential(s)
                  # mentioned in the "files" file must correspond
                  # to the type(s) of atom. Here, the only type is Silicon.

#Definition of the atoms
natom 2           # There are two atoms
typat 1 1         # They both are of type 1, that is, Silicon.
xred              # This keyword indicate that the location of the atoms
                  # will follow, one triplet of number for each atom
   0.0  0.0  0.0  # Triplet giving the REDUCED coordinate of atom 1.
   1/4  1/4  1/4  # Triplet giving the REDUCED coordinate of atom 2.
                  # Note the use of fractions (remember the limited
                  # interpreter capabilities of ABINIT)

nsppol 2
spinat
        0 0 2
        0 0 2

#Definition of the planewave basis set
ecut  5.0
pawecutdg 20.0

#Definition of the k-point grid
kptopt 1          # Option for the automatic generation of k points, taking
                  # into account the symmetry
ngkpt 5 5 5
nshiftk 1
shiftk 0.0 0.0 0.0

#Definition of the SCF procedure
nstep 20          # Maximal number of SCF cycles
#toldfe 1.0d-7     # Will stop when, twice in a row, the difference
                  # between two consecutive evaluations of total energy
                  # differ by less than toldfe (in Hartree)
                  # This value is way too large for most realistic studies of materials
diemac 12.0       # Although this is not mandatory, it is worth to
                  # precondition the SCF cycle. The model dielectric
                  # function used as the standard preconditioner
                  # is described in the "dielng" input variable section.
                  # Here, we follow the prescription for bulk silicon.

#Magic for the nscf run
tolwfr  1.0d-10


The error message is

Code: Select all

 *************** KS Energies *******************

 rdqps: reading QP wavefunctions of the previous step
        looking for file Si_GW_i_DS3_QPS
 file not found, 1st iteration initialized with KS eigenelements


 sigma : calculating QP occupation numbers

 top of valence       [eV]   0.85
 bottom of conduction [eV]   1.47
 Fermi energy         [eV]   1.16

 planewave contribution to nelect:    8.1721
-P-0000
-P-0000  m_wfs.F90:5273:ERROR
-P-0000   ug for (band, ik_ibz, spin): 11 1 2  is not stored in memory!
-P-0000
-P-0000  leave_new : decision taken to exit ...


The (band, ik_ibz, spin) index changes from run to run, so it does seem to be an MPI communication related problem.

Best regards,
Markus

User avatar
sponce
Posts: 60
Joined: Sat Apr 16, 2011 9:44 am

Re: Self-consistent GW with spin fails in parallel with PAW

Post by sponce » Thu Jun 14, 2012 2:03 pm

Dear Markus,

Up to my knowledge this is not coded in abinit (scGW+PAW+spin).

Nevertheless I would recommend you to try to run it in sequential with very low (unconverged) values to see if it work. If it does then it my be implemented and be indeed a MPI related problem.

Let me know if it work.

All the best,

Samuel

meinert
Posts: 3
Joined: Wed Jun 13, 2012 3:02 pm

Re: Self-consistent GW with spin fails in parallel with PAW

Post by meinert » Thu Jun 14, 2012 2:12 pm

Hi Samuel,

Indeed, I've tested running in serial with spin, and it does work nicely - at least in the case of Si, which I have tested. So it is quite surely an MPI problem.

Best regards,
Markus

luca.sementa
Posts: 5
Joined: Tue Dec 07, 2010 9:54 pm

Re: Self-consistent GW with spin fails in parallel with PAW

Post by luca.sementa » Mon Oct 01, 2012 9:01 am

Dear Markus

I experienced the same problem, but my case was not spin-polarized.
I worked on a copper surface.

P.S
thanks for the answer at viewtopic.php?f=11&t=1653

User avatar
sponce
Posts: 60
Joined: Sat Apr 16, 2011 9:44 am

Re: Self-consistent GW with spin fails in parallel with PAW

Post by sponce » Fri Oct 19, 2012 3:01 pm

Hello Markus,

I did your calculation and I got indeed the same error with mpi and 2 cpu:

-P-0000 Subroutine Unknown:0:ERROR
-P-0000 ug for (band, ik_ibz, spin): 5 1 2 is not stored in memory!


The optdriver 8 is still in developpement (and not reported in the list of input variable)

You can try to do multiple optdriver 3 then optdriver 4 then optdriver 3 again etc... up to convergency.

This should give you the same result. I did not try it but I think that it will not solve the problem.

I will ask Matteo about it the next time I see him.

Cheers!

Locked