<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">  First please see <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#pipelined" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html#pipelined</a> and verify that the MPI you are using satisfies the requirements and you have appropriate MPI environmental variables set (if needed). </div><div class=""><br class=""></div><div class=""><br class=""></div>  Then please add a stage around the actual computation to get a more useful summary. <div class=""><br class=""></div><div class="">  Organize your code like so</div><div class=""><br class=""></div><div class="">  ...</div><div class="">  KSPSetUp()</div><div class="">  PetscLogStagePush(a stage you created)</div><div class="">  KSPSolve()</div><div class="">  PetscLogStagePop()</div><div class="">  ...</div><div class=""><br class=""><div>  It is unclear where much of the time of your code is being spent, by adding the stage we'll have a clear picture of the time in the actual solver. There are examples of using PetscLogStagePush() in the source.</div><div><br class=""></div><div>  With the new -log_view files you generate with these two changes we can get a handle on where the time is being spent and why the pipelining is or is not helping.</div><div><br class=""></div><div>  Barry</div><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 17, 2021, at 8:31 PM, 赵刚 <<a href="mailto:zhaog6@lsec.cc.ac.cn" class="">zhaog6@lsec.cc.ac.cn</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear Barry,<br class=""><br class="">Thank you for your prompt reply. I run ~16M DOFs on 32 nodes (36 cores per node), but CG seems to be faster than pipelined CG and Gropp's CG, I'm puzzled and haven't figured out why. Put the performance output into attachment, please check it.<br class=""><br class=""><br class=""><br class="">Thanks,<br class="">Gang<br class=""><br class=""><br class="">&gt; -----原始邮件-----<br class="">&gt; 发件人: "Barry Smith" <<a href="mailto:bsmith@petsc.dev" class="">bsmith@petsc.dev</a>><br class="">&gt; 发送时间: 2021-02-18 09:17:17 (星期四)<br class="">&gt; 收件人: "赵刚" <<a href="mailto:zhaog6@lsec.cc.ac.cn" class="">zhaog6@lsec.cc.ac.cn</a>><br class="">&gt; 抄送: PETSc <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>><br class="">&gt; 主题: Re: [petsc-users] An issue about pipelined CG and Gropp's CG<br class="">&gt; <br class="">&gt; <br class="">&gt; <br class="">&gt; &gt; On Feb 17, 2021, at 6:47 PM, 赵刚 <<a href="mailto:zhaog6@lsec.cc.ac.cn" class="">zhaog6@lsec.cc.ac.cn</a>> wrote:<br class="">&gt; &gt; <br class="">&gt; &gt; Dear PETSc team,<br class="">&gt; &gt; <br class="">&gt; &gt; I am interested in pipelined CG (-ksp_type pipecg) and Gropp's CG (-ksp_type groppcg), it is expected that this iterative method with pipelined has advantages over traditional CG in the case of multiple processes. So I'd like to ask for Poisson problem, how many computing nodes do I need to show the advantages of pipelined CG or Gropp's CG over CG (No preconditioner is used)?<br class="">&gt; &gt; <br class="">&gt; &gt; Currently, I can only use up to 32 nodes (36 cores per nodes) at most on my cluster, but both "pipecg" and "groppcg" seem to be no advantage over "cg" when I solve Poisson equations with homogeneous Dirichlet BC in [0, 1]^2 (remain 20K~60K DOFs per process). I guess the reason would be too few computing nodes.<br class="">&gt; <br class="">&gt;   900 cores (assuming they are not memory bandwidth bound) might be enough to see some differences but the differences are likely so small compared to other parallel issues that affect performance that you see no consistently measurable difference.<br class="">&gt; <br class="">&gt;    Run with -log_view three cases, no pipeline and the two pipelines and send the output. By studying where the time is spent in the different regions of the code with this output one may be able to say something about the pipeline affect.<br class="">&gt; <br class="">&gt;   Barry<br class="">&gt; <br class="">&gt; <br class="">&gt; &gt; <br class="">&gt; &gt; Because I am calling PETSc via other numerical software, if need, I would mail related performance information to you by using command line options suggested by PETSc. Thank you.<br class="">&gt; &gt; <br class="">&gt; &gt; <br class="">&gt; &gt; Thanks,<br class="">&gt; &gt; Gang<br class=""></<a href="mailto:zhaog6@lsec.cc.ac.cn" class="">zhaog6@lsec.cc.ac.cn</a>></<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>></<a href="mailto:zhaog6@lsec.cc.ac.cn" class="">zhaog6@lsec.cc.ac.cn</a>></<a href="mailto:bsmith@petsc.dev" class="">bsmith@petsc.dev</a>><span id="cid:183022BF-624E-4B80-9D40-D6D636C3C13C"><cg.out></span><span id="cid:25834817-6AAF-45C3-8744-3E1014D4B3F1"><groppcg.out></span><span id="cid:0E3B6B32-70D7-4500-BF88-104498A1A973"><pipecg.out></span></div></div></blockquote></div><br class=""></div></body></html>