<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 4, 2016 at 3:43 AM, Klaij, Christiaan <span dir="ltr"><<a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, looking forward to the fix!<br>
<br>
Related to this, the preallocation would need to depend on the<br>
type that is given at runtime, say<br>
<br>
if type=XXX, call MatXXXSetPreallocation()<br>
<br>
That would work for say seqaij and mpiaij, probably even without<br>
the if-statement, right? And since there's no<br>
MatNestSetPreallocation, should one get the submats and<br>
preallocate those if type=nest?<br></blockquote><div><br></div><div>This is really a situation where the DM interface is far superior. We could try</div><div>to break down the AIJ preallocation into pieces, however since we have no</div><div>column information, this problem is not determined. However, in the DM case</div><div>we know everything and could properly allocate the submatrices automatically.</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">
Chris<br>
<br>
> Date: Tue, 2 Aug 2016 08:49:36 -0500<br>
> From: Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
> To: "Klaij, Christiaan" <<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a>><br>
> Cc: "<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>" <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>
> Subject: Re: [petsc-users] block matrix without MatCreateNest<br>
> Message-ID:<br>
> <CAMYG4Gk9-cp8nrHnkCePnUvty-<wbr>emDWSMQco0S3AJ5u8_W=<a href="mailto:fiXw@mail.gmail.com">fiXw@mail.<wbr>gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> On Tue, Aug 2, 2016 at 2:25 AM, Klaij, Christiaan <<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a>> wrote:<br>
><br>
> > Thanks for your help! Going from individual blocks to a whole<br>
> > matrix makes perfect sense if the blocks are readily available or<br>
> > needed as fully functional matrices. Don't change that! Maybe add<br>
> > the opposite?<br>
> ><br>
> > I'm surprised it's broken though: on this mailing list several<br>
> > petsc developers have stated on several occasions (and not just<br>
> > to me) things like "you should never have a matnest", "you should<br>
> > have a mat then change the type at runtime", "snes ex70 is not<br>
> > the intended use" and so on.<br>
> ><br>
> > I fully appreciate the benefit of having a format-independent<br>
> > assembly and switching mat type from aij to nest depending on the<br>
> > preconditioner. And given the manual and the statements on this<br>
> > list, I thought this would be standard practice and therefore<br>
> > thoroughly tested. But now I get the impression it has never<br>
> > worked...<br>
> ><br>
> Yes, that way has never worked. Nest is only a memory optimization, and with<br>
> implicit problems I am never running at the limit of memory (or I use more<br>
> procs).<br>
> The people I know who needed it had explicitly coded it in rather than<br>
> trying to<br>
> use it from options. It should not take long to get this fixed.<br>
><br>
> Thanks,<br>
><br>
> Matt<br>
><br>
> > Chris<br>
> ><br>
> ><br>
> > > From: Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
> > > Sent: Tuesday, August 02, 2016 12:28 AM<br>
> > > To: Klaij, Christiaan<br>
> > > Cc: <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>; Jed Brown<br>
> > > Subject: Re: [petsc-users] block matrix without MatCreateNest<br>
> > ><br>
> > > On Mon, Aug 1, 2016 at 9:36 AM, Klaij, Christiaan <<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a>><br>
> > wrote:<br>
> > ><br>
> > > Matt,<br>
> > ><br>
> > ><br>
> > > 1) great!<br>
> > ><br>
> > ><br>
> > > 2) ??? that's precisely why I paste the output of "cat mattry.F90"<br>
> > in the emails, so you have a small example that produces the errors I<br>
> > mention. Now I'm also attaching it to this email.<br>
> > ><br>
> > > Okay, I have gone through it. You are correct that it is completely<br>
> > broken.<br>
> > ><br>
> > > The way that MatNest currently works is that it trys to use L2G mappings<br>
> > from individual blocks<br>
> > > and then builds a composite L2G map for the whole matrix. This is<br>
> > obviously incompatible with<br>
> > > the primary use case, and should be changed to break up the full L2G<br>
> > into one for each block.<br>
> > ><br>
> > > Jed, can you fix this? I am not sure I know enough about how Nest works.<br>
> > ><br>
> > > Matt<br>
> > ><br>
> > > Thanks,<br>
> > ><br>
> > > Chris<br>
<br>
<br>
dr. ir. Christiaan Klaij | CFD Researcher | Research & Development<br>
MARIN | T <a href="tel:%2B31%20317%2049%2033%2044" value="+31317493344">+31 317 49 33 44</a> | mailto:<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a> | <a href="http://www.marin.nl" rel="noreferrer" target="_blank">http://www.marin.nl</a><br>
<br>
MARIN news: <a href="http://www.marin.nl/web/News/News-items/Vice-Admiral-De-Waard-makes-virtual-test-voyage-on-MARINs-FSSS.htm" rel="noreferrer" target="_blank">http://www.marin.nl/web/News/<wbr>News-items/Vice-Admiral-De-<wbr>Waard-makes-virtual-test-<wbr>voyage-on-MARINs-FSSS.htm</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">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></div>