New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
2020WP/VALID-05_mathiot_debug (diff) – NEMO

Changes between Initial Version and Version 1 of 2020WP/VALID-05_mathiot_debug


Ignore:
Timestamp:
2019-12-05T21:44:17+01:00 (4 years ago)
Author:
mathiot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 2020WP/VALID-05_mathiot_debug

    v1 v1  
     1= Name and subject of the action 
     2 
     3Last edition: '''[[Wikinfo(changed_ts)]]''' by '''[[Wikinfo(changed_by)]]''' 
     4 
     5The PI is responsible to closely follow the progress of the action,  
     6and especially to contact NEMO project manager if  
     7the delay on preview (or review) are longer than the 2 weeks expected. 
     8 
     9[[PageOutline(2, , inline)]] 
     10 
     11== Summary 
     12 
     13||=Action       || VALID-05_mathiot_debug                        || 
     14||=PI(S)        || mathiot                                                 || 
     15||=Digest       || add a debug interface which print global min/max/sum and a simple checksum     || 
     16||=Dependencies || If any                                                || 
     17||=Branch       || source:/NEMO/branches/{YEAR}/dev_r{REV}_{ACTION_NAME} || 
     18||=Previewer(s) || Names                                                 || 
     19||=Reviewer(s)  || Names                                                 || 
     20||=Ticket       || #XXXX                                                 || 
     21 
     22=== Description 
     23 
     24{{{#!box width=25em help 
     25Describe the goal of development and the methodology, \\ 
     26add reference documents or publications if relevant. 
     27}}} 
     28 
     29''THe purpose of this action is to add a simple debug interface debug(ctxt,rvar) to print some key number if needed: 
     30- global min/max to assess if the value are physical 
     31- global sum to spot NaN as soon as they appears 
     32- a checksum to catch reproducibility issue as soon as possible. In a test (change of operation order), the glob_sum catch difference 200 time step later. 
     33 
     34The suggested check_sum is based on the idea start to appear in the bit at rank 0 and then propagate. So first you need to 'convert' a double to integer using the TRANSFERT function (print the integer corresponding to the bit pattern of the corresonding float), then each processor can do it 'local sum' of MOD(idat,ibig_prime_number) with the same modulo being used after the sum of each element. This only keep the bit from rank 0 to X (depending of the prime number choosen). Then a global sum is done. 
     35 
     36Discussion at which level it should be implemented need to be discussed (module level, subroutine level, namelist parameter as dbg lvl or by code section (tra, dyn, zdf, sbc ...)) 
     37'' 
     38 
     39=== Implementation 
     40 
     41{{{#!box width=35em help 
     42Describe flow chart of the changes in the code. \\ 
     43List the Fortran modules and subroutines to be created/edited/deleted. \\ 
     44Detailed list of new variables to be defined (including namelists), \\ 
     45give for each the chosen name and description wrt coding rules. 
     46}}} 
     47 
     48''...'' 
     49 
     50=== Documentation updates 
     51 
     52{{{#!box width=55em help 
     53Using previous parts, define the main changes to be done in the NEMO literature  
     54(manuals, guide, web pages, …). 
     55}}} 
     56 
     57''...'' 
     58 
     59== Preview  
     60 
     61{{{#!box width=50em info 
     62[[Include(wiki:Developers/DevProcess#preview_)]] 
     63}}} 
     64 
     65''...'' 
     66 
     67== Tests 
     68 
     69{{{#!box width=50em info 
     70[[Include(wiki:Developers/DevProcess#tests)]] 
     71}}} 
     72 
     73''...'' 
     74 
     75== Review 
     76 
     77{{{#!box width=50em info 
     78[[Include(wiki:Developers/DevProcess#review)]] 
     79}}} 
     80 
     81''...''