The Kohn Sham matrix is not 100% occupied

mguidon manuel... at gmail.com
Tue Nov 17 11:41:59 UTC 2009


Hi Claudio.

All the "remaining memory" messages are due to a memory leak in the
code that has been fixed quite a while ago. What version of the code
are you using? Just update CP2K to the latest version and these
messages should disappear.


Manuel



On Nov 17, 12:29 pm, Claudio <marg... at gmail.com> wrote:
> Dear Manuel,
> thanks again for providing some guidance on this calculation. I did
> what you suggested, and the HF run appears to converge
>
>  1 OT CG       0.15E+00 1241.8     0.00004886     -6103.3087142795
> -6.10E+03
>
> however cube files for orbitals are full on NaN, not the density cube
> though. Furthermore I get at the end of the output something that I
> hadn't seen before on any dft calculations. Part of the output
> follows:
>
> -------------------------------------------------------------------------------
>
> -
> -
>  -                                T I M I N
> G                                  -
>
> -
> -
>
> -------------------------------------------------------------------------------
>  SUBROUTINE                       CALLS  ASD         SELF TIME
> TOTAL TIME
>                                               AVERAGE  MAXIMUM
> AVERAGE  MAXIMUM
>  CP2K                                 1  1.0    0.223    0.325
> 1305.554 1305.638
>  qs_energies_scf                      1  2.0    0.000    0.001
> 1301.807 1301.899
>  scf_env_do_scf                       1  3.0    0.000    0.000
> 1243.079 1243.128
>  init_scf_loop                        1  4.0    0.000    0.000
> 1241.378 1241.400
>  qs_ks_update_qs_env                  2  5.0    0.000    0.000
> 1240.934 1240.956
>  qs_ks_build_kohn_sham_matrix         1  6.0    0.004    0.017
> 1240.932 1240.954
>  integrate_four_center                1  7.0  143.888  246.392
> 1238.092 1238.114
>  integrate_four_center_main           1  8.0    0.000    0.001
> 1068.609 1211.585
>  integrate_four_center_bin           64  9.0 1068.608 1211.585
> 1068.608 1211.585
>  scf_post_calculation_gpw             1  3.0    0.047    0.049
> 55.556   55.600
>  ot_eigensolver                       1  4.0    0.010    0.012
> 43.961   43.963
>  dbcsr_sm_fm_multiply               304  5.0    0.031    0.036
> 43.093   43.389
>  dbcsr_sm_sm_multiply               304  6.0    0.038    0.045
> 41.428   41.557
>  dbcsr_mult_e_ec_m_rma              304  7.0   38.174   38.293
> 38.197   38.306
>
> -------------------------------------------------------------------------------
>
>   **** **** ******  **  PROGRAM ENDED AT                 2009-11-17
> 05:26:51.494
>  ***** ** ***  *** **   PROGRAM RAN
> ON                                   node014
>  **    ****   ******    PROGRAM RAN
> BY                                  claudiom
>  ***** **    ** ** **   PROGRAM PROCESS
> ID                                 11756
>   **** **  *******  **  PROGRAM STOPPED IN /home/claudiom/snapshots/
> cp2k/mmim-cl
>                                            /b3lyp/neutral
> Remaining memory: 80 bytes at 00000000375ad338 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at Remaining memory: 80 bytes at
> 0000000035dd0d98 allocated at line 1806 of /raid/home/claudiom/src/
> cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000359e0eb8 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> 0000000034c0f9a8Remaining memory: 80 bytes at 0000000034853078
> allocated at line 1808 of /raid/home/claudiom/src/cp2k/makefiles/../
> src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000347705e8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 000000003466da98 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000036afd98 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000344fc578 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 000000000472d9c8 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000047211d8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 000000000469c168 allocated at line
> allocated at line 1808 of /raid/home/claudiom/src/cp2k/makefiles/../
> src/dbcsr_util.F1806 of /raid/home/claudiom/src/cp2k/makefiles/../src/
> dbcs\
> r_util.F
> Remaining memory: 80 bytes at 00000000046ab708 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000048116f8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80
>  bytes at 00000000047d4938 allocated at line 1806 of /raid/home/
> claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: Remaining memory: 80 bytes at 00000000047d4308
> allocated at line 1808 of /raid/home/claudiom/src/cp2k/makefiles/../
> src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000047d0158 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> 80Remaining memory: 80 bytes at 0000000004812368 allocated at line
> 1808 of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 0000000004813718 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory:  bytes at 80 bytes at 000000000484e8d8 allocated at
> line 1806 of /raid/home/claudiom/src/cp2k/makefiles/../src/
> dbcsr_util.F
> Remaining memory: 80 bytes at 0000000004819838 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/
> dbcsr_util.F00000000346ce238
> Remaining memory: 80 bytes at 00000000048184a8 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000048146e8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000344fc278 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> allocated at line
> Remaining memory: 80 bytes at 000000003455bbd8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000345270e8 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 0000000034527f18 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
>  ... More segments remain
> 1806 of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 000000003469e8b8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 000000000490fea8 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 0000000004897f28 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 0000000004890c18 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 000000000473b218 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 00000000031fe748 allocated at line 1808
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 0000000004712328 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
> Remaining memory: 80 bytes at 0000000004719fd8 allocated at line 1806
> of /raid/home/claudiom/src/cp2k/makefiles/../src/dbcsr_util.F
>
> and many more lines of memory complaints...  Any ideas on how to
> overcome this are really welcome.
>
> Thanks,
> Claudio
>
> On Nov 16, 9:14 am, Claudio <marg... at gmail.com> wrote:
>
> > Thanks Manuel, I just read the paper.
> > I will try some of this and will report back.
>
> > Cheers,
> > Claudio
>
> > On Nov 16, 8:13 am, mguidon <manuel... at gmail.com> wrote:
>
> > > Hi Claudio.
>
> > > There are several issues that could cause troubles in a periodic HFX
> > > calculation:
>
> > > 1. Always use the truncated Coulomb operator, otherwise your results
> > > might converge to an unphysical wavefunction (i.e. total energies a
> > > far lower than what you would expect)
> > > 2. The sparsity-patterns of the Fock- and Kohn-Sham matrice are not
> > > the same. This issue can be solved by putting EPS_PGF_ORB to 1.0E-32
> > > or similar. (But usually, a 90 % occupied Kohn-Sham matrix is good
> > > enough, especially when you apply the truncated potential)
> > > 3. By putting a threshold on all the integrals (EPS_SCHWARZ) you
> > > introduce some random errors of the same order. As a rule of thumb,
> > > eps_schwarz should be roughly equal to the inverse square of the
> > > condition number of the overlap matrix. For example: If the condition
> > > number of the overlap matrix is 1.0E4, then you should put eps_schwarz
> > > to 1.0E-8 (but this is a worst case estimate!) Keep in mind, that the
> > > amount of work roughly doubles by decreasing eps_schwarz by one order
> > > of magnitude. It might be better to decrease the condition number of
> > > the overlap matrix by choosing a less diffuse basis set.
> > > 4. Always add the keyword EPS_STORAGE_SCALING 1.0E-1 in order to avoid
> > > suppress noise in the compression/decompression routines.
>
> > > For more details see
>
> > > J. Chem. Theory Comput., 2009, 5 (11), pp 3010-3021
>
> > > Hope that helps
>
> > > Manuel
>
> > > On Nov 16, 1:56 pm, Claudio <marg... at gmail.com> wrote:
>
> > > > Dear all, when I try to run a periodic HF calculation or a mixed HF
> > > > DFT run (b3lyp) for example. I always get
>
> > > >  *** 06:49:15 WARNING in
> > > > hfx_energy_potential:integrate_four_center         ***
> > > >  *** err=-300  The Kohn Sham matrix is not 100% occupied. This may
> > > > result   ***
> > > >  *** in uncorrect Hartree-Fock results. Try to decrease EPS_PGF_ORB in
> > > > the  ***
> > > >  *** QS
> > > > section.
> > > > ***
>
> > > > Same system converges without problem without HF using for example
> > > > PBE. I tried decreasing EPS_PGF_ORB and
>
> ...
>
> read more »



More information about the CP2K-user mailing list