<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 4, 2020 at 10:24 AM Sajid Ali <<a href="mailto:sajidsyed2021@u.northwestern.edu">sajidsyed2021@u.northwestern.edu</a>> 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"><div><p style="margin:0px 0px 1.2em">Hi PETSc-developers, </p>
<p style="margin:0px 0px 1.2em">For a linear TS, when solving with <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">-ts_type cn -ksp_type fgmres -pc_type gamg</code>, the flag <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">-pc_gamg_reuse_interpolation</code> can be used to re-use the GAMG interpolation calculated when solving the first time step. Increasing the number of time steps only increases the time spent in application of the precondition and the setup time is constant. </p>
<p style="margin:0px 0px 1.2em">Is there an equivalent way to do this with Hypre’s BoomerAMG ?</p></div></div></blockquote><div><br></div><div>I don't know but you can look at the BoomerAMG documentation and if you find something that does what you want you can look at the PETSc source in /src/ksp/pc/impls/hypre/hypre.c and see the idiom for getting a hypre object and manipulating it. You can then call the Hypre API directly and do whatever you want.</div><div> </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"><div><p style="margin:0px 0px 1.2em">I’m using euclid as the smoother but adding the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">-pc_hypre_euclid_reuse</code> flag only seems to make it reuse the euclid ILU smoothing within a particular TS time step, i.e. increasing the number of time steps linearly increases the time spent in setting up the preconditioner.</p>
<p style="margin:0px 0px 1.2em">Another approach I tried was to use hypre within the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">PCHMG</code> preconditioner (which I hoped would allow me to use BoomerAMG to computer interpolations while also reusing the interpolations via the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">-pc_hmg_reuse_interpolation</code> flag.) However, I’m unable to pass the parameter to BoomerAMG when Hypre is set as the inner PC for the HMG preconditioner. I didn’t see any options for doing so when I searched the <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">-help</code> output and neither does setting options via <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">-hmg_inner_pc_hypre_boomeramg_option value</code> work. What am I missing here ?<br></p>
<p style="margin:0px 0px 1.2em">For reference, I’m adding the exact solver options used (and the associated log files) for each of the above cases if it helps. (GAMG was used on the system of equations arising out of the complex PDE but since I was unable to get good convergence rates with GAMG for the real equivalent of the same, I switched to Hypre which performed better. Hence I’m looking for a way to set the reuse interpolation feature for this as well.)</p>
<p style="margin:0px 0px 1.2em">Thank You,<br>Sajid Ali | PhD Candidate<br>Applied Physics<br>Northwestern University<br><a href="http://s-sajid-ali.github.io" target="_blank">s-sajid-ali.github.io</a></p>
<div title="MDH:PGRpdj48Z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aXI9Imx0ciIgY2xhc3M9ImdtYWlsX3NpZ25hdHVyZSIgZGF0YS1zbWFydG1haWw9ImdtYWlsX3Np
Z25hdHVyZSI+PGRpdiBkaXI9Imx0ciI+PGRpdj48ZGl2IGRpcj0ibHRyIj48ZGl2PjxkaXYgZGly
PSJsdHIiPjxkaXYgc3R5bGU9ImZvbnQtc2l6ZToxMi44cHgiPlNhamlkIEFsaSB8IFBoRCBDYW5k
aWRhdGU8YnI+PC9kaXY+PGRpdiBzdHlsZT0iZm9udC1zaXplOjEyLjhweCI+QXBwbGllZCBQaHlz
aWNzPGJyPjwvZGl2PjxkaXYgc3R5bGU9ImZvbnQtc2l6ZToxMi44cHgiPk5vcnRod2VzdGVybiBV
bml2ZXJzaXR5PC9kaXY+PGRpdiBzdHlsZT0iZm9udC1zaXplOjEyLjhweCI+PGEgaHJlZj0iaHR0
cDovL3Mtc2FqaWQtYWxpLmdpdGh1Yi5pbyIgdGFyZ2V0PSJfYmxhbmsiPnMtc2FqaWQtYWxpLmdp
dGh1Yi5pbzwvYT48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rp
dj48L2Rpdj48L2Rpdj4=" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px"></div></div></div>
</blockquote></div></div>