Runtime error during LDA+DMFT  [SOLVED]

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Runtime error during LDA+DMFT

Post by PhilippBa » Tue May 26, 2015 7:46 pm

Dear all,

i got some serious trouble running LDA+DMFT. The system under investigation is a cobalt atom adsorbed on a copper(001) surface. The code runs properly through the first DMFT loop but ends with a runtime error at line 513 of file m_oper.F90.
I obtain the Gtau.dat and it looks quite well but i need the code to finish, to obtain the total energy either.

My input:



nstep 1
toldfe 1.0d-6
ixc 2
occopt 3
tsmear 0.01

...(atomic data skipped)

istwfk *1

#LDA+U stuff

lpawu -1 2
dmatpuopt 1
upawu 0.0 4.0 eV # Values for U
jpawu 0.0 0.9 eV # Values for J
f4of2_sla 0.0 0.625


# DMFT stuff



usedmft 1
dmft_solv 5 # CTQMC
dmft_mxsf 1.0
dmftbandi 1
dmftbandf 902
dmft_nwli 10000
dmft_nwlo 200
dmft_tollc 0.000001
dmft_iter 1
dmft_dc 1
dmft_entropy 0
dmft_nlambda 6
dmftqmc_l 100
dmftqmc_n 30000000
dmftqmc_therm 10000
#dmft_t2g 1
dmft_rslf 1
dmftctqmc_grnns 1


After the first (and only) DMFT loop ends, the rest of my output looks like this:


== Compute Band Energy terms for DMFT

-----------------------------------------------
--- Energy in DMFT (in Ha)
--- E_bandlda (1) (Ha.) = ***************
--- E_banddmft(2) (Ha.) = ***************
--- E_hu (3) (Ha.) = 3.68714008197
--- E_hu_mig (4) (Ha.) = 3.69238083601
--- E_hu_qmc (4) (Ha.) = 3.68714008197
--- E_hu_ldau (5) (Ha.) = 3.78866366961
--- E_dc (6) (Ha.) = 3.69855097171
--- edmft=( 3-6)(Ha.) = -0.01141088975
-----------------------------------------------

== The converged DMFT occupations (integral of the Green function) are ==

= In the atomic basis

-------> For Correlated Atom 91

-- polarization spin component 1
0.67207 0.00000 0.00000 -0.00000 0.00000
0.00000 0.76316 -0.00000 0.01713 0.00000
0.00000 -0.00000 0.76706 0.00000 0.00000
-0.00000 0.01713 0.00000 0.76316 0.00000
0.00000 0.00000 0.00000 0.00000 0.85377

= In the KS basis

--isppol-- 1

- ( in the following only the value for the first k-points are printed)

Writes occupations for k-pt 1and between bands 1 and 902




This is were the code stops. This example was a supercell with 91 atoms (90 copper and 1 cobalt) and i only need one DMFT loop. The memory can not be the problem, since my error report from our high performance cluster told me, that ~38 GB memory were needed (on a 96 GB node). If i run the code with SrVO3, i got no troubles. So i guess that there are some unsuitable settings in my input file.


I realy welcome suggestions!

Best regards from germany!


EDIT: I use Version 7.10.4
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

amadon
Posts: 46
Joined: Mon Aug 24, 2009 10:58 am

Re: Runtime error during LDA+DMFT

Post by amadon » Wed May 27, 2015 9:13 am

Dear Philipp,

First of all, could you give your name and affiliation, thanks a lot !

Concerning your calculation, it is just that you use a lot of bands.
So a format for a printing need to be changed in the source
So you have first to change at line 512 515 and 518 of m_oper.F90 the occurence of 1000 by 2000, recompile
and relaunch your calculation. It should run...

Best regards.
Bernard Amadon
CEA
France
Bernard Amadon
CEA
France

PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Re: Runtime error during LDA+DMFT

Post by PhilippBa » Wed May 27, 2015 9:47 am

Thanks a lot!
For first test's it worked by commenting out the if statement beginning at line 513.

Best regards,
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Re: Runtime error during LDA+DMFT

Post by PhilippBa » Thu May 28, 2015 4:13 pm

A new problem occurred and i hope it is ok if post it in this topic!

The problem now is, that the difference between the LDA+U density matrix (input WFK) and the density matrix of the diagonalized wavefunction is too large.

--- !WARNING
message: |

Differences between LDA+U density matrix from INPUT wfk and
Direct calculation of density matrix with psichi from DIAGONALIZED wfk is too large:
0.9369E-01 is larger than 0.1000E-02
src_file: m_matlu.F90
src_line: 1005


If i reduce the system size to 19 atoms (which is just one monolayer of copper with a cobalt adatom) everything works fine. I used this small system to check my input parameters (for the ground state calculation as well as the DMFT). However if i now increase the system to 55 atoms (which are three layers of copper), the warning above appears. The difference in the density matrices results in a wrong occupation of my correlated atom. Since I checked and tested different input values, I really do not see what the mistake is.

But the question know: Could it be that for such a large system, the variables in the Fortran code are too short defined? So that maybe not all of the lines (of the input WFK )are read?


Best regards,
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

amadon
Posts: 46
Joined: Mon Aug 24, 2009 10:58 am

Re: Runtime error during LDA+DMFT

Post by amadon » Fri May 29, 2015 9:22 am

Dear Philipp

If all the following conditions are fulfilled, the problem should (in principle) not appear:

Code: Select all

&     '    -> These two quantities should agree if three conditions are fulfilled',ch10,&
&     '         -  input wavefunctions come from the same Hamiltonien (e.g LDA/GGA)',ch10,&
&     '         -  dmatpuopt is equal to 1',ch10,&
&     '         -  all valence states are in the valence',ch10,&
&     '    (for experts users: it is not compulsary that these conditions are fulfilled)'


I assume you start from an LDA calculation and you restart from LDA to do LDA+DMFT, and that dmatpuopt =1
because otherwise your calculation with 19 atoms should have the same problem.
So it might be that all valence states are not in the valence ?
Did you check that the band 902 is empty in the LDA calculation and that the LDA calculation is converged both as regard the density residual and the diagonalisation of wavefunctions ?
If all these conditions are fulfilled, we have to investigate more : First, could you reproduce the following lines of the output (ie the two density matrices compared). Secondly, how many valence electrons do you have in your Cobalt and Copper pseudopotential ? Thirdly, could you submit an input file that reproduce the problem ?

Concerning your question: calculations with 55 atoms are not a problem for ABINIT, and WFK I/O can handle it.
Best regards
Bernard
Bernard Amadon
CEA
France

PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Re: Runtime error during LDA+DMFT

Post by PhilippBa » Fri May 29, 2015 11:45 am

Thanks for the fast response!

I will give you detailed information about the smallest calculation (19 atoms) that give the same error (I attached the two inputs that reproduces the warning). This is (for testing purposes) faster to handle than the large supercell =)

Yes I do start with a LDA calculation, followed by DMFT.
The LDA calulation converged in cycle 54:

ETOT 54 -3711.1833953143 -4.912E-07 1.568E-06 1.248E-06

Does the last column is the density residual? And how can i check the convergence of the diagonalisation of the wavefunction?

In the previous case (with the larger number of atoms), band 902 was empty. In the case now band 250 should be empty, too (i included several empty bands).

Here are the two two compared matrices:


LDA+U density matrix from INPUT wfk

-------> For Correlated Atom 19

-- polarization spin component 1
0.50094 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-0.00000 0.00000 0.50121 0.00000 0.00000 0.00000 -0.00000 0.00000 -0.00000 0.00000
0.00000 0.00000 0.00000 0.00000 0.53269 0.00000 -0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 -0.00000 0.00000 -0.00000 0.00000 0.50121 0.00000 -0.00000 0.00000
0.00000 0.00000 -0.00000 0.00000 0.00000 0.00000 -0.00000 0.00000 0.51722 0.00000

Direct calculation of density matrix with psichi from DIAGONALIZED wfk

-------> For Correlated Atom 19

-- polarization spin component 1
0.44068 0.00000 0.00000 0.00578 -0.00000 0.00000 -0.00000 -0.00578 0.00000 0.00000
0.00000 -0.00578 0.41598 0.00000 -0.00000 -0.00277 0.00000 0.00000 0.00000 -0.00235
-0.00000 -0.00000 -0.00000 0.00277 0.49598 0.00000 0.00000 -0.00277 0.00000 0.00000
-0.00000 0.00578 0.00000 0.00000 0.00000 0.00277 0.41598 0.00000 0.00000 -0.00235
0.00000 0.00000 0.00000 0.00235 0.00000 0.00000 0.00000 0.00235 0.48270 0.00000


In the PSP of Cobalt are 17 valence electrons and 19 in the case of Copper. I am not sure if I did my inputs correct, since ABINIT and DMFT is totally new for me.

Best regards,
Philipp



EDIT: I used a very high value for nband in this case, but i guess that this is not a problem.
Attachments
lda.in
(957 Bytes) Downloaded 253 times
DMFT.in
(1.41 KiB) Downloaded 243 times
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

amadon
Posts: 46
Joined: Mon Aug 24, 2009 10:58 am

Re: Runtime error during LDA+DMFT

Post by amadon » Fri May 29, 2015 1:14 pm

Dear Philipp,

I have several remarks.
Firstly, as underlined in http://www.abinit.org/doc/helpfiles/for-v7.10/input_variables/vardev.html#usedmft, the eigenfunctions of KS Hamiltonian
has to be precisely computed. It can be checked with the 5th column of your ETOT line that the convergence is not so good (1.568E-06). It should
be better to have it at least below 1.E-10: using nline 5 and nnsclo 5 in both input (lda.in and dmft.in) should improve this.
Nevertheless, it should not play such a role in your case.
Moreover, your could decrease toldfe (or instead tolvrs) to improve the convergence of the self consistent DFT cycle.

Secondly and more importantly, in your input files,
the smearing (or temperature) are not the same for the LDA and DMFT calculations: so the density computed in the second dataset from the LDA eigenfunctions will change.
So could you try to relaunch the calculation with the same smearing in the two inputs
(you just have to change the DMFT.in output with tsmear=0.01 instead of tsmear=0.01 eV).

If this not solve the problem: You said in one of your last post that you have a 19 atoms calculation which do not show this Warning. Could you post your relevant input files ?

Best regards
Bernard
Bernard Amadon
CEA
France

PhilippBa
Posts: 15
Joined: Tue May 26, 2015 7:22 pm

Re: Runtime error during LDA+DMFT  [SOLVED]

Post by PhilippBa » Fri May 29, 2015 5:31 pm

Many thanks for your help and your suggestions!

The problem has been solved by using the same smearing in the LDA and DMFT calculation. I will also change my inputs according to your suggestions about the convergence.


Best regards,
Philipp
Philipp Bahlke
University of Hamburg
Institute for inorganic and applied chemistry
Germany

Locked