On Fri, Jun 3, 2011 at 3:38 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></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;">
<div class="im"><br>
On Jun 3, 2011, at 3:30 PM, Matthew Knepley wrote:<br>
<br>
> On Fri, Jun 3, 2011 at 3:28 PM, <<a href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>> wrote:<br>
> Thanks for your reply.<br>
> So, if I want to use '--with-debugging=0', what is the PETSC_ARCH equal to?<br>
><br>
> When you run configure, at the end it prints out a LARGE message that indicates<br>
><br>
> - What PETSC_ARCH it has chosen<br>
><br>
> - Exactly the command line to run when building<br>
><br>
> This information is also stored in configure.log<br>
<br>
</div> You should provide a value for the environmental variable PETSC_ARCH before running ./configure<br>
<br>
For example PETSC_ARCH=arch-debug ./configure --with-debugging=1 otherstuff<br>
then PETSC_ARCH=arch-opt ./configure --with-debugging=0 otherstuff</blockquote><div><br></div><div>This is fragile since it depends on your shell. Just use</div><div><br></div><div> ./configure --with-debugging=0 --PETSC_ARCH=arch-opt <otherstuff></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;"><div><div class="h5">
><br>
> Matt<br>
><br>
> I just tried to use PETSC = arch-opt, and a error message comes up:<br>
> ~/petsc-dev/conf/variables:95: ~/petsc-dev/arch-opt/conf/petscvariables: No such file or directory<br>
> ~l/petsc-dev/conf/rules:1018: ~/petsc-dev/arch-opt/conf/petscrules: No such file or directory<br>
> make: *** No rule to make target `~l/petsc-dev/arch-opt/conf/petscrules'. Stop.<br>
> this really confused me.<br>
><br>
> thanks,<br>
> Alan<br>
><br>
> On , Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
> ><br>
> ><br>
> > On Jun 3, 2011, at 2:57 PM, Alan Wei wrote:<br>
> ><br>
> ><br>
> ><br>
> > > Dear Sir/Madam,<br>
> ><br>
> > > Lately, I read there is a optimized version of PETSc by using '--with-debugging=0'. I have two questions here:<br>
> ><br>
> > > 1, Do I need to use '/config/configure.py ... --with-debugging=0' 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>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > 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>
> ><br>
> ><br>
> ><br>
> > 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>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > > 2, I was using the '--with-debugging=0' 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>
> ><br>
> ><br>
> ><br>
> > 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>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Barry<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ><br>
> ><br>
> > > thanks in advance,<br>
> ><br>
> > > Alan<br>
> ><br>
> > ><br>
> ><br>
> > ><br>
> ><br>
> ><br>
> ><br>
> ><br>
><br>
><br>
><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>
<br>
</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>