<div dir="ltr">If you want a meaningful answer to your questions, it would be much faster and simpler if you just sent your source code.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 1 August 2013 15:29, 丁老师 <span dir="ltr"><<a href="mailto:ztdepyahoo@163.com" target="_blank">ztdepyahoo@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;font-size:14px;font-family:arial">I use the latest version PETSC, and the matrix has the same nonzero pattern during each outer iteration.<div>
I want to know does the kspsolve allocate memory for PC dring each call. <br><br><br><br><div></div><div></div><br>在 2013-08-01 20:46:36,"Matthew Knepley" <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> 写道:<div>
<div class="h5"><br> <blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><div dir="ltr">On Thu, Aug 1, 2013 at 12:58 PM, 丁老师 <span dir="ltr"><<a href="mailto:ztdepyahoo@163.com" target="_blank">ztdepyahoo@163.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial">I need to use the kspsolve(A,b,x) repeatly in my code in the following style.</div><div style="line-height:1.7;font-size:14px;font-family:arial">

but i have noticed from the system load monitor that during the code running, it allocate new memeory every step.</div><div style="line-height:1.7;font-size:14px;font-family:arial"><br></div><div style="line-height:1.7;font-size:14px;font-family:arial">

I use the default setting for the PC. </div><div style="line-height:1.7;font-size:14px;font-family:arial">Could you please told me how to resolve this problem.</div></div></blockquote><div><br></div><div>1) There is no enough here to give us an idea what you are doing</div>

<div><br></div><div>2) Are you using the latest release? If so, it prevents you from adding new nonzreos to the matrix, which is my first guess.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial"><span style="font-size:14px;line-height:1.7">for (int i=0;i<maxit;i++)</span></div><div style="line-height:1.7;font-size:14px;font-family:arial">

{</div><div style="line-height:1.7;font-size:14px;font-family:arial">MatsetValues(    )....</div><div style="line-height:1.7;font-size:14px;font-family:arial">kspsolve(A,b,x)</div><div style="line-height:1.7;font-size:14px;font-family:arial">

}<br><div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial"><span title="neteasefooter"><span></span></span></div>

<br><br><span title="neteasefooter"><span></span></span></div><br><br><
 
 span title="neteasefooter"><span></span></div><br><br><span title="neteasefooter"><span></span></span></div><br><br><span title="neteasefooter"><span></span></span></div><br><br><span title="neteasefooter"><span></span></span></blockquote>

</div><br><br clear="all"><div><br></div>-- <br>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
</div></div>
</blockquote></div></div></div></div><br><br><span title="neteasefooter"><span></span></span></blockquote></div><br></div>