OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
96 stars 25 forks source link

Memory error associated with LibXC module #299

Closed davidbowler closed 3 months ago

davidbowler commented 4 months ago

I don't have a full diagnosis, but when running Conquest (both v1.2 and latest develop) using a Ge ion file using PBESol (linked to libXC 6.2.2, compiled using Intel 2020_u4, OpenMPI, MKL, FFTW 3.3.10) I get an error "corrupted size vs. prev_size" which appears to come from glibc and indicate memory overwriting. Using the exact same inputs and code but with PBE and CQ XC the crash does not happen. This occurs with the simple example attached; I don't know if the error is in Conquest, LibXC or elsewhere yet! MemoryErrorLibXC.zip

davidbowler commented 3 months ago

I have now found further examples of this (see attached input) though it seems to be system-dependent: this example crashes on a variety of Linux RHEL workstations (and both GCC and Intel compilers) but does not on Mac/GCC. I have tracked down the problem to badly written array access in the XC_LibXC modules (cough this may have been me...) and I think that I have rewritten the arrays with a fix: branch and PR coming soon.

CrashExample.zip

davidbowler commented 3 months ago

Fixed by #328