<div dir="ltr"><div><span style="font-size:13px">(forgot to reply-all)</span></div><span style="font-size:13px">I think that depends on how sparse M^{-1} and H are. </span><br><div><span style="font-size:13px"><br></span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 7:41 PM, Bikash Kanungo <span dir="ltr"><<a href="mailto:bikash@umich.edu" target="_blank">bikash@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p dir="ltr" style="font-size:12.8000001907349px">Hi Patrick,</p><p dir="ltr" style="font-size:12.8000001907349px">I have M^{-1} computed explicitly and stored as MATNEST. Providing MATCOMPOSITE of M^{-1}H to SLEPc standard eigenvalue solvers seems an option. Does it has any additional cost over explicitly building <span style="font-size:12.8000001907349px">M^{-1}H (assuming I have a way to do so) and then providing it to standard eigenvalue solvers?</span></p><p style="font-size:12.8000001907349px">Thanks,</p><p style="font-size:12.8000001907349px">Bikash</p></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 1:37 PM, Bikash Kanungo <span dir="ltr"><<a href="mailto:bikash@umich.edu" target="_blank">bikash@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi Patrick,</p>
<p dir="ltr">I have M^{-1} computed explicitly and stored as MATNEST. Providing MATCOMPOSITE of M^{-1}H to SLEPc standard eigenvalue solvers seems an option. Does it has any additional cost of explicitly building </p><div><div>
<div class="gmail_quote">On May 11, 2015 1:30 PM, "Patrick Sanan" <<a href="mailto:patrick.sanan@gmail.com" target="_blank">patrick.sanan@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you storing M^{-1} explicitly? In that case you could use MATCOMPOSITE to define M^{-1}H and feed that to SLEPc's standard solver. If you only have M explicitly, you could use MATSHELL to define your own operator which applies M^{-1}H and use that with SLEPc's standard solver (though of course SLEPc would be free to implement its generalized eigensolvers this way and/or in better ways for certain problems - I am not enough of an expert on that library to say more).</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 7:12 PM, Bikash Kanungo <span dir="ltr"><<a href="mailto:bikash@umich.edu" target="_blank">bikash@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi Matthew,</p>
<p dir="ltr">Yes SLEPc does allow me to solve a generalized eigenvalue problem. But the generalized solvers are not as robust as the standard eigenvalue solvers. That's the reason I want to use explicit MatMatMult so that I can use standard eigenvalue solvers.</p>
<p dir="ltr">Thanks,<br>
Bikash</p><div><div>
<div class="gmail_quote">On May 11, 2015 1:00 PM, "Matthew Knepley" <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 11, 2015 at 8:47 AM, Bikash Kanungo <span dir="ltr"><<a href="mailto:bikash@umich.edu" target="_blank">bikash@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Patrick,<br><br></div>Thanks for the clarification. I want it to be an efficient operation. The idea is to convert a generalized eigenvalue problem (H*x = lamda*M*x) to a standard one (M^{-1}*H*x = lambda*x). The M^{-1} is of type MATNEST whereas H is MPIAIJ. In my problem M^{-1} is computed once whereas H changes every iteration. So performing low-level matrix multiplication or creating H as MATNEST and assembling it from its sub-matrices at every iteration sounds inefficient. <br></div></div></div></blockquote><div><br></div><div>You can solve these types of things with SLEPc without explicit MatMat.</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 dir="ltr"><div><div></div>Regards,<br></div>Bikash<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 9:21 AM, Patrick Sanan <span dir="ltr"><<a href="mailto:patrick.sanan@gmail.com" target="_blank">patrick.sanan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">MatMatMult with MATNEST does not seem to be supported, based only on the fact that there are no functions of the form MatMatMult_*_MatNest defined with the MATNEST implementation : <a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/nest/matnest.c.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/nest/matnest.c.html</a><div><br></div><div>Does this operation need to be efficient? (That is, are you forming this matrix for debugging or experimental purposes, or with the intention of using it within an efficient, scalable piece of code?). If not, it should be possible to use lower-level matrix operations as defined by the API to extract the appropriately-sized submatrices from A and (assuming that MatMatMult is defined between MATMPIAIJ and the submatrices of your Matnest), perform the matrix multiplications and additions "by hand" .</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 2:44 PM, Bikash Kanungo <span dir="ltr"><<a href="mailto:bikash@umich.edu" target="_blank">bikash@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>I have two matrices: A of type MPIAIJ and B of type MATNEST. Is there any way to perform A*B after B has been assembled from its sub-matrices?<br><br></div>Thanks,<br></div>Bikash<span><font color="#888888"><br clear="all"><div><div><div><div><br>-- <br><div><div dir="ltr"><div><div><div><div><font color="#666666">Bikash S. Kanungo<br></font></div><font color="#666666">PhD Student<br></font></div><font color="#666666">Computational Materials Physics Group<br></font></div><font color="#666666">Mechanical Engineering <br></font></div><font color="#666666">University of Michigan<br><br></font></div></div>
</div></div></div></div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div><div dir="ltr"><div><div><div><div><font color="#666666">Bikash S. Kanungo<br></font></div><font color="#666666">PhD Student<br></font></div><font color="#666666">Computational Materials Physics Group<br></font></div><font color="#666666">Mechanical Engineering <br></font></div><font color="#666666">University of Michigan<br><br></font></div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><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></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div><div><div><font color="#666666">Bikash S. Kanungo<br></font></div><font color="#666666">PhD Student<br></font></div><font color="#666666">Computational Materials Physics Group<br></font></div><font color="#666666">Mechanical Engineering <br></font></div><font color="#666666">University of Michigan<br><br></font></div></div>
</div>
</div></div></blockquote></div><br></div>