<div dir="ltr"><div dir="ltr"><div>Parallelization over k-points does very little communication but it is not as effective as plane-wave parallelization in distributing memory. I also noticed that on a typical multi-core processor the performances of k-point parallelization are often less good than those of plane-wave parallelization and sometimes much less good, for reasons that are not completely clear to me.</div><div><br></div><div>A factor to be considered is how your machine distributes the pools across the nodes: each of the 4 pools of 32 processors should stay on one of the nodes, but I wouldn't be too sure that this is what is really happening.<br></div><div><br></div><div>In your test, there is an anomaly, though: most of the time of "c_bands" (computing the band structure) should be spent in "cegterg" (iterative diagonalization). With 4*8 processors:</div><div>  Â Â  c_bands Â  Â  Â : Â 14153.20s CPU Â 14557.65s WALL ( Â  Â  461 calls)</div><div>  Â Â  Called by c_bands:<br>  Â  Â init_us_2 Â  Â : Â  Â 102.63s CPU Â  Â 105.55s WALL ( Â  Â 1952 calls)<br>  Â  Â cegterg Â  Â  Â : Â 12700.70s CPU Â 13083.44s WALL ( Â  Â  943 calls)</div><div>only 10% of the time is spent somewhere else,  while with 4*32 processors:<br></div><div> Â  Â Â  c_bands Â  Â  Â : Â 18068.08s CPU Â 18219.06s WALL ( Â  Â  454 calls)<br>  Â  Â Called by c_bands:<br>  Â  Â init_us_2 Â  Â : Â  Â  26.53s CPU Â  Â  27.06s WALL ( Â  Â 1924 calls)<br>  Â  Â cegterg Â  Â  Â : Â  2422.03s CPU Â  2451.72s WALL</div><div>75% of the time is not accounted for.</div><div><br></div><div>Paolo<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 12, 2021 at 5:01 AM Christoph Wolf <wolf.christoph@qns.science> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear all,<div><br></div><div>I tested k-point parallelization and I wonder if the following results can be normal or if my cluster has some serious problems...</div><div><br></div><div>the system has 74 atoms and a 2x2x1 k-point grid resulting in 4 k-points</div><div><br></div><div>  Â  Â number of k points= Â  Â  4 Â Fermi-Dirac smearing, width (Ry)= Â 0.0050<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â cart. coord. in units 2pi/alat<br>  Â  Â  Â  k( Â  Â 1) = ( Â  0.0000000 Â  0.0000000 Â  0.0000000), wk = Â  0.2500000<br>  Â  Â  Â  k( Â  Â 2) = ( Â  0.3535534 Â -0.3535534 Â  0.0000000), wk = Â  0.2500000<br>  Â  Â  Â  k( Â  Â 3) = ( Â  0.0000000 Â -0.7071068 Â  0.0000000), wk = Â  0.2500000<br>  Â  Â  Â  k( Â  Â 4) = ( Â -0.3535534 Â -0.3535534 Â  0.0000000), wk = Â  0.2500000<br></div><div><br></div><div><br></div><div>1) run on 1 node x 32 CPUs with -nk 4</div><div>  Â  Â Parallel version (MPI), running on Â  Â 32 processors<br><br>  Â  Â MPI processes distributed on Â  Â  1 nodes<br>  Â  Â K-points division: Â  Â  npool Â  Â  = Â  Â  Â  4<br>  Â  Â R & G space division: Â proc/nbgrp/npool/nimage = Â  Â  Â  8<br>  Â  Â Fft bands division: Â  Â  nmany Â  Â  = Â  Â  Â  1<br></div><div><br></div><div>  Â  Â PWSCF Â  Â  Â  Â : Â  Â  Â 5h42m CPU Â  Â  Â 6h 3m WALL</div><div><br></div><div><br></div><div>2) run on 4 nodes x 32 CPUs with -nk 4</div><div>  Â  Â Parallel version (MPI), running on Â  128 processors<br><br>  Â  Â MPI processes distributed on Â  Â  4 nodes<br>  Â  Â K-points division: Â  Â  npool Â  Â  = Â  Â  Â  4<br>  Â  Â R & G space division: Â proc/nbgrp/npool/nimage = Â  Â  Â 32<br>  Â  Â Fft bands division: Â  Â  nmany Â  Â  = Â  Â  Â  1<br></div><div><br></div><div><div>  Â  Â PWSCF Â  Â  Â  Â : Â  Â  Â 6h32m CPU Â  Â  Â 6h36m WALL<br></div></div><div><br></div><div>I compiled my pwscf with intel 19 MKL, MPI and OpenMP. If I understood correctly, -nk parallelization should work well as there is not much communication between nodes but this does not seem to work for me at all... detailed timing logs are attached!</div><div><br></div><div>TIA!</div><div>Chris<br clear="all"><div><br></div>-- <div dir="ltr"><div dir="ltr">IBS Center for Quantum Nanoscience<br>Seoul, South Korea<blockquote type="cite" style="font-size:12.8px"><div dir="ltr"><div><div dir="ltr"></div></div></div></blockquote></div></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu" rel="noreferrer" target="_blank">www.max-centre.eu</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,<br>Univ. Udine, via delle Scienze 206, 33100 Udine, Italy<br>Phone +39-0432-558216, fax +39-0432-558222<br><br></div></div></div></div></div>