I encountered a bug in attempting to do a b3lyp with GD3 vdW correction. Attached are all the associated files. How do I fix/get-around this?
Bug in running B3LYP with IVDW=12
Moderators: Global Moderator, Moderator
-
KWH
- Jr. Member

- Posts: 57
- Joined: Fri Feb 09, 2018 2:05 am
- License Nr.: 5-1063
Bug in running B3LYP with IVDW=12
-
michael_wolloch
- Global Moderator

- Posts: 245
- Joined: Tue Oct 17, 2023 10:17 am
Re: Bug in running B3LYP with IVDW=12
Dear KWH,
I tried to reproduce the bug on a small workstation using an Intel OpenMP compile of version 6.2.0 (as you seem to have) on 8 ranks and 2 threads. The calculation finishes the first SCF cycle normally, but segfaults at the first ionic update (also not good, but different).
However, when I use only one OpenMP thread per rank, the error you observe appears.
Please try again with 4-8 MPI ranks and a couple of OpenMP threads for each rank, and report back. The very large number of MPI ranks you used (124) for such a small system will not speed up the calculation.
As a side note: your setting of NCORE=124 is extremely inefficient. Usually, for an OpenMP compile, it is ignored anyhow and reset to 1 internally, but only if OMP_NUM_THREADS>1. If you are using an OpenMP build, make sure to set OMP_NUM_THREADS to a reasonable value for your system (e.g., 4 to 8 is usually fine), or set NCORE as described in the documentation, to get performant FFTs.
Otherwise, you can try to compile without OpenMP.
I tested a bit with the current release version, 6.6.0, and did not encounter the bug you found, even when running with only 1 thread with the OpenMP version. However, I did sporadically encounter another bug that I will investigate.
Let me know if setting OMP_NUM_THREADS>1 works for you,
Cheers, Michael
-
KWH
- Jr. Member

- Posts: 57
- Joined: Fri Feb 09, 2018 2:05 am
- License Nr.: 5-1063
Re: Bug in running B3LYP with IVDW=12
Thank you.
I tried to implement your suggestions, but I think I got it wrong. In the submission script I have:
#SBATCH --ntasks=20
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=7300
### this will commit 80 cpu's to the job
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
And in the INCCAR file I have
NCORE = 4
And the calculation is for a single k point (1 1 1).
When I try to run this the electronic optimization starts but then end in eror.
[cn187:121052:0:121112] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x14706dc3e000)
[cn187:121049:0:121095] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x14d35eaaa000)
forrtl: severe (154): array index out of bounds
forrtl: severe (154): array index out of bounds
[cn187:121057:0:121128] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x14923c7b3000)
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
[cn187:121059:0:121092] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x14b6e9d18000)
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
*** longjmp causes uninitialized stack frame ***: terminated
Can you identify what I am doing wrong and how I should change the INCAR and batch file?