[Pw_forum] Is ndiag effective in scf process?

Paolo Giannozzi p.giannozzi at gmail.com
Fri Nov 24 14:04:05 CET 2017


Parallelization option "-ndiag" is effective only on dense-matrix
diagonalization and related matrix-matrix operations, involving M x M
matrices, with M = number of bands x a small factor (1 to 4 at most).
For M smaller than a few hundreds, the cost of such operations is small and
the advantage of linear-algebra diagonalization negligible. When M is in
the thousands, though, you need it, not only to speed up the calculation
but also to distribute those large matrices.

You can find how much time you spend in parallelizable linear-algebra
operation in items "rdiaghg" or "cdiaghg", in the final time report.

Paolo

On Wed, Nov 22, 2017 at 12:20 PM, balabi <balabi at qq.com> wrote:

> Dear developers,
>     I tried to use -ndiag options in scf process. Because I read tutorials
> which says "most CPU time spent in linear-algebra operations, implemented
> in BLAS and LAPACK libraries, and in FFT". And what linear algebra
> parallelization does is to "Distribute and parallelize matrix
> diagonalization and matrix- matrix multiplications needed in iterative
> diagonalization (SCF) ". So I thought adding -ndiag should have an obvious
> speedup. To test, I artificially construct a 2x2 supercell of copper which
> contains 8 atoms, and run
>
> mpiexec.hydra -n 12 pw.x -ndiag 9 -in cu_supercell.scf.in >
> cu_supercell.scf.out
>
> But I didn't see any improvement over no -ndiag run. The timing is almost
> the same. I check the output file, it does show that
>
> Subspace diagonalization in iterative solution of the eigenvalue problem:
>      one sub-group per band group will be used
>      scalapack distributed-memory algorithm (size of sub-group:  3*  3
> procs)
>
> I also test a more practical case with a material of 23 atoms in primitive
> cell, and see no improvement. So I am wondering what is wrong? Is -ndiag
> not effective for scf?
>
>
> best regards
>
>
>
>
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>



-- 
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20171124/14a88e6b/attachment.html>


More information about the users mailing list