Compiler options for program development and debugging
======================================================
Jane Sleightholme and I want to add a section
to the Fortran Resource file in this area.
All comments welcome.
Here is a quick first attempt.
diagnose non-standard Fortran
switch on all error checking
generate a cross reference listing
switch on trace back
switch on a post mortem dump facility
see note 1 below.
Feel free to add any others that you use.
1. Post Mortem Dump
-------------------
We first came across this option working
with the CDC systems at Imperial College
and ULCC in the late 70s and early 80s.
For a small additional memory overhead of
about 100 words another program was loaded
that analysed the contents of memory using
a map file (generated at compile time)
and provided a full traceback through
each subroutine and function in the call stack
and printed out the values of all scalar variables
and a user defined subset of all array values.
It also diagnosed the use of uninitialised variables
and special vales, e.g. negative indefinite.
Does anything like this exist for compilers today?
We are going to add compiler specific flags
for the following compilers which we use.
CVF
Intel
Lahey
NAG
Salford
The following url
http://chiversandbryan.co.uk/fortran/appendix_h.pdf
has some details of the switches
with sample text for the above compilers.
this may not be up to date as it was taken from
an appendix of our latest book. we will
update before adding the section to the resource file.
If you use another compiler and email us
with the details for that compiler we will
add this to the file with an acknowledgement.
We were also thinking of adding a sub-section
on debuggers and profiling. We were going to use
the recent thread on fortran development tools
as a starting point.
Any other thoughts?
Thanks in advance
Ian Chivers
Jane Sleightholme
|