Go to the bottom of this page. See the search engine and sub-section links.
Go to next page Go to previous page Go to top of this section Go to top page Go to table of contents

Previous Section Headers

User's Guide to NCAR CCM3.6 Search Page


4. Changing the Model
    4.6 Trouble-Shooting Model Changes


4.6.2 Coding Errors

The following is an ad-hoc list of tips to assist the user who has modified the source code in tracking down coding errors.

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. 


 Go to the top of this page. See links to previous section headers.
Go to next page Go to previous page Go to top of this section Go to top page Go to table of contents

 Search for keywords in the CCM3.6 Users GuideSearch page

Questions on these pages can be sent to... erik@ucar.edu .


$Name: ccm3_6_6_latest3 $ $Revision: 1.36.2.1 $ $Date: 1999/03/25 21:37:36 $ $Author: erik $