BUG - rfgd array must be allocated at rfgd(3,nfgd)!

I found a bug using the Ipnut file which I’ve attached below!

— !BUG
src_file: m_paw_finegrid.F90
src_line: 131
mpi_rank: 0
message: |
rfgd array must be allocated at rfgd(3,nfgd)!

Action: contact ABINIT group (please attach the output of abinit -b)

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

Input file for the positron tutorial

Positron lifetime calculation within PAW

SrTiO3, 4 atoms in the box

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

Datasets definition

autoparal 1

positron -10 ! We perform automatic calculation of electrons and positron densities in the two-component DFT context
postoldfe 1d-5 ! We will repeat the electon and positron steps until the energy difference is lower than 1d-5
posnstep 20 ! Maximum number of electon and positron steps

ixcpositron 1 ! We are using the Boronski and Nieminen parametrization


\

Common input parameters

! Unit cell
acell 311.715 angstrom
rprim 1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
chkprim 0
natom 134
ntypat 3
typat 26
1 272 813
znucl 38 22 8
xred 0 0 0
0.3333333333 0 0
0.6666666667 0 0
0 0.3333333333 0
0.3333333333 0.3333333333 0
0.6666666667 0.3333333333 0
0 0.6666666667 0
0.3333333333 0.6666666667 0
0.6666666667 0.6666666667 0
0 0 0.3333333333
0.3333333333 0 0.3333333333
0.6666666667 0 0.3333333333
0 0.3333333333 0.3333333333
0.3333333333 0.3333333333 0.3333333333
0.6666666667 0.3333333333 0.3333333333
0 0.6666666667 0.3333333333
0.3333333333 0.6666666667 0.3333333333
0.6666666667 0.6666666667 0.3333333333
0 0 0.6666666667
0.3333333333 0 0.6666666667
0.6666666667 0 0.6666666667
0 0.3333333333 0.6666666667
0.3333333333 0.3333333333 0.6666666667
0.6666666667 0.3333333333 0.6666666667
0 0.6666666667 0.6666666667
0.3333333333 0.6666666667 0.6666666667
!0.6666666667 0.6666666667 0.6666666667
0.1666666667 0.1666666667 0.1666666667
0.5 0.1666666667 0.1666666667
0.8333333333 0.1666666667 0.1666666667
0.1666666667 0.5 0.1666666667
0.5 0.5 0.1666666667
0.8333333333 0.5 0.1666666667
0.1666666667 0.8333333333 0.1666666667
0.5 0.8333333333 0.1666666667
0.8333333333 0.8333333333 0.1666666667
0.1666666667 0.1666666667 0.5
0.5 0.1666666667 0.5
0.8333333333 0.1666666667 0.5
0.1666666667 0.5 0.5
0.5 0.5 0.5
0.8333333333 0.5 0.5
0.1666666667 0.8333333333 0.5
0.5 0.8333333333 0.5
0.8333333333 0.8333333333 0.5
0.1666666667 0.1666666667 0.8333333333
0.5 0.1666666667 0.8333333333
0.8333333333 0.1666666667 0.8333333333
0.1666666667 0.5 0.8333333333
0.5 0.5 0.8333333333
0.8333333333 0.5 0.8333333333
0.1666666667 0.8333333333 0.8333333333
0.5 0.8333333333 0.8333333333
0.8333333333 0.8333333333 0.8333333333
0 0.1666666667 0.1666666667
0.3333333333 0.1666666667 0.1666666667
0.6666666667 0.1666666667 0.1666666667
0 0.5 0.1666666667
0.3333333333 0.5 0.1666666667
0.6666666667 0.5 0.1666666667
0 0.8333333333 0.1666666667
0.3333333333 0.8333333333 0.1666666667
0.6666666667 0.8333333333 0.1666666667
0 0.1666666667 0.5
0.3333333333 0.1666666667 0.5
0.6666666667 0.1666666667 0.5
0 0.5 0.5
0.3333333333 0.5 0.5
0.6666666667 0.5 0.5
0 0.8333333333 0.5
0.3333333333 0.8333333333 0.5
0.6666666667 0.8333333333 0.5
0 0.1666666667 0.8333333333
0.3333333333 0.1666666667 0.8333333333
0.6666666667 0.1666666667 0.8333333333
0 0.5 0.8333333333
0.3333333333 0.5 0.8333333333
0.6666666667 0.5 0.8333333333
0 0.8333333333 0.8333333333
0.3333333333 0.8333333333 0.8333333333
0.6666666667 0.8333333333 0.8333333333
0.1666666667 0 0.1666666667
0.5 0 0.1666666667
0.8333333333 0 0.1666666667
0.1666666667 0.3333333333 0.1666666667
0.5 0.3333333333 0.1666666667
0.8333333333 0.3333333333 0.1666666667
0.1666666667 0.6666666667 0.1666666667
0.5 0.6666666667 0.1666666667
0.8333333333 0.6666666667 0.1666666667
0.1666666667 0 0.5
0.5 0 0.5
0.8333333333 0 0.5
0.1666666667 0.3333333333 0.5
0.5 0.3333333333 0.5
0.8333333333 0.3333333333 0.5
0.1666666667 0.6666666667 0.5
0.5 0.6666666667 0.5
0.8333333333 0.6666666667 0.5
0.1666666667 0 0.8333333333
0.5 0 0.8333333333
0.8333333333 0 0.8333333333
0.1666666667 0.3333333333 0.8333333333
0.5 0.3333333333 0.8333333333
0.8333333333 0.3333333333 0.8333333333
0.1666666667 0.6666666667 0.8333333333
0.5 0.6666666667 0.8333333333
0.8333333333 0.6666666667 0.8333333333
0.1666666667 0.1666666667 0
0.5 0.1666666667 0
0.8333333333 0.1666666667 0
0.1666666667 0.5 0
0.5 0.5 0
0.8333333333 0.5 0
0.1666666667 0.8333333333 0
0.5 0.8333333333 0
0.8333333333 0.8333333333 0
0.1666666667 0.1666666667 0.3333333333
0.5 0.1666666667 0.3333333333
0.8333333333 0.1666666667 0.3333333333
0.1666666667 0.5 0.3333333333
0.5 0.5 0.3333333333
0.8333333333 0.5 0.3333333333
0.1666666667 0.8333333333 0.3333333333
0.5 0.8333333333 0.3333333333
0.8333333333 0.8333333333 0.3333333333
0.1666666667 0.1666666667 0.6666666667
0.5 0.1666666667 0.6666666667
0.8333333333 0.1666666667 0.6666666667
0.1666666667 0.5 0.6666666667
0.5 0.5 0.6666666667
0.8333333333 0.5 0.6666666667
0.1666666667 0.8333333333 0.6666666667
0.5 0.8333333333 0.6666666667
0.8333333333 0.8333333333 0.6666666667

! K-points and occupations
kptopt 1
nkpt 1
occopt 1
nband 750

posocc 1 ! Occupation number for the positron (should be set <1 for bulk calculation with a small cell).
! Here the zero positron density limit is used, so results do not depend on posocc.

! Convergence parameters
ecut 15. pawecutdg 30.
iscf 17
nstep 50
toldfe 1.d-8
pawovlp -1

! Miscelaneous
prtwf 0 prteig 0 ! To save disk space

After modifying the following section, one might need to regenerate the pickle database with runtests.py -r

#%%
#%% [setup]
#%% executable = abinit
#%% [files]
#%% files_to_test =
#%% tpositron_1.out, tolnlines= 0, tolabs= 0.0, tolrel= 0.0, fld_options= -easy
#%% psp_files = Si.LDA-PW-paw.abinit
#%% [paral_info]
#%% max_nprocs = 10
#%% [extra_info]
#%% authors = J. Wiktor
#%% keywords = POSITRON,PAW
#%% description = First step of the tutorial on electron-positron annihilation
#%%

Hi Positronner,
(not that this is not the correct forum place for this topic)

Thanks for pointing us a bug, apparently appeared since a modification of Abinit default behviour related to forces calculations.

If you are not interested in structure relaxation, you can simply add this in your input file to bypass the problem:

optforces 0  optstress 0

If you are, you have to correct the source code.
Edit the src/91_scfcv/m_scfcv_core.F90, and change the following lines (around line 1100) :

       if (forces_needed==1.or.(dtset%xclevel==2.and.dtset%pawnhatxc>0.and.usexcnhat>0)) then
         optgr1=dtset%pawstgylm;if (stress_needed==1) optrad=1; if (dtset%pawprtwf==1) optrad=1
       end if

into

       if (forces_needed==1.or.(dtset%xclevel==2.and.dtset%pawnhatxc>0.and.usexcnhat>0).or. &
&         (dtset%positron/=0.and.forces_needed==2)) then
         optgr1=dtset%pawstgylm;if (stress_needed==1) optrad=1; if (dtset%pawprtwf==1) optrad=1
       end if

Should work now…