<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Stefano,<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 13, 2018, at 5:40 AM, Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" class="">stefano.zampini@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Richard,
<div class=""><br class="">
</div>
<div class="">what are the performances you get with MATSELL in PFLOTRAN?</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>For PFLOTRAN and many other examples, the SELL-based MatMult is usually 2X faster than AIJ (non-inode version).</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class=""><br class="">
</div>
<div class="">Today, I run the SELL matrix for the first time on a KNL with different problems (using PetIGA)  and got the results attached.</div>
<div class="">It seems that SELL is faster then AIJ for 2D Poisson, and slightly faster for 3D Poisson. However, for multi-component problems (i.e. Elasticity and Cahn-Hilliard in mixed formulation) it has comparable performances or slower.</div>
<div class="">in these cases AIJ is faster since it uses the inodes routines.</div>
<div class=""><br class="">
</div>
<div class="">Is this expected?</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>This is expected since currently SELL hasn't been optimized for multi-component problem (there is no inode version for SELL yet).</div>
<div><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="">These are the flags I used to compile PETSc on KNL --COPTFLAGS=-xMIC-AVX512 -O3 -mP2OPT_hpo_vec_remainder=F; </div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
If you are using intel compiler 18, the flag -mP2OPT_hpo_vec_remainder=F is not needed. But it is necessary for older versions of intel compiler.</div>
<div><br class="">
</div>
<div>Hong (Mr.)</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class=""><br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">2018-02-12 21:04 GMT+03:00 Richard Tran Mills <span dir="ltr" class="">
<<a href="mailto:rtmills@anl.gov" target="_blank" class="">rtmills@anl.gov</a>></span>:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">On Mon, Feb 12, 2018 at 8:47 AM, Smith, Barry F. <span dir="ltr" class="">
<<a href="mailto:bsmith@mcs.anl.gov" target="_blank" class="">bsmith@mcs.anl.gov</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><span class=""><br class="">
<br class="">
> On Feb 12, 2018, at 10:25 AM, Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" class="">stefano.zampini@gmail.com</a>> wrote:<br class="">
><br class="">
> Barry,<br class="">
><br class="">
> for sure Amat,Pmat is the right approach; however, with complicated user codes, we are not always in control of having a different Jacobian matrix.<br class="">
> Since Mat*SELL does not currently support any preconditioning except PCSOR and PCJACOBI, we ask the user to put codes like<br class="">
><br class="">
> if (type is SELL)<br class="">
>  create two matrices (and maybe modify the code in many other parts)<br class="">
> else<br class="">
>   ok with the previous code<br class="">
<br class="">
</span></span><span class="">   I don't disagree with what you are saying and am not opposed to the proposed work.<br class="">
<br class="">
   Perhaps we need to do a better job with making the mat,pmat approach simpler or better documented so more people use it naturally in their applications.<br class="">
</span></blockquote>
<div class=""><br class="">
</div>
<div class="">I wrote some code like that in some of the Jacobian/function routines in PFLOTRAN to experiment with MATSELL, and it works, but looks and feels pretty hacky. And if I wanted to support it for all of the different systems that PFLOTRAN can model,
 then I'd have to reproduce that it in many different Jacobian and function evaluation routines. I also don't like that it makes it awkward to play with the many combinations of matrix types and preconditioners that PETSc allows: The above pseudocode should
 really say "if (type is SELL) and (preconditioner is not PCSOR or PCJACOBI)". I do think that Amat,Pmat is a good approach in many situations, but it's easy to construct scenarios in which it falls short.<br class="">
<br class="">
</div>
<div class="">In some situations, what I'd like to have happen is what Stefano is talking about, with an automatic conversion to AIJ happening if SELL doesn't support an operation. But, ideally, I think this sort of implicit format conversion shouldn't be something
 hard-coded into the workings of SELL. Instead, there should be some general mechanism by which PETSc recognizes that a particular operation is unsupported for a given matrix format, and then it can (optionally) copy/convert to a different matrix type (probably
 default to AIJ, but it shouldn't have to be AIJ) that supports the operation. This sort of implicit data rearrangement game may actually become more important if future computer architectures strongly prefer different data layouts different types of operations
 (though let's not get ahead of ourselves).<br class="">
<br class="">
</div>
<div class="">--Richard<br class="">
</div>
<div class=""> <br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="m_3098572156046804253HOEnZb"><font color="#888888" class=""><br class="">
    Barry<br class="">
</font></span><span class="">
<div class="m_3098572156046804253HOEnZb">
<div class="m_3098572156046804253h5"><br class="">
><br class="">
> Just my two cents.<br class="">
><br class="">
><br class="">
> 2018-02-12 19:10 GMT+03:00 Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank" class="">bsmith@mcs.anl.gov</a>>:<br class="">
><br class="">
><br class="">
> > On Feb 12, 2018, at 9:59 AM, Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" class="">stefano.zampini@gmail.com</a>> wrote:<br class="">
> ><br class="">
> > FYI, I just checked and MatSOR_*SELL does not use any vectorized instruction.<br class="">
> > Why just not converting to SeqAIJ, factor and then use the AIJ implementation for MatSolve for the moment?<br class="">
><br class="">
>   Why not use the mat, pmat feature of the solvers to pass in both matrices and have the solvers handle using two formats simultaneously instead of burdening the MatSELL code with tons of special code for automatically converting to AIJ for solvers etc?<br class="">
><br class="">
><br class="">
> ><br class="">
> > 2018-02-12 18:06 GMT+03:00 Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" class="">stefano.zampini@gmail.com</a>>:<br class="">
> ><br class="">
> ><br class="">
> > 2018-02-12 17:36 GMT+03:00 Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank" class="">jed@jedbrown.org</a>>:<br class="">
> > Karl Rupp <<a href="mailto:rupp@iue.tuwien.ac.at" target="_blank" class="">rupp@iue.tuwien.ac.at</a>> writes:<br class="">
> ><br class="">
> > > Hi Stefano,<br class="">
> > ><br class="">
> > >> Is there any plan to write code for native ILU/ICC etc for SeqSELL, at least to have BJACOBI in parallel?<br class="">
> > ><br class="">
> > > (imho) ILU/ICC is a pain to do with SeqSELL. Point-Jacobi should be<br class="">
> > > possible, yes. SELL is really just tailored to MatMults and a pain for<br class="">
> > > anything that is not very similar to a MatMult...<br class="">
> ><br class="">
> > There is already MatSOR_*SELL.  MatSolve_SeqSELL wouldn't be any harder.<br class="">
> > I think it would be acceptable to convert to SeqAIJ, factor, and convert<br class="">
> > the factors back to SELL.<br class="">
> ><br class="">
> > Yes, this was my idea. Today I have started coding something. I'll push the branch whenever I have anything working<br class="">
> ><br class="">
> ><br class="">
> ><br class="">
> > --<br class="">
> > Stefano<br class="">
> ><br class="">
> ><br class="">
> ><br class="">
> > --<br class="">
> > Stefano<br class="">
><br class="">
><br class="">
><br class="">
><br class="">
> --<br class="">
> Stefano<br class="">
<br class="">
</div>
</div>
</span></blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div class="gmail_signature" data-smartmail="gmail_signature">Stefano</div>
</div>
<span id="cid:BBA873B4-DA27-4C6B-86F2-13A5C9AAE17E"><early_results_knl.txt></span></div>
</blockquote>
</div>
<br class="">
</body>
</html>