<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 06.06.2012 13:06, Jed Brown wrote:
<blockquote
cite="mid:CAM9tzS=y_eug-ZKRTV4s1OvGH_D+6_fJPsJGnABt7WVUy=tc8Q@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Wed, Jun 6, 2012 at 5:22 AM, Alexander
Grayver <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:agrayver@gfz-potsdam.de" target="_blank">agrayver@gfz-potsdam.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">In my program I assemble
huge matrix (~500 millions of double complex nnz) and all
MatSetValues calls are done before MatAssemblyBegin(A,
MAT_FINAL_ASSEMBLY).<br>
I'm wondering if it makes sense to use MatAssemblyBegin(A,
MAT_FLUSH_ASSEMBLY) in between? In docs it is said:<br>
>> <a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetValues.html#MatSetValues"
target="_blank">MatSetValues</a>() generally caches the
values.<br>
<br>
How does the caching work actually? Is this additionally
allocated memory (dynamic or not)?</div>
</blockquote>
</div>
<br>
<div>Only entries that are generated on a different process than
they need to be stored will be cached. If you generate most
entries on the correct process (the owned rows for MPI*AIJ
matrices), there is no need to flush.</div>
</blockquote>
<br>
Jed,<br>
<br>
Makes sense. I should have thought about that. I have off process
entries, although not many.<br>
Thanks.<br>
<br>
<blockquote
cite="mid:CAM9tzS=y_eug-ZKRTV4s1OvGH_D+6_fJPsJGnABt7WVUy=tc8Q@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>You can also look at -log_summary to see if an inordinate
amount of time is spent in assembly.</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Regards,
Alexander</pre>
</body>
</html>