LibXC giving EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8 for GGA_X/C_PBE

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Locked
Message
Author
ifilot
Newbie
Newbie
Posts: 2
Joined: Mon Aug 09, 2010 1:52 pm

LibXC giving EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8 for GGA_X/C_PBE

#1 Post by ifilot » Thu Mar 07, 2024 10:50 am

Dear VASP developers,

I compiled VASP 6.4.2 in conjunction with libXC 6.2.2 as per the instructions. When executing a benchmark calculation for a CO molecule in a large 10x10x10A unit cell, I get the following error immediately in the first SCF step.

Code: Select all

 -----------------------------------------------------------------------------
|                                                                             |
|     EEEEEEE  RRRRRR   RRRRRR   OOOOOOO  RRRRRR      ###     ###     ###     |
|     E        R     R  R     R  O     O  R     R     ###     ###     ###     |
|     E        R     R  R     R  O     O  R     R     ###     ###     ###     |
|     EEEEE    RRRRRR   RRRRRR   O     O  RRRRRR       #       #       #      |
|     E        R   R    R   R    O     O  R   R                               |
|     E        R    R   R    R   O     O  R    R      ###     ###     ###     |
|     EEEEEEE  R     R  R     R  OOOOOOO  R     R     ###     ###     ###     |
|                                                                             |
|     Error EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8                  |
|                                                                             |
|       ---->  I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <----       |
|                                                                             |
 -----------------------------------------------------------------------------
It seems to occur specifically for GGA XC-functionals. For meta-GGA and LDA, I get no errors. I also tried a few other systems, but I obtain the same error. I also tried to start the calculation from a converged PBE calculation by loading the WAVECAR, yet to no avail.

For reproduction purposes, please find attached the relevant files (POSCAR, POTCAR, KPOINTS, INCAR, OUTCAR) as well as the makefile.include I have used in the compilation.

I hope you can help me out in debugging this. Many thanks in advance for your assistance.

Best,
Ivo Filot
You do not have the required permissions to view the files attached to this post.

fabien_tran1
Global Moderator
Global Moderator
Posts: 417
Joined: Mon Sep 13, 2021 11:02 am

Re: LibXC giving EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8 for GGA_X/C_PBE

#2 Post by fabien_tran1 » Thu Mar 07, 2024 3:21 pm

Hi,

This error seems to be caused by negative values of the electron density, which can occur in the vacuum region. The way to fix this problem is to add in the file xclib_grad.F the lines

Code: Select all

         IF (D<=0) THEN
            EXC   = 0._q
            EXCD  = 0._q
            EXCDD = 0._q
            RETURN
         ENDIF
just below

Code: Select all

      ELSE IF (LEXCH==99) THEN
which is at line 337, and then recompile VASP. Thank you very much for having reported this problem.

ifilot
Newbie
Newbie
Posts: 2
Joined: Mon Aug 09, 2010 1:52 pm

Re: LibXC giving EDDDAV: Call to ZHEGV failed. Returncode = 7 1 8 for GGA_X/C_PBE

#3 Post by ifilot » Thu Mar 07, 2024 3:50 pm

Thank you for the quick response! I can confirm that this fix resolves the error.

For whoever is interested, I made a small patch file. To apply the patch

Code: Select all

cd src
wget https://gist.githubusercontent.com/ifilot/c83740bc21aa7231e4e7d442e16e879c/raw/69411fd8b925f1ac9248bfc3733840b98a8b1c2c/vasp6.4.2_xclib_grad.F.patch
patch -p0 < vasp6.4.2_xclib_grad.F.patch
To check, md5 checksum after patching

Code: Select all

md5sum xclib_grad.F
should yield

Code: Select all

e60aaf89af9a4f8b8eda0ddde7a3d3fb  xclib_grad.F
After patching, compile as normal.

Locked