DFT for large molecules fails
Closed this issue · 2 comments
CH4_010 is doing well, but all my tests for CH4_020 fail (DFT, but probably HF too).
This concerns both the serial and MPI versions.
For the serial version, the last lines printed out are:
Setting up Helmholtz arguments
------------------------------------------------------------
Potential part 3.14100e+01
and the error message:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Command terminated by signal 6
It was tested on the highmem compute-nodes too, so it is not a problem of insufficient memory.
I get errors (bad alloc) all the way down to ch4_006 (004 works, but 006-010 crash, both LDA and HF). I have only tested MPI=1/OMP=16 runs, but compiled both with and without MPI, and it seems to crash in a different place for the two. With MPI it fails already in the Fock matrix calculation before the first SCF iteration, without MPI i get the same error you report in setting up Helmholtz argument. I will investigate further.
There was one error making the serial run crash; an array too small. (Thanks Stig!)
There was a bug in the MPI send sizes accounting (maxcount). Corrected now.
Note that the code is perhaps "too" robust: even if an orbital is empty it will continue for a while. A dot product with an empty orbital does not always give zero!