On Fri, Jun 3, 2011 at 3:50 PM,  <span dir="ltr">&lt;<a href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Matt,<br>    I think I got it. Does that mean I need to configure a PETSC_ARCH as --with-debugging=0 so that I can used it later on.<br></blockquote><div><br></div><div>Yes, and build it.</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;">best,<br>Alan<div class="im"><br><br>On , Matthew Knepley &lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt; wrote:<br>
&gt; On Fri, Jun 3, 2011 at 3:38 PM, Barry Smith <a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>&gt; wrote:<br>&gt; <br>&gt; <br>&gt; <br>&gt; On Jun 3, 2011, at 3:30 PM, Matthew Knepley wrote:<br>
&gt; <br>&gt; <br>&gt; <br>&gt; &gt; On Fri, Jun 3, 2011 at 3:28 PM, <a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>&gt; wrote:<br>&gt; <br>&gt; &gt; Thanks for your reply.<br>&gt; <br>&gt; &gt; So, if I want to use &#39;--with-debugging=0&#39;, what is the PETSC_ARCH equal to?<br>
&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt; When you run configure, at the end it prints out a LARGE message that indicates<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt;   - What PETSC_ARCH it has chosen<br>&gt; <br>&gt; &gt;<br>
&gt; <br>&gt; &gt;   - Exactly the command line to run when building<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt; This information is also stored in configure.log<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt;    You should provide a value for the environmental variable PETSC_ARCH before running ./configure<br>
&gt; <br>&gt; <br>&gt; <br>&gt;    For example   PETSC_ARCH=arch-debug    ./configure --with-debugging=1   otherstuff<br>&gt; <br>&gt;    then PETSC_ARCH=arch-opt    ./configure --with-debugging=0   otherstuff<br>&gt; <br>
&gt; This is fragile since it depends on your shell. Just use<br>&gt; <br>&gt; <br>&gt;   ./configure --with-debugging=0 --PETSC_ARCH=arch-opt <br>&gt; <br>&gt; <br>&gt; <br></div><div><div></div><div class="h5">&gt;    Matt<br>
&gt;  <br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt;     Matt<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt; I just tried to use PETSC = arch-opt, and a error message comes up:<br>&gt; <br>&gt; &gt; ~/petsc-dev/conf/variables:95: ~/petsc-dev/arch-opt/conf/petscvariables: No such file or directory<br>
&gt; <br>&gt; &gt; ~l/petsc-dev/conf/rules:1018: ~/petsc-dev/arch-opt/conf/petscrules: No such file or directory<br>&gt; <br>&gt; &gt; make: *** No rule to make target `~l/petsc-dev/arch-opt/conf/petscrules&#39;. Stop.<br>
&gt; <br>&gt; &gt; this really confused me.<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt; thanks,<br>&gt; <br>&gt; &gt; Alan<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt; On , Barry Smith <a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>&gt; wrote:<br>
&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; On Jun 3, 2011, at 2:57 PM, Alan Wei wrote:<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt; Dear Sir/Madam,<br>
&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt;     Lately, I read there is a optimized version of PETSc by using &#39;--with-debugging=0&#39;. I have two questions here:<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt; 1, Do I need to use &#39;/config/configure.py ... --with-debugging=0&#39; when I configure the PETSc in order to use the non-debugging version of PETSc? Therefore, if I want to switch PETSc between these two versions, I have to keep configuring.<br>
&gt; <br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;   ABSOLUTELY NOT.  You use two different values of the environmental variable PETSC_ARCH and switch back and forth by changing the variable. You can even change it on the make command line. For example make mycode PETSC_ARCH=arch-opt<br>
&gt; <br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;   Note that you can use any name you want for the values of PETSC_ARCH. I often use arch-debug and arch-opt to keep track of them.<br>
&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt; 2, I was using the &#39;--with-debugging=0&#39; to configure the PETSc. However, I tested the computational rate by executing the ex29.c. The non-debugging version does not improve the speed much; in the contrary, it slow down the speed a little bit. The comparison is attached here. Any idea on this.<br>
&gt; <br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;    It depends on the compiler and particular code you are running. We recommend using the option -log_summary to see how much time is spent in each part of the computation and how much it gets better with optimization.<br>
&gt; <br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;   Barry<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>
&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt; thanks in advance,<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>
&gt; &gt; &gt; &gt; Alan<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt; &gt;<br>
&gt; <br>&gt; &gt; &gt;<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt;<br>&gt; <br>&gt; &gt; --<br>&gt; <br>&gt; &gt; What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
&gt; <br>&gt; &gt; -- Norbert Wiener<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; -- <br>&gt; What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
&gt; <br>&gt; -- Norbert Wiener<br>&gt; <br>&gt;</div></div></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>