Difference between debugging and optimized version of PETSc

Barry Smith bsmith at mcs.anl.gov
Mon Jan 29 22:24:26 CST 2007


  debugging version is compiled with -g so you can see the symbols
in the debugger; optimized is compiled with -Osomething to have the
compiler work harder to generate efficient code.

  Barry

Optimized version can easily be 3 times faster, or more or less.


On Mon, 29 Jan 2007, Matthew Knepley wrote:

> On 1/29/07, Ben Tay <zonexo at gmail.com> wrote:
> > 
> > Sorry I don't really understand.
> > 
> > So is there any difference in optimization between the 2 libraries?  Or is
> > it just extensive additional "assert type"?
> > 
> 
> As I pointed out the the previous mail, you should read the compiler
> documentation.
> 
>   Matt
> 
> Thank you.
> > 
> > 
> > On 1/30/07, Barry Smith <bsmith at mcs.anl.gov> wrote:
> > >
> > >
> > > PETSc also does extensive additional "assert type" testing of input
> > > arguments
> > > to functions etc in the debug version.
> > >
> > >   Barry
> > >
> > >
> > > On Mon, 29 Jan 2007, Matthew Knepley wrote:
> > >
> > > > On 1/29/07, Ben Tay <zonexo at gmail.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > May I know what's the difference between the optimized and debugging
> > >
> > > > > version?
> > > > >
> > > > > Have the optimization flags such as -O3 been used in the
> > > compilcation of
> > > > > the libraries for the optimized one? Whereas for the debugging
> > > version,
> > > > > there is no optimization by the compiler?
> > > > >
> > > >
> > > > It is just the difference in compiler flags. You would have to look at
> > > the
> > > > compiler documentation.
> > > >
> > > > If my program works fine in the debugging version, does it mean that I
> > > will
> > > > > not get errors in the optimized version?
> > > > >
> > > >
> > > > Most likely.
> > > >
> > > >   Matt
> > > >
> > > > Thanks
> > > > >
> > > >
> > >
> > >
> > 
> 
> 
> 




More information about the petsc-users mailing list