MatSQ Blog > Troubleshooting-tip

[Troubleshooting Tip] ‘FFT order too large’ error in Quantum ESPRESSO 6.4

Viewed : 1407 times,  2021-03-29 08:52:45

You may panic when the old input scripts don't run in a newer version of Quantum ESPRESSO (QE). For example, in QE 6.4, during isolated system calculation, the 'FFT order too large' error occurs occasionally. Why this problem occurs? How can we solve this problem?

Error in routine good_fft_order (2050):
fft order too large


Quantum ESPRESSO uses periodic boundary conditions (PBCs). For calculating an atom or molecule in a cell without a sufficient vacuum, the interaction of infinitely repeating structures results in undesirable outcomes. On the other hand, if the cell's size is big enough, the results are always the same no matter where the atom or molecule exists. In QE 6.4, however, even if there's enough vacuum in the cell, the 'FFT order too large' error comes up when atoms are in an off-center position of the cell (Fig 1. (Left).)


Fig 1. (Left) The hydrogen atom of ID 1 is in an off-center position of the cell: error occurred. (Right) The hydrogen atom of ID 1 is in the center position of the cell: successfully done.


FFT is the abbreviation for Fast Fourier Transform. FFT allows the quickly switching between real space into reciprocal space, and consequently, DFT calculations can be performed with high efficiency. [1,2] QE automatically determines the minimum gird with the specified cell size and energy cutoff. But some unknown reasons make the FFT grid's value too large. The operation ceases, and the following error message is returned.


Fig 2. The ‘FFT order too large’ error


Error in routine good_fft_order (2050):
fft order too large

In other words, 'FFT order too large' means the calculations can't begin because the FFT dimension is too larger than the allowed maximum value in the code. This error is a bug in version 6.4, and there's no specific cause.


There are three solutions to this problem.

1. Change the initial atomic position: one of the atoms should be located at the cell's center. (Fig 1. (Right))

2. Recompile version 6.4 after modifying fft_param.f90 code: the value of 'nfftx' parameter should be higher than 2050.

3. Use the newest version of QE: e.g., 6.7


Solution 1 is the most convenient when you deal with an atom or molecule. However, the 'FFT order too large' error would occur during the calculation of surface(slab) or nanoparticles. In these cases, it is necessary to recompile QE 6.4 or use an upper version. Materials Square has updated QE 6.7 recently. Users can use both the old version and the new version of QE.


Is this tip helpful? Following 'Troubleshooting Tip' will cover various errors and their solutions in DFT and MD simulations. If you have any questions, leave a comment!


Check the Calculation Results

Refer to 'Open Research' for the summary and entire process of troubleshooting.


Entire process:



[1] LEE, June Gunn. Computational materials science: an introduction. CRC press, 2016.