[petsc-dev] Extra compiler flags for debugging

Jacob Faibussowitsch jacob.fai at gmail.com
Mon Mar 23 11:10:33 CDT 2020


Hello all,

I’m wondering if you guys use any extra compiler flags when debugging (other than -g3). I have noticed for example that when compiling I am only warned about something (i.e. wrong argument type for a function) once, so if I recompile the same program with no changes, the second compilation doesn’t reproduce the warning. Currently I use the default compiler flags that petsc generates for debugging support with MPICH: 

C Compiler:         /Users/jacobfaibussowitsch/NoSync/petscpackages/bin/mpicc  -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -g3 

Version: Apple clang version 11.0.0 (clang-1100.0.33.17)

I’m mainly trying to find a 64-bit bug, so I have now added the “-ftrapv” flag to trap for integer overflows but there are probably more flags out there.

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: (312) 694-3391

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200323/9e3e2e22/attachment.html>


More information about the petsc-dev mailing list