<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=""><div class=""><br class=""></div> For a big matrix the asii output is slow (especially parallel)<div class=""><br class=""></div><div class=""> Yes, this view will be called automatically on all matrix when they are assembled so if you are assembling a bunch of matrices it will output them all.</div><div class=""><br class=""></div><div class=""> You can attach a unique prefix to the matrix PetscObjectSetPrefix() and then use -uniqueprefix_mat....</div><div class=""><br class=""></div><div class=""> You can use the binary format (faster) with <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;" class="">-mat_view binary:ColFDJac.mat and use PetscBinaryRead() in Matlab share/petsc/matlab </span></div><div class=""><font face="Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols" size="3" class=""><br class=""></font></div><div class=""><font face="Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols" size="3" class=""> You can use MatView() directly in your code with a binary PetscViewer on exactly the matrix you wish to save.<br class=""></font><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 2, 2022, at 6:07 PM, Jorti, Zakariae via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">Hello,<br class=""><br class="">I am using a TS to solve a differential algebraic equation (DAE).<span class="Apple-converted-space"> </span><br class="">I do not provide the Jacobian matrix but instead set the TS to use a finite difference jacobian with coloring.<span class="Apple-converted-space"> </span><br class="">For debugging, I only solve this DAE on one time step.<br class="">Is there a way to output this finite difference jacobian in a matlab format (.m file)?<br class="">I have already tried this flag : -mat_view ascii:ColFDJac.m:ascii_matlab , but when I use it the test takes too long. My guess is that this flag is trying to save all the matrices involved in the computations. I am only interested in the jacobian though.<span class="Apple-converted-space"> </span><br class="">Thank you.<br class=""><br class="">Best,<br class=""><br class="">Zakariae</div></div></div></blockquote></div><br class=""></div></body></html>