<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="webkit-block-placeholder"></div>&nbsp;&nbsp;If you are using KSP then you should NEVER call MatGetInfo(), MatLUFactor....<div>just call the PCFactorSetFill(). If you are not using the KSP then</div><div>you need to declare a MatFactorInfo and fill it up the way you want.</div><div>Note that MatInfo is different from MatFactorInfo you need to set the value</div><div>in MatFactorInfo that you pass to the factorization routines.</div><div><br class="webkit-block-placeholder"></div><div>Barry</div><div><br class="webkit-block-placeholder"></div><div><br><div><div>On Nov 22, 2007, at 12:55 PM, Waad Subber wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks Barry<br><br>One more question please:<br><br>Should I get and set the fill factor&nbsp; like this:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call MatGetInfo(A,MAT_LOCAL,info,ierr)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FACTFILL = info(MAT_INFO_fill_ratio_needed)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call PCFactorSetFill(pc,FACTFILL,ierr)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call ISSetPermutation(indexSet,IERR);CHKERRQ(IERR)<br>&nbsp; &nbsp; &nbsp; call MatLUFactorSymbolic(A,indexSet,indexSet,FACTFILL,... <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call MatLUFactorNumeric(A,FACTFILL,factorMat,IERR)<br><br>Thanks<br><br>Waad<br><br><b><i>Barry Smith &lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <div><br class="webkit-block-placeholder"></div>&nbsp;&nbsp;PCFactorSetFill() after calling KSPSetPC()<div><br class="webkit-block-placeholder"></div><div>&nbsp;&nbsp; Barry</div><div><br class="webkit-block-placeholder"></div><div>&nbsp;&nbsp;If you are using multiple different KSP's you might look at KSPSetOptionsPrefix()</div><div>to allow using command line options to set different values for different solvers.</div><div><br><div><div>On Nov 22, 2007, at 5:46 AM, Waad Subber wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello PETSc Users,<br><br>I have a serial code to solve multiple matrices. I am using LU factorization. When I run the code&nbsp; with the (-info) option, it gives me different values for (pc_factor_fill) depending on the input matrix. I am wondering if I can set these values for the (pc_factor_fill) inside the code instead of running it with runtime option, for it is one code with multiple inputs.<br> <br> Thanks a lot<br> <br> Waad<br><br><br>For Matrix No.1<br><br>[5] MatLUFactorSymbolic_SeqAIJ(): Reallocs 3 Fill ratio:given 0 needed 2.96<br>[5] MatLUFactorSymbolic_SeqAIJ(): Run with -pc_factor_fill 2.96 or use<br>[5] MatLUFactorSymbolic_SeqAIJ(): PCFactorSetFill(pc,2.96);<br>[5] MatLUFactorSymbolic_SeqAIJ(): for best performance.<br><br>For Matrix No.2<br><br>[9] MatLUFactorSymbolic_SeqAIJ(): Reallocs 3 Fill ratio:given 0 needed 2.42069<br>[9] MatLUFactorSymbolic_SeqAIJ(): Run with -pc_factor_fill 2.42069 or use<br>[9] MatLUFactorSymbolic_SeqAIJ(): PCFactorSetFill(pc,2.42069);<br>[9] MatLUFactorSymbolic_SeqAIJ(): for best performance.<br><br>For Matrix No. n<br><br>[8] MatLUFactorSymbolic_SeqAIJ(): Reallocs 3 Fill ratio:given 0 needed 1.87742<br>[8] MatLUFactorSymbolic_SeqAIJ(): Run with -pc_factor_fill 1.87742 or use<br>[8] MatLUFactorSymbolic_SeqAIJ(): PCFactorSetFill(pc,1.87742);<br>[8] MatLUFactorSymbolic_SeqAIJ(): for best performance.<br><div>       <br class="webkit-block-placeholder"></div><hr size="1">Be a better sports nut! Let your teams follow you with Yahoo Mobile. <a href="http://us.rd.yahoo.com/evt=51731/*http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ%20">Try it now.</a></blockquote></div><br></div></blockquote><br><div>       <br class="webkit-block-placeholder"></div><hr size="1">Be a better pen pal. Text or chat with friends inside Yahoo! Mail. <a href="http://us.rd.yahoo.com/evt=51732/*http://overview.mail.yahoo.com/">See how.</a></blockquote></div><br></div></body></html>