This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Status of GDB support for debugging of Fortran programs?
On Sep 5 2012, Harald Anlauf wrote:
To a certain extend the problem seems to be that some big customers (of
Red Hat, SUSE, etc.) don't put strong pressure/large financial incentive
to their vendors to implement Fortran features. I think many bigger
customers are using gfortran/gdb, but either they are happy with the
current support or the issues don't escalate high enough in the
hierarchy to reach the management.
It's sometimes hard to argue that also one has to spend some money for
good software support (not only for debugging, but also for profiling
and tracing) when it is thought that paying for hardware is sufficient.
That appears to be even true for HPC.
Not quite. Almost every serious HPC system is prepared to pay for
software - but debuggers are a low priority. There are good reasons
for that.
The point is that the old-fashioned programmed methods of debugging[*]
are the only ones that work even tolerably in combination with serious
HPC codes and in HPC environments. Once you get into asynchronous
parallelism, especially if some of that asynchronism is done by a
semi-programmable coprocessor with access to the program's variables,
expecting any 'high level' debugger to work is foolish. Also, the
program is often running under a batch scheduler, and failure will
occur unpredictably, often after many hours' running. Even the better
commercial ones don't do brilliantly, as you point out.
The one thing that WOULD help would be better traceback support, and
that has been handicapped by the urge to benchmarketing. If I ever
get time, I may tackle it (it's soluble even under current constraints),
but the killer is that it's an ongoing maintenance headache, and the
code is very platform-specific. The run-time system has to be able
to unpick whatever state the compiler has left the registers and stack
in, however insane. Run-time system skills have never been taught in
computer science courses, and this needs some fairly advanced ones.
That is also the reason that few operating systems provide enough
information to do the job without extreme hacking :-(
So I don't see this situation improving much, especially in the HPC
arena, whether we are talking about gfortran/gdb or anything else.
[*] As in http://www.ucs.cam.ac.uk/docs/course-notes/unix-courses/Debugging
Regards,
Nick Maclaren.