The flint utility is useful for finding argument list mismatch between routines, improper variable references (i.e. variable is referenced before it is set), and other serious coding errors such as common block length mismatches between routines.
Given reasonable output from flint and continued suspicion of a coding error, there are some compiler options that may help if run-time debugging becomes necessary. We recommend that the model always be run single-threaded during run-time debugging. It is important to determine early on whether user changes adversely affect only multitasked execution. Also, output generated as a result of these options is much easier to interpret if generated during single-threaded execution. Furthermore, running the code at T5 resolution may speed-up the debugging process.
The -Rb command line argument to the Cray f90 compiler enables array bounds checking during model execution.
The -G1 option to the Cray f90 compiler can also be helpful for run-time debugging. This option produces debug symbol table information.
We suggest that statically allocated
memory locations be initialized to " indefinite".
(the -f indef option to segldr ). A more costly but equally
useful option for debugging is the -ei compiler option. This option
initializes stack memory to indefinite and will likewise result
in an error if memory so initialized is used in a floating-point computation.
It is much more expensive than static initialization because memory values
must be set each time stack memory is made available to a routine.
This means a very large amount of memory must be initialized every timestep.
Runs using this option will incur a performance penalty of approximately
10%. Compiler option -ei is recommended for model development
and debugging purposes only.
Questions on these pages can be sent to... erik@ucar.edu .