Page 1 of 1
Memory allocation error when running hybrid functional band structure with KPOINTS_OPT (WRK ALLOCATE: ERROR)
Posted: Wed Nov 12, 2025 4:16 pm
by shihao_tu
Dear VASP developers and users,
I am trying to perform a hybrid functional (PBE0) band structure calculation for a supercell, using KPOINTS (Gamma-only) for the SCF step and KPOINTS_OPT for the band structure step.
The SCF part runs well, but when the calculation enters the KPOINTS_OPT stage, it immediately crashes with the following error message:
WRK ALLOCATE: ERROR: could not allocate enough workspace. Try reducing NBLOCK_FOCK.
Even after I set: KPOINTS_OPT_NKBATCH = 1 NBLOCK_FOCK = 32 , the error still appears.
I understand that NCORE = 1 is required for the hybrid band-structure step with KPOINTS_OPT, but even when following this, the memory allocation error persists. Is there any other recommended combination of parallelization parameters for hybrid-functional band-structure runs using KPOINTS_OPT?
Best,
Shihao
Re: Memory allocation error when running hybrid functional band structure with KPOINTS_OPT (WRK ALLOCATE: ERROR)
Posted: Thu Nov 13, 2025 7:46 am
by marie-therese.huebsch
Dear Shihao,
Thank you for bringing this to our attention. Could you please share a minimal reproducible example including the technical details of your hardware? From the top of my head, I am not sure how to fix this problem, but we will look into it.
Re: Memory allocation error when running hybrid functional band structure with KPOINTS_OPT (WRK ALLOCATE: ERROR)
Posted: Thu Nov 13, 2025 10:57 pm
by shihao_tu
I previously mentioned that the problem could be alleviated by increasing the number of nodes to reduce the memory load, but now I’ve encountered a new issue. This time, it’s a bug that I need to report to the developers. When I use a hybrid functional to calculate the supercell band structure, it can run a few steps of the KPOINTS_OPT band calculation, but then it stops midway and crashes with an error!
The bug said
internal error in: mkpoints_full.F at line: 992
internal error in CHECK_GEN_LAYOUT: G-vectors changed 8 1034 -35
-36 17 17 0 0
If you are not a developer, you should not encounter this problem.
Please submit a bug report.
Actually, when I compute the primitive cell (3 atoms), I don’t meet this problem!
Here is a reproducible example.
Re: Memory allocation error when running hybrid functional band structure with KPOINTS_OPT (WRK ALLOCATE: ERROR)
Posted: Mon Dec 01, 2025 8:19 am
by marie-therese.huebsch
Sorry for the long scilence. Unfortunately the forum had a system change and we did not notice that the notification where not send for quite some time. So I totally missed your response. I will look into it this week and get back to you with an update asap.
Re: Memory allocation error when running hybrid functional band structure with KPOINTS_OPT (WRK ALLOCATE: ERROR)
Posted: Mon Dec 01, 2025 10:16 am
by marie-therese.huebsch
Some comments and questions I have before I can reproduce the bug :
EDIFF = 1E-3 is just to create a quick test calculation, right? I am unsure since you left other tags in like LORBIT, EDIFFG and ALGO=All. I'd rather set NELM to stop after a few steps (e.g. 6) and ALGO=Fast to test the setup.
Sorry for the random order. Please be so kind and share your thoughts on the above and I will continue working on this issue (without delay, I promise).