Changes between Version 17 and Version 18 of Documentation/UserGuide/IDB


Ignore:
Timestamp:
2020-03-19T17:20:18+01:00 (4 years ago)
Author:
luyssaert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/IDB

    v17 v18  
    1 Contributed by Pierre Brender 
    2  
    3 [[PageOutline]]  
    4  
    5 = IDB = 
    6  
    7 == For which purpose a debugging tool may be of some use ? == 
    8  
    9 In the present page, we will try to present tools which help to identify what are the values taken by some variables at some point, check that a subroutine of interest is actually called during the execution of the code (and how many times it happens),... This might be very useful when one would like to speed up the identification of the variable which is the first to take weird values (particularly after a significant modification of the code) and the snap of code which cause that trouble.  
    10  
     1[[PageOutline]] 
     2= Debugging with IDB =   
     3 
     4== Objective == 
     5Background of this item: when the model does not run as expected, the calculations will need to be checked step by step. Debuggers such as IDB help to identify what are the values taken by some variables at some point, check that a subroutine of interest is actually called during the execution of the code (and how many times it happens),... This might be very useful when one would like to speed up the identification of the variable which is the first to take weird values (particularly after a significant modification of the code) and the snap of code which cause that trouble. An basic alternative to the use of debuggers is added WRITE statements to the code. 
     6 
     7== IDB on obelix ==  
     8Authors: P. Brender [[BR]]  
     9Last revision: J. Ghattas (2019/05/02) [[BR]] 
     10 
     11=== Boundary conditions for using a debugger === 
    1112Of course, getting a functional version of the code after a modification of one of the routine of ORCHIDEE continues to require a few steps and the debugger we present only helps to speed up the second one : 
    1213   1. Getting a version of the code which can be compiled. The first errors displayed by the compiler before crashing should be of some help to solve that issue. 
    13    1. Once the code including the modification can be compiled properly, it may often happen that some of the variables take aberrant values, even for runs in offline mode on one point. You are likely to be interested by this tutorial if you are used to proceed to tedious cycles of : 
     14   2. Once the code including the modification can be compiled properly, it may often happen that some of the variables take aberrant values, even for runs in offline mode on one point. You are likely to be interested by this tutorial if you are used to proceed to tedious cycles of : 
    1415      * addition within the subroutine of interest of lines such as "PRINT *, 'MY_VAR='my_var  
    1516      * compilation of the code 
    1617      * screening of the standard output of the executed code   
    17    1. Check that the introduction of the new feature doesn't lead to weird behaviour for runs at the global scales and/or coupled with the GCM. 
    18  
    19  
    20 == Step by step manual == 
     18   3. Check that the introduction of the new feature doesn't lead to weird behaviour for runs at the global scales and/or coupled with the GCM. 
     19 
     20 
     21=== Step by step manual === 
    2122=== Activate the debug flags when compiling the orchidee_ol executable === 
    2223