<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 4, 2022 at 2:07 PM Varun Hiremath <<a href="mailto:varunhiremath@gmail.com">varunhiremath@gmail.com</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">Hi All,<br><div><br></div><div>We use SLEPc to compute eigenvalues of big problems which typically takes a long time. We want to add a progress bar to inform the user of the estimated time remaining to finish the computation. In addition, we also want to add an option for the user to abort the computation midway if needed. </div><div><br></div><div>To some extent, I am able to do these by attaching a custom function to <a href="https://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetStoppingTestFunction.html#EPSSetStoppingTestFunction" target="_blank">EPSSetStoppingTestFunction</a> and using nconv/nev as an indication of progress, and throwing an exception when the user decides to abort the computation. However, since this function gets called only once every iteration, for very big problems it takes a long time for the program to respond. I was wondering if there is any other function to which I can attach, which gets called more frequently and can provide more fine-grained information on the progress.</div></div></blockquote><div><br></div><div>I believe (Jose can correct me) that the bulk of the time in an iterate would be in the linear solve. You can insert something into a KSPMonitor. If you know the convergence tolerance and assume a linear convergence rate I guess you could estimate the "amount done".</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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>Thanks,</div><div>Varun</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>