[petsc-users] Optimized Option

Barry Smith bsmith at mcs.anl.gov
Fri Jun 3 15:06:38 CDT 2011

On Jun 3, 2011, at 2:57 PM, Alan Wei wrote:

> Dear Sir/Madam,
>     Lately, I read there is a optimized version of PETSc by using '--with-debugging=0'. I have two questions here:
> 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. 

   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 

   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.

> 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.

    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.


> thanks in advance,
> Alan
> <ComputationalRateComparisons.xlsx>

More information about the petsc-users mailing list