[gpaw-users] kpt parallel use

Ask Hjorth Larsen asklarsen at gmail.com
Sat Jul 21 03:20:30 CEST 2012


Dear Torsten

2012/7/20 Torsten Hahn <Torsten.Hahn at physik.tu-freiberg.de>:
> Dear Users,
>
> can someone point me to an basic example on how to deal correct with kpt / spin parallelization in GPAW?
>
> As i understand, from an calculator calc = GPAW(...)
>
> i get the
>
> calc.wfs.kpt_u list.
>
> if i iterate over that list
>
> result = np.zeros(len(kpt_u), dtype='d')
>
> for kpt in kpt_u:
>     # do something to calculate result using kpt, e.g.
>     result = kpt.C_nM ...
>
>
> Do i have to "collect" (<- i do not know if this is the correct syntax) result on the master? As i understand if i do it like above the array result is scattered over the nodes?

On each CPU, the loop goes over all k-points for which that CPU is
responsible.  In general there may well be multiple CPUs with the same
k-point, and multiple k-points per CPU.  Depending on what you want to
do, you may have to do some operation such as collecting or summing -
at least if you want the result to be the same on all CPUs.  I cannot
say which without knowing what you actually want to do.

Regards
Ask


More information about the gpaw-users mailing list