<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>There is a petsc function for that, see here:</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Sys/PetscOptionsInsertFile.html">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Sys/PetscOptionsInsertFile.html</a></div><div><br></div><div>The format of the file is what Matt said.</div><div><br></div><div>Felipe</div><br><div><div>On 22 Feb 2010, at 17:24, Matthew Knepley wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">You just put them in a file:<div><br></div><div>-option1 val1</div><div>-option2 val2</div><div><br></div><div>&nbsp;&nbsp; Matt<br><br><div class="gmail_quote">On Mon, Feb 22, 2010 at 10:23 AM,  <span dir="ltr">&lt;<a href="mailto:hxie@umn.edu">hxie@umn.edu</a>&gt;</span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br> <br> I'd like to put the command line options into a file and let the PETSc read it. Any example for this? Thanks.<br> <br> Hui<br> </blockquote></div><br><br clear="all"><br>-- <br>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<br> </div></blockquote></div><br><div> <span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>----------------------------------------------------<br>Felipe Cruz<br>PhD student Applied Mathematics&nbsp;<br>Department of Mathematics<br>University of Bristol<br>Bristol BS8 1TW, UK<br>----------------------------------------------------</div></div></span></div></span> </div><br></body></html>