<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000">There are some utility routines for printing L\U in superlu_dist: SRC/dutil_dist.c</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000"><ol dir="auto" style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif"><li style="margin-left:15px">You can output the L factor to a file with the triplet format by using<br><a href="https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L675" target="_blank">https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L675</a><br>but use line 755 instead of line 753.</li><li style="margin-left:15px">You can convert the L factor to CSR or triplet using <a href="https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L815" target="_blank">https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L815</a><br><a href="https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L1075" target="_blank">https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L1075</a><br>but need to make sure you only use 1 MPI to call superlu_dist</li><li style="margin-left:15px">You can modify<br><a href="https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L1229" target="_blank">https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L1229</a><br>to generate CSR/triplet for the U factor as well.</li></ol></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#000000">Sherry Li</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 23, 2022 at 3:38 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@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"><div dir="ltr">On Sun, Oct 23, 2022 at 2:58 AM 赵刚 <<a href="mailto:zhaog6@lsec.cc.ac.cn" target="_blank">zhaog6@lsec.cc.ac.cn</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear developers,<br>
<br>
I have another question. How can I get the L and U matrices and store them in a file when I call SuperLU through PETSc? Thanks.</blockquote><div><br></div><div>SuperLU stores these matrices in its own format. If you want to do I/O with them, you would probably have to</div><div>extract them from the Petsc Mat and call SuperLU I/O functions, if they exist.</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">
Best Regards,<br>
Gang</blockquote></div>-- <br><div dir="ltr"><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>
</blockquote></div>