repfn calculation crashes because ngfftdg doesnt match  [SOLVED]

Phonons, DFPT, electron-phonon, electric-field response, mechanical response…

Moderators: mverstra, joaocarloscabreu

Locked
tyst3273
Posts: 8
Joined: Fri Jul 17, 2020 12:35 am
Location: Boulder, CO

repfn calculation crashes because ngfftdg doesnt match

Post by tyst3273 » Mon Aug 10, 2020 9:00 pm

Hi Abinit users,

I am doing some phonon calculations with version 9.0.4 and have been running into a problem regarding ngfftdg.


Here is a short summary:

First, I do a ground state calculation to generate wavefunction and density files.
Then, I do an nscf calculation with iscf = -2 and nqpt = 1 at the desired qpoint.
Then I do the response calculation (rfphon = 1) reading the wavefunctions (WFK and WFQ) from the groundstate and nscf runs.

I keep ecut, pawecutdg, acell, and rprim the same for all calculations.

The problem I am having is, after reading the ground state density in the nscf run, Abinit determines a different ngfftdg value than the groundstate run and then crashes with a message that the ngfftdg number doesn't match the density file.

--- !ERROR
src_file: m_hdr.F90
src_line: 3964
mpi_rank: 0
message: |
fft grids must be the same for restart from a density file.
Action: change your fft grid or your restart file.
...



If I go look at the .abo file from the groundstate run and manually set the ngfftdg values in the nscf calculation, it runs without crashing. This is an okay hack, but it disrupts my workflow and I would like to not have to manually read the groundstate output file and set this manually.


I have attached the groundstate and an example phonon dfpt input file. The value ngfftdg in the .abo file from the response run is:
ngfft 36 36 100
ngfftdg1 45 45 135
ngfftdg2 48 48 135
In the ground state run, ngfftdg = 48 48 144.


I am not sure if this is some sort of bug or if I have made some error, so any advice is appreciated!

Thanks a lot,

Ty
Attachments
gs.in
(1.44 KiB) Downloaded 453 times
pert.in
(1.77 KiB) Downloaded 461 times

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: repfn calculation crashes because ngfftdg doesnt match  [SOLVED]

Post by ebousquet » Wed Aug 12, 2020 12:07 pm

Dear Ty,
This problem usually happens when a cell relaxation is done in the ground state (the fft grid is in real space and is calculated w.r.t. cell parameters), is it the case here, I do not see a relaxation of the cell in your gs input?
Otherwise you can enforce the fft grids by setting them in the input file of the DFPT calculation.
Best wishes,
Eric

tyst3273
Posts: 8
Joined: Fri Jul 17, 2020 12:35 am
Location: Boulder, CO

Re: repfn calculation crashes because ngfftdg doesnt match

Post by tyst3273 » Wed Aug 12, 2020 3:37 pm

Hi Eric,
Thanks a lot for the reply!
There is no relaxation in the ground state calculation, and the cell parameters are identical in all runs (gs and all pert). Enforcing ngfft and ngfftdg works, thanks a lot.
Ty

Locked