[SOLV] band parallelization (1 k-point); paral_kgb, wfoptalg

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

Moderator: bguster

Locked
elena.mol
Posts: 17
Joined: Wed Apr 21, 2010 1:05 pm

[SOLV] band parallelization (1 k-point); paral_kgb, wfoptalg

Post by elena.mol » Thu Aug 12, 2010 4:05 pm

Hello,
i'm trying to run “optic” calculations with Abinit5.8.4 in parallel, and I would like to parallelize only on bands (I have a single molecule in a big box, so i'm using 1 k-point).

If I use the keywords: wfoptalg (=1) and nbdblock (=4 for instance), without setting paral_kgb, the calculation runs, but with bad scaling with respect to the number of processors used, and in the .log file I find:

“ inkpts : istwfk preprocessed, gives following first values (max. 6): 2

npfft, npband and npkpt 1 1 4

mpi_enreg%sizecart(1),np_fft 1 1

mpi_enreg%sizecart(2),np_band 1 1

mpi_enreg%sizecart(3),np_kpt 4 4”


so it seems Abinit is taking for kpoints the number I specify for bands.


If instead I use:
paral_kgb 1
wfoptalg 4
npband n
npfft 1

as suggested in the input variables page, (n is the n. of processors I want to use), I get something like

inkpts : istwfk preprocessed, gives following first values (max. 6): 2

npfft, npband and npkpt 1 16 1

mpi_enreg%sizecart(1),np_fft 1 1

mpi_enreg%sizecart(2),np_band 16 16

mpi_enreg%sizecart(3),np_kpt 1 1


where in this case I have put npband=16

but then Abinit stops with the following error:

“chkint: ERROR -

Context : the value of the variable fftalg is 112.

The value of the input variable wfoptalg is 4, while it must be

equal to one of the following: 0 1 2 3 10 11

Action : you should change the input variable wfoptalg.”



So I tried this:

paral_kgb 1
wfoptalg 1
npband n
npfft 1

but in this case I get:

chkinp : ERROR -

The value of wfoptalg is found to be 1

This is not allowed in the case of band-FFT parallelization.

Action : put wfoptalg = 4 or 14 in your input file


So, which is the correct set of keywords to use in this case, i.e., to parallelize only on bands? By the way, I don't think the problem is specific for the “optic” module; with structural optimization runs (ionmov=2) I find an analogous behaviour with respect to parallelization keywords.


Thanks a lot in advance
Elena Molteni
Department of Physics
University of Milan
via Celoria, 16
20133, Milan, Italy

Boris
Posts: 128
Joined: Tue Feb 16, 2010 10:13 am
Location: France

Re: band parallelization (1 k-point); paral_kgb, wfoptalg

Post by Boris » Fri Aug 20, 2010 1:18 pm

Dear Elena,

Try using this set of keywords. These are the ones I'm using for hundred atom supercells and it works pretty well:

PARAL_KGB= 1
NPKPT= 1
NPBAND= N
NPFFT= 1
WFOPTALG= 14
NLOALG= 4
FFTALG= 401
FFT_OPT_LOB= 2
ACCESSWFF = 1

The last keyword is not mandatory but I find it useful for restarting a calculation that hasn't converged in the given run time. I also noticed that the larger NPBAND, the easier the convergence.

Regards

Boris Dorado
----------------------------------------------------------
Boris Dorado
Atomic Energy Commission
France
----------------------------------------------------------

elena.mol
Posts: 17
Joined: Wed Apr 21, 2010 1:05 pm

Re: band parallelization (1 k-point); paral_kgb, wfoptalg

Post by elena.mol » Thu Sep 09, 2010 12:06 pm

Hello,
thanks Boris for your suggestion! I used the set of keywords you indicated

paral_kgb 1
npkpt 1
npband n
npfft 1
wfoptalg 14
nloalg 4
fftalg 401
fft_opt_lob 2
accesswff 1

but with version 6.2.2. of abinit, as suggested in the meantime by Matthieu answering my post on restartxf (viewtopic.php?f=8&t=561, thanks Matthieu for your suggestion!)
This version, used on geometry optimization calculations, solved my problems both on restartxf and on band parallelizaiton.

Then I tried "optic" calculations, with the same abinit6.2.2 version, following the examples in .../abinit-6.2.2/tests/tutorespfn/Input/ , adapted to my system, but with the same scheme of subsequent datasets, and using the same set of parallelization keywords as above (i'm attaching the input file, toptic_3.in). The code runs through the first 3 datasets, and then stops with this error :


mkrho.F90:500:BUG

the bandfft tabs are not allocated !

Action : contact ABINIT group.


while the same calculations run in serial mode work correctly.
For comparison, the same calculations with abinit5.8.4 “parallelized in a wrong way” i.e. taking npband as if it were npkpt, or stopped with errors, depending on the parallelization keywords used (viewtopic.php?f=8&t=533 )

Can someone tell me if there is some “macroscopic” error in my input, or anyway how to avoid this problems?

many thanks in advance
Elena Molteni
Department of Physics
University of Milan
via Celoria, 16
20133, Milan, Italy
Attachments
toptic_3.in
input file
(6.6 KiB) Downloaded 369 times

mverstra
Posts: 655
Joined: Wed Aug 19, 2009 12:01 pm

Re: band parallelization (1 k-point); paral_kgb, wfoptalg

Post by mverstra » Sat Sep 25, 2010 3:22 am

It's probable that the ddk calculations are not compatible with the full kgb parallelization. Full DFPT (phonon) calculations use band parallelism by default (you don't need to do anything), and it's possible that ddk does too (can someone confirm this?). You'll need to remove the kgb stuff for the ddk datasets in any event.

Matthieu
Matthieu Verstraete
University of Liege, Belgium

elena.mol
Posts: 17
Joined: Wed Apr 21, 2010 1:05 pm

Re: band parallelization (1 k-point); paral_kgb, wfoptalg

Post by elena.mol » Thu Sep 30, 2010 2:41 pm

Thanks Mathieu for your suggestion!
I splitted the "optic" calculation (with abinit6.2.2) into 2 different runs (since i noticed that paral_kgb cannot be specified separately on different datasets): the first run corresponding to the first 3 datasets of the original "optic" tutorial, where i specified paral_kgb and related keywords, and the second run corresponding to datasets 4 to 6 (involving ddk), where i didn't put any parallelization keywords. This way it works fine.
Thanks

Elena Molteni
Department of Physics
University of Milan
via Celoria, 16
20133, Milan, Italy

Locked