[petsc-dev] Please stop checking in debugging code

Barry Smith bsmith at mcs.anl.gov
Sat Dec 8 13:16:19 CST 2012


On Dec 8, 2012, at 12:11 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> This commit says "rm unused variables" but its primary purpose appears to be to add non-compliant debugging code.
> 
> https://bitbucket.org/petsc/petsc-dev/commits/01c3be9a4ea1
> 
> I still don't understand why we aren't using PETSc events to profile this,

    If PETSc events do not provide enough useful information for optimizing code then we should think about what can be added/changed to PETSc events and log summary to so that they can be used. Perhaps alternative -log_summary's that do not print as much stuff etc?

   Barry

> but can we all please strive to check in only compliant code? You can always make a personal fork on bitbucket, commit all the debugging fragments you want, then clean up your patches with histedit, and push to petsc/petsc-dev.
> 
> 
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmult.c:37:24: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>       printf("    Mat %d %d, 2MultSymbolic_SeqAIJ_Scalable time: %g\n",A->rmap->N,A->cmap->N,t1-t0);
>                       ~^                                               ~~~~~~~~~~
>                       %lld
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmult.c:37:27: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>       printf("    Mat %d %d, 2MultSymbolic_SeqAIJ_Scalable time: %g\n",A->rmap->N,A->cmap->N,t1-t0);
>                          ~^                                                       ~~~~~~~~~~
>                          %lld
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmult.c:46:24: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>       printf("    Mat %d %d, 2MultSymbolic_SeqAIJ time: %g\n",A->rmap->N,A->cmap->N,t1-t0);
>                       ~^                                      ~~~~~~~~~~
>                       %lld
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmult.c:46:27: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>       printf("    Mat %d %d, 2MultSymbolic_SeqAIJ time: %g\n",A->rmap->N,A->cmap->N,t1-t0);
>                          ~^                                              ~~~~~~~~~~
>                          %lld
> 4 warnings generated.
> [ 11%] Building CXX object CMakeFiles/petsc.dir/src/mat/impls/aij/mpi/mpiptap.c.o
> clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmatmult.c:61:20: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>     printf("  Mat %d %d, 3MultSymbolic_SeqAIJ_Scalable time: %g + %g = %g\n",A->rmap->N,A->cmap->N,t1-t0,t2-t1,t2-t0);
>                   ~^                                                         ~~~~~~~~~~
>                   %lld
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmatmult.c:61:23: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>     printf("  Mat %d %d, 3MultSymbolic_SeqAIJ_Scalable time: %g + %g = %g\n",A->rmap->N,A->cmap->N,t1-t0,t2-t1,t2-t0);
>                      ~^                                                                 ~~~~~~~~~~
>                      %lld
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmatmult.c:68:20: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>     printf("  Mat %d %d, 3MultSymbolic_SeqAIJ time: %g + %g = %g\n",A->rmap->N,A->cmap->N,t1-t0,t2-t1,t2-t0);
>                   ~^                                                ~~~~~~~~~~
>                   %lld
> /home/jed/petsc/src/mat/impls/aij/seq/matmatmatmult.c:68:23: warning: format specifies type 'int' but the argument has type 'PetscInt' (aka 'long long') [-Wformat]
>     printf("  Mat %d %d, 3MultSymbolic_SeqAIJ time: %g + %g = %g\n",A->rmap->N,A->cmap->N,t1-t0,t2-t1,t2-t0);
>                      ~^                                                        ~~~~~~~~~~
>                      %lld
> 4 warnings generated.
> 




More information about the petsc-dev mailing list