<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
 I am a bit confused. Without the initial guess computation, there are still a bunch of events I don't understand MatTranspose 79 1. 0 4. 0598e+01 1. 0 0. 00e+00 0. 0 0. 0e+00 0. 0e+00 0. 0e+00 0 0 0 0 0 0 0 0 0 0 0MatMatMultSym 110 1. 0 1. 7419e+02 1. 0
</div>
<!-- Preheader Text : END -->

<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>

<!--[if ((ie)|(mso))]>
  <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
    <table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
      <table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
        <tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
          This Message Is From an External Sender
        </td></tr>
        <tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
          This message came from outside your organization.
        </td></tr>

      </table>

    </td></tr></table>
  </td></tr></table>
<![endif]-->

<![if !((ie)|(mso))]>
  <div dir="ltr"  id="pfptBanner46jkkgp" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
    <div id="pfptBanner46jkkgp" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
      <div id="pfptBanner46jkkgp" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
        This Message Is From an External Sender
      </div>
      <div id="pfptBanner46jkkgp" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
      </div>

    </div>

    <div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
  </div>
<![endif]>

<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->

<!-- BaNnErBlUrFlE-BoDy-end -->
<html><head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
  #pfptBanner46jkkgp { all: revert !important; display: block !important; 
    visibility: visible !important; opacity: 1 !important; 
    background-color: #D0D8DC !important; 
    max-width: none !important; max-height: none !important }
  .pfptPrimaryButton46jkkgp:hover, .pfptPrimaryButton46jkkgp:focus {
    background-color: #b4c1c7 !important; }
  .pfptPrimaryButton46jkkgp:active {
    background-color: #90a4ae !important; }
</style>

<!-- BaNnErBlUrFlE-HeAdEr-end -->
<meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div>   I am a bit confused. Without the initial guess computation, there are still a bunch of events I don't understand <div><br></div><div><div>MatTranspose          79 1.0 4.0598e+01 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  0  0  0  0  0   0  0  0  0  0     0</div><div>MatMatMultSym        110 1.0 1.7419e+02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  1  0  0  0  0   1  0  0  0  0     0</div><div>MatMatMultNum         90 1.0 1.2640e+02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  1  0  0  0  0   1  0  0  0  0     0</div><div>MatMatMatMultSym      20 1.0 1.3049e+02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  1  0  0  0  0   1  0  0  0  0     0</div><div>MatRARtSym            25 1.0 1.2492e+02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  1  0  0  0  0   1  0  0  0  0     0</div><div>MatMatTrnMultSym      25 1.0 8.8265e+01 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  0  0  0  0  0   0  0  0  0  0     0</div><div>MatMatTrnMultNum      25 1.0 2.4820e+02 1.0 6.83e+10 1.0 0.0e+00 0.0e+00 0.0e+00  1  0  0  0  0   1  0  0  0  0   275</div><div>MatTrnMatMultSym      10 1.0 7.2984e-01 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  0  0  0  0  0   0  0  0  0  0     0</div><div>MatTrnMatMultNum      10 1.0 9.3128e-01 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  0  0  0  0  0   0  0  0  0  0     0</div><div><br></div><div>in addition there are many more VecMAXPY then VecMDot (in GMRES they are each done the same number of times)</div><div><br></div><div><div>VecMDot             5588 1.0 1.7183e+03 1.0 2.06e+13 1.0 0.0e+00 0.0e+00 0.0e+00  8 10  0  0  0   8 10  0  0  0 12016</div></div><div><div>VecMAXPY           22412 1.0 8.4898e+03 1.0 4.17e+13 1.0 0.0e+00 0.0e+00 0.0e+00 39 20  0  0  0  39 20  0  0  0  4913</div></div><div><br></div><div>Finally there are a huge number of </div><div><br></div><div><div>MatMultAdd        258048 1.0 1.4178e+03 1.0 6.10e+13 1.0 0.0e+00 0.0e+00 0.0e+00  7 29  0  0  0   7 29  0  0  0 43025</div></div><div><br></div><div>Are you making calls to all these routines? Are you doing this inside your MatMult() or before you call KSPSolve?</div><div><br></div><div>The reason I wanted you to make a simpler run without the initial guess code is that your events are far more complicated than would be produced by GMRES alone so it is not possible to understand the behavior you are seeing without fully understanding all the events happening in the code.</div><div><br></div><div>  Barry</div><div><br></div><div><br><blockquote type="cite"><div>On Jun 14, 2024, at 1:19 AM, Yongzhong Li <yongzhong.li@mail.utoronto.ca> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Thanks, I have attached the results without using any KSPGuess. At low frequency, the iteration steps are quite close to the one with KSPGuess, specifically<span class="Apple-converted-space"> </span><br><br>  KSPGuess Object: 1 MPI process<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    type: fischer<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    Model 1, size 200<br><br>However, I found at higher frequency, the # of iteration steps are  significant higher than the one with KSPGuess, I have attahced both of the results for your reference.<br><br>Moreover, could I ask why the one without the KSPGuess options can be used for a baseline comparsion? What are we comparing here? How does it relate to the performance issue/bottleneck I found? “</span><b>I have noticed that the time taken by </b><b><span style="font-family: "Courier New";">KSPSolve</span> is<span class="apple-converted-space"> </span></b><b><span lang="EN-US">almost two times<span class="apple-converted-space"> </span></span>greater than the CPU time for matrix-vector product multiplied by the number of iteration</b><span lang="EN-US" style="font-size: 11pt;">”<span class="Apple-converted-space"> </span><br><br>Thank you!<br>Yongzhong<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div id="mail-editor-reference-message-container"><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0cm 0cm;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style="">Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;">bsmith@petsc.dev</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Thursday, June 13, 2024 at 2:14</span><span style="font-family: Arial, sans-serif;"> </span><span style="">PM<br><b>To:<span class="Apple-converted-space"> </span></b>Yongzhong Li <<a href="mailto:yongzhong.li@mail.utoronto.ca" style="color: blue; text-decoration: underline;">yongzhong.li@mail.utoronto.ca</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a>>,<span class="Apple-converted-space"> </span><a href="mailto:petsc-maint@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-maint@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-maint@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-maint@mcs.anl.gov</a>>, Piero Triverio <<a href="mailto:piero.triverio@utoronto.ca" style="color: blue; text-decoration: underline;">piero.triverio@utoronto.ca</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>Re: [petsc-maint] Assistance Needed with PETSc KSPSolve Performance Issue<o:p></o:p></span></p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">  Can you please run the same thing without the  KSPGuess option(s) for a baseline comparison?<o:p></o:p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">   Thanks<o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">   Barry<o:p></o:p></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><br><br><o:p></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Jun 13, 2024, at 1:27<span style="font-family: Arial, sans-serif;"> </span>PM, Yongzhong Li <<a href="mailto:yongzhong.li@mail.utoronto.ca" style="color: blue; text-decoration: underline;">yongzhong.li@mail.utoronto.ca</a>> wrote:<o:p></o:p></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div><div><div id="pfptBannerxs2204y"><div id="pfptBannerxs2204y"><div id="pfptBannerxs2204y"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Arial, sans-serif;">This Message Is From an External Sender<o:p></o:p></span></div></div><div id="pfptBannerxs2204y"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Arial, sans-serif;">This message came from outside your organization.<o:p></o:p></span></div></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Hi Matt,<br><br>I have rerun the program with the keys you provided. The system output when performing ksp solve and the final petsc log output were stored in a .txt file attached for your reference.<br><br>Thanks!<br>Yongzhong</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div><div id="mail-editor-reference-message-container"><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-image: none; padding: 3pt 0cm 0cm; border-color: currentcolor;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b>From:<span class="apple-converted-space"> </span></b>Matthew Knepley <<a href="mailto:knepley@gmail.com" style="color: blue; text-decoration: underline;">knepley@gmail.com</a>><br><b>Date:<span class="apple-converted-space"> </span></b>Wednesday, June 12, 2024 at 6:46<span style="font-family: Arial, sans-serif;"> </span>PM<br><b>To:<span class="apple-converted-space"> </span></b>Yongzhong Li <<a href="mailto:yongzhong.li@mail.utoronto.ca" style="color: blue; text-decoration: underline;">yongzhong.li@mail.utoronto.ca</a>><br><b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a><span class="apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a>>,<span class="apple-converted-space"> </span><a href="mailto:petsc-maint@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-maint@mcs.anl.gov</a><span class="apple-converted-space"> </span><<a href="mailto:petsc-maint@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-maint@mcs.anl.gov</a>>, Piero Triverio <<a href="mailto:piero.triverio@utoronto.ca" style="color: blue; text-decoration: underline;">piero.triverio@utoronto.ca</a>><br><b>Subject:<span class="apple-converted-space"> </span></b>Re: [petsc-maint] Assistance Needed with PETSc KSPSolve Performance Issue<o:p></o:p></p></div><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width: 1278px; display: table; float: none;"><tbody><tr><td style="background: rgb(166, 166, 166); padding: 5.25pt 1.5pt;"></td><td width="100%" style="width: 1244px; background: rgb(234, 234, 234); padding: 5.25pt 3.75pt 5.25pt 11.25pt;"><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="ZH-CN" style="font-size: 9pt; font-family: DengXian; color: rgb(33, 33, 33);">你通常不会收到来自</span><span class="apple-converted-space"><span style="font-size: 9pt; font-family: "Segoe UI", sans-serif; color: rgb(33, 33, 33);"> </span></span><span style="font-size: 9pt; font-family: "Segoe UI", sans-serif; color: rgb(33, 33, 33);"><a href="mailto:knepley@gmail.com" style="color: blue; text-decoration: underline;">knepley@gmail.com</a><span class="apple-converted-space"> </span></span><span lang="ZH-CN" style="font-size: 9pt; font-family: DengXian; color: rgb(33, 33, 33);">的电子邮件。</span><span style="font-size: 9pt; font-family: "Segoe UI", sans-serif; color: rgb(33, 33, 33);"><a href="https://urldefense.us/v3/__https://aka.ms/LearnAboutSenderIdentification__;!!G_uCfscf7eWS!djGfJnEhNJROfsMsBJy5u_KoRKbug55xZ64oHKUFnH2cWku_Th1hwt4TDdoMd8pWYVDzJeqJslMNZwpO3y0Et94d31qk-oCEwo4$" style="color: blue; text-decoration: underline;"><span lang="ZH-CN" style="font-family: DengXian;">了解这一点为什么很重要</span></a></span><o:p></o:p></div></div></div></td><td width="75" style="width: 56.25pt; background: rgb(234, 234, 234); padding: 5.25pt 3.75pt;"></td></tr></tbody></table><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Wed, Jun 12, 2024 at 6:36<span style="font-family: Arial, sans-serif;"> </span>PM Yongzhong Li <<a href="mailto:yongzhong.li@mail.utoronto.ca" style="color: blue; text-decoration: underline;">yongzhong.li@mail.utoronto.ca</a>> wrote:<o:p></o:p></div></div></div><div><blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-image: none; padding: 0cm 0cm 0cm 6pt; margin: 5pt 0cm 5pt 4.8pt; border-color: currentcolor currentcolor currentcolor rgb(204, 204, 204);"><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;">Dear PETSc’s developers, I hope this email finds you well. I am currently working on a project using PETSc and have encountered a performance issue with the KSPSolve function. Specifically, I have noticed that the time taken by KSPSolve is<span class="apple-converted-space"> </span></span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;">ZjQcmQRYFpfptBannerStart</span><o:p></o:p></div></div></div><div id="m_5223539340070699115pfptBannerpeukvww" style="border-width: 3pt medium medium; border-style: solid none none; border-image: none; padding: 6pt 0cm 0cm; margin-top: 12pt; margin-bottom: 12pt; border-color: currentcolor; border-radius: 4px; min-width: 200px;"><div id="m_5223539340070699115pfptBannerpeukvww" style="margin-bottom: 0.75pt; float: left;"><div id="m_5223539340070699115pfptBannerpeukvww"><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 13.5pt; background: rgb(208, 216, 220);"><b><span style="font-size: 10.5pt; font-family: Arial, sans-serif;">This Message Is From an External Sender</span></b><o:p></o:p></div></div></div><div id="m_5223539340070699115pfptBannerpeukvww" style="margin-top: 1.5pt;"><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 13.5pt; background: rgb(208, 216, 220);"><span style="font-size: 9pt; font-family: Arial, sans-serif;">This message came from outside your organization.</span><o:p></o:p></div></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; background: rgb(208, 216, 220);"><span style="font-size: 1pt;"> </span><o:p></o:p></div></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;">ZjQcmQRYFpfptBannerEnd</span><o:p></o:p></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">Dear<span class="apple-converted-space"> </span><span lang="EN-US">PETSc’s developers</span>,<o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">I hope this email finds you well.<o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">I am currently working on a project using PETSc and have encountered a performance issue with the <span style="font-family: "Courier New";">KSPSolve</span> function. Specifically,<span class="apple-converted-space"> </span><b>I have noticed that the time taken by </b><b><span style="font-family: "Courier New";">KSPSolve</span> is<span class="apple-converted-space"> </span></b><b><span lang="EN-US">almost two times<span class="apple-converted-space"> </span></span>greater than the CPU time for matrix-vector product multiplied by the number of iteration steps</b>.<span class="apple-converted-space"> </span><span lang="EN-US">I use C++ chrono to record CPU time.</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">For context, I am using a shell system matrix<span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">A</span>. Despite my efforts to<span class="apple-converted-space"> </span><span lang="EN-US">parallelize</span><span class="apple-converted-space"> </span>the matrix-vector product<span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">(Ax)</span>, the overall solve time remains higher<span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">than the matrix vector product per iteration indicates when multiple threads were used</span>. Here are a few details of my setup:<o:p></o:p></div></div><ul type="disc" style="margin-bottom: 0cm; margin-top: 0cm;"><li class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><b>Matrix Type</b>: Shell system matrix<o:p></o:p></li><li class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><b>Preconditioner</b>:<span class="apple-converted-space"> </span><span lang="EN-US">Shell PC</span><o:p></o:p></li><li class="MsoNormal" style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><b>Parallel Environment</b>:<span class="apple-converted-space"> </span><span lang="EN-US">Using Intel MKL as PETSc’s BLAS/LAPACK library, multithreading is enabled</span><o:p></o:p></li></ul><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US">I have considered several potential reasons, such as preconditioner setup, additional solver operations, and the inherent overhead of using a shell system matrix.<span class="apple-converted-space"> </span><b>However, since KSPSolve is a high-level API, I have been unable to pinpoint the exact cause of the increased solve time.</b></span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US">Have you observed the same issue?<span class="apple-converted-space"> </span></span>Could you<span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">please<span class="apple-converted-space"> </span></span>provide some<span class="apple-converted-space"> </span><span lang="EN-US">experience<span class="apple-converted-space"> </span></span>on how to diagnose and address this performance discrepancy? Any insights or recommendations you could offer would be greatly appreciated.<o:p></o:p></div></div></div></div></div></blockquote><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">For any performance question like this, we need to see the output of your code run with<o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">  -ksp_view -ksp_monitor_true_residual -ksp_converged_reason -log_view<o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">  Thanks,<o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">     Matt<o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-image: none; padding: 0cm 0cm 0cm 6pt; margin: 5pt 0cm 5pt 4.8pt; border-color: currentcolor currentcolor currentcolor rgb(204, 204, 204);"><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">Thank you for your time and assistance.<o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">Best<span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">regards,</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US">Yongzhong</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif;">-----------------------------------------------------------</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif;">Yongzhong Li</span></b><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif;">PhD student | Electromagnetics Group</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif;">Department of Electrical & Computer Engineering</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif;">University of Toronto</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif;"><a href="https://urldefense.us/v3/__http://www.modelics.org__;!!G_uCfscf7eWS!cuLttMJEcegaqu461Bt4QLsO4fASfLM5vjRbtyNhWJQiInbjgNwkGNdkFE1ebSbFjOUatYB0-jd2yQWMWzqkDFFjwMvNl3ZKAr8$" target="_blank" style="color: blue; text-decoration: underline;"><span style="color: rgb(5, 99, 193);">http://www.modelics.org</span></a></span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div></div></blockquote></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><br clear="all"><o:p></o:p></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span class="gmailsignatureprefix">--</span><span class="apple-converted-space"> </span><o:p></o:p></div></div><div><div><div><div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!djGfJnEhNJROfsMsBJy5u_KoRKbug55xZ64oHKUFnH2cWku_Th1hwt4TDdoMd8pWYVDzJeqJslMNZwpO3y0Et94d31qkNOuenGA$" target="_blank" style="color: blue; text-decoration: underline;">https://www.cse.buffalo.edu/~knepley/</a><o:p></o:p></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><ksp_petsc_log.txt><o:p></o:p></div></div></blockquote></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div></div></div></div><span id="cid:E99FC80F-A2E7-4314-A193-E6684E38240A"><ksp_petsc_log.txt></span><span id="cid:9AE8AAA7-7F30-45B7-87DA-FA12372E62AA"><ksp_petsc_log_noguess.txt></span></div></blockquote></div><br></div></body></html>