[torqueusers] Changing --with-debug to the default

Michael Jennings mej at lbl.gov
Tue Jul 31 12:52:15 MDT 2012


On Monday, 30 July 2012, at 17:26:10 (-0600),
David Beer wrote:

> Our support team has asked us repeatedly about making --with-debug
> the default for TORQUE, making it so it can be disabled using
> --without-debug, but obviously being on by default. Our support team
> wants this so that when a site reports a core dump, the core has
> information in it and the admin doesn't have to recompile and try to
> reproduce in order to get enough information to debug the
> crash. What are your thoughts on making this change?

There are a few considerations here.

1 - Currently --with-debug eliminates all optimizations in $CFLAGS to
    ensure that debugging symbols are accurate.  Some sites may object
    to the potential performance penalty.  Many projects use -O2 -g
    (or -O2 -g3) with reasonable success.  You may want to consider
    splitting up the adding of -g3 (--with-debug) and the removal of
    optimization (perhaps --without-optimization?).
2 - RPM builds already (by default on most systems) generate separate
    "debuginfo" packages which contain the debugging symbols for the
    main package(s).  As mentioned above, while some symbols may be
    marked as "optimized out," much of the debugging is still valid in
    more recent gcc/gdb versions.
3 - I submitted a patch to Ken for a "--with debug" feature for the
    spec file which would activate --with-debug AND allow the symbols
    to remain inside the primary RPM packages instead of being moved
    to the torque-debuginfo package.  It doesn't seem to have appeared
    in SVN yet, so you may want to take another gander.

That said, I'm all for making -g3 a default flag.  Just not sure about
the rest.  ;-)

Also, you may want to consider renaming --with-debug to --with-symbols
or --with-gdb-symbols instead.  Having both --enable-debug and
--with-debug (and having them do entirely disparate things) is rather
confusing for new users.

Michael

-- 
Michael Jennings <mej at lbl.gov>
Senior HPC Systems Engineer
High-Performance Computing Services
Lawrence Berkeley National Laboratory
Bldg 50B-3209E        W: 510-495-2687
MS 050B-3209          F: 510-486-8615


More information about the torqueusers mailing list