error in tddft calculation

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

Moderator: bguster

Locked
golden
Posts: 19
Joined: Fri May 13, 2011 8:08 pm

error in tddft calculation

Post by golden » Mon Aug 08, 2011 5:45 pm

Dear Abinit Users,

According to the tddft tutorial I was able to run the test calculations, and by using the input information I did tried to calculate the excitation energies for my model system, which had metal atoms. In which I encountered problems.

As in the example I used the input with slight changers, as my system is negativly charged (-1), and is a closed shell system ;

ndtset 2

#DATASET 1 SCF
iscf1 5
tolwfr1 1.0d-15
nband1 5
prtden1 1
getwfk1 0

#DATASET 2 TDDFT
iscf2 -1
tolwfr2 1.0d-9
nband2 12
getden2 1
getwfk2 1

#Common
acell 30 30 30 angstroms
boxcenter 3*0.0d0
diemac 1.0d0 diemix 0.5d0
ecut 25
ixc 7

kptopt 0 # Enter the k points manually

charge -1

natom 61
nbdbuf 0

nstep 500
ntypat 3

---------------------
When trying to run the above I encounted the error:
distrb2: WARNING -
nproc_kpt= 6 >= nkpt= 1* nsppol= 1
The number of processors is larger than nkpt. This is a waste.
invars1: mkmem undefined in the input file. Use default mkmem = nkpt
invars1: With nkpt_me= 1 and mkmem = 1, ground state wf handled in core.

invars1 : WARNING -
your number of k-points ( 1) will not distribute correctly:
with the current number of processors ( 6).
you will leave some empty and this is forbidden.

ACTION: you can reduce number of processors to 1
without losing speed
invars1: mkqmem undefined in the input file. Use default mkqmem = nkpt
invars1: With nkpt_me= 1 and mkqmem = 1, ground state wf handled in core.

invars1 : WARNING -
your number of k-points ( 1) will not distribute correctly:
with the current number of processors ( 6).
you will leave some empty and this is forbidden.

ACTION: you can reduce number of processors to 1
without losing speed
invars1: mk1mem undefined in the input file. Use default mk1mem = nkpt
invars1: With nkpt_me= 1 and mk1mem = 1, ground state wf handled in core.

invars1 : WARNING -
your number of k-points ( 1) will not distribute correctly:
with the current number of processors ( 6).
you will leave some empty and this is forbidden.

ACTION: you can reduce number of processors to 1
without losing speed

DATASET 1 : space group P-1 (# 2); Bravais aP (primitive triclinic)
inkpts: Sum of 1 k point weights is 1.000000

chkneu : ERROR -
Initialization of occ, with occopt= 1
There are not enough bands to get charge balance right
Action : modify input file ...
(check the pseudopotential charges, the variable charge,
and the declared number of bands, nband)
-P-0000
-P-0000 leave_new : decision taken to exit ...


----

the error talks about that "There are not enough bands to get charge balance right" -- how can I select the correct number of bands?
As the system has gold atoms, S , and H atoms ..
Do I need to calculate the number of electrons and divide it by 2 to get the number of bands to be used?

But when I commented out the nband1 5 in the above input file the calculation started runing.. but I do not know whether it will run properly or not..
Bellow is the changed input file; when I specified it to run on 6 procs it started runing...

ndtset 2

#DATASET 1 SCF
iscf1 5
tolwfr1 1.0d-15
# nband1 5
prtden1 1
getwfk1 0

#DATASET 2 TDDFT
iscf2 -1
tolwfr2 1.0d-9
# nband2 12
getden2 1
getwfk2 1

#Common
# acell 6 2*5 Angstrom
acell 30 30 30 angstroms
boxcenter 3*0.0d0
diemac 1.0d0 diemix 0.5d0
ecut 25
ixc 7

kptopt 0 # Enter the k points manually

charge -1

natom 61
nbdbuf 0

nstep 500


I would really appreciate if you can shed some light for my problem. Thank you very much

david.waroquiers
Posts: 138
Joined: Sat Aug 15, 2009 12:45 am

Re: error in tddft calculation

Post by david.waroquiers » Wed Aug 10, 2011 11:35 am

Hello,

If you do not set nband, abinit will do it for you (doing exactly what you suggest and adding a few more).
In practice, for a metallic system, you should allways check that you have enough bands (the "mandatory" ones, given by the number of electrons in the system divided by 2 if your system is unpolarized, plus a few more, so that the occupation of the very last band is 0.000 for every k-point). For a metallic occupation (occopt >= 3), the number of bands might change depending on the smearing factor you use for the occupation (tsmear) : if you increase tsmear, you might need to increase the number of bands (when you increase tsmear, you put more electrons to higher energy levels). Note that if you do not set it by yourself, the number of bands might not be enough (even if the calculation will continue), you have to check !

I hope it answers your question.

David

golden
Posts: 19
Joined: Fri May 13, 2011 8:08 pm

Re: error in tddft calculation

Post by golden » Wed Aug 10, 2011 2:58 pm

david.waroquiers wrote:David


Thank you very much David.

golden
Posts: 19
Joined: Fri May 13, 2011 8:08 pm

Re: error in tddft calculation

Post by golden » Wed Aug 10, 2011 3:03 pm

I was running my calculation on 6 procs ,

when it ran it gave me an error in the previous, saying
distrb2: WARNING -
nproc_kpt= 6 >= nkpt= 1* nsppol= 1
The number of processors is larger than nkpt. This is a waste.
invars1: mkmem undefined in the input file. Use default mkmem = nkpt
invars1: With nkpt_me= 1 and mkmem = 1, ground state wf handled in core


As I am specifying my system as a molecule (which is one k point)

Can't I run the calculation in parallel ? will it run the same if i run it on serial as in parallel?

Thank you very much for the help given.

david.waroquiers
Posts: 138
Joined: Sat Aug 15, 2009 12:45 am

Re: error in tddft calculation

Post by david.waroquiers » Thu Aug 11, 2011 11:33 am

Hello,

Yes, if you run it like that, it will run the same in sequential as in parallel because the default parallelization is over k-points. If you want to parallelize over bands and fft, you have to use the paral_kgb variable and the other related variables (npband .... etc) :
http://www.abinit.org/documentation/helpfiles/for-v6.8/input_variables/varpar.html#paral_kgb

Note that this parallelization is efficient only if your processors can communicate fast. For example, if the ethernet between nodes is slow and if you have 8 cores in one node, you should run with 8 processors maximum.

David

golden
Posts: 19
Joined: Fri May 13, 2011 8:08 pm

Re: error in tddft calculation

Post by golden » Fri Aug 12, 2011 9:06 pm

Hi,

when I commented out nband1 nband2 in the input file calculation finished with giving the lowest 20 excitation energies.

But When I used

ndtset 2

#DATASET 1 SCF
# iscf1 5
iscf1 7
tolwfr1 1.0d-12
nband1 201
prtden1 1
getwfk1 0

#DATASET 2 TDDFT
iscf2 -1
tolwfr2 1.0d-9
nband2 402
getden2 1
getwfk2 1


after finishing dataset1 halfway through the calculation it stoped with giving an error;

==== FFT mesh ====
FFT mesh divisions ........................ 144 144 144
Augmented FFT divisions ................... 145 145 144
FFT algorithm ............................. 102
FFT cache size ............................ 16
getmpw: optimal value of mpw= 1320073

getcut: wavevector= 0.0000 0.0000 0.0000 ngfft= 144 144 144
ecut(hartree)= 25.000 => boxcut(ratio)= 2.11597
scfcv : before setvtr, energies%e_hartree= 0.0000000000000000

ewald : nr and ng are 3 and 15
mklocl_recipspace : will add potential with strength vprtrb(:)= 0.0000000000000000 0.0000000000000000
setvtr : istep,n1xccc,moved_rhor= 1 2501 0
scfcv : after setvtr, energies%e_hartree= 0.0000000000000000
vtorho : nnsclo_now=500, note that nnsclo,dbl_nnsclo,istep= 0 0 1
[gold:19138] *** Process received signal ***
[gold:19138] Signal: Segmentation fault (11)
[gold:19138] Signal code: Address not mapped (1)
[gold:19138] Failing at address: 0x24a5fa1f8
[gold:19138] [ 0] /lib64/libpthread.so.0(+0xf2e0) [0x2b34d3e1d2e0]
[gold:19138] [ 1] /usr/lib64/mpi/gcc/openmpi/lib64/libopen-pal.so.0(_int_malloc+0x811) [0x2b34d3061021]
[gold:19138] [ 2] /usr/lib64/mpi/gcc/openmpi/lib64/libopen-pal.so.0(malloc+0x95) [0x2b34d3062395]
[gold:19138] [ 3] abinit(tddft_+0x3e1e) [0x593e3e]
[gold:19138] [ 4] abinit(vtorho_+0xab31) [0x5438d1]
[gold:19138] [ 5] abinit(scfcv_+0x335c) [0x513b5c]
[gold:19138] [ 6] abinit(scfcv_new_+0x5e7) [0x505217]
[gold:19138] [ 7] abinit(gstate_+0xa6a3) [0x4b4e63]
[gold:19138] [ 8] abinit(gstateimg_+0x1419) [0x45ffb9]
[gold:19138] [ 9] abinit(driver_+0x45b2) [0x457102]
[gold:19138] [10] abinit() [0x450df0]
[gold:19138] [11] abinit(main+0x1f) [0x452b3f]
[gold:19138] [12] /lib64/libc.so.6(__libc_start_main+0xfd) [0x2b34d425fb7d]
[gold:19138] [13] abinit() [0x44f1b9]
[gold:19138] *** End of error message ***


Is the error something to do with the memory?
I ran the above using single proc.

Q2; Is there any way to increase the printed excitation transitions from 20 to 100 ? (the program as a default prints out 20 lowest transitions)

Thank you very much

Locked