Name and subject of the action

Last edition: 12/18/19 10:49:41 by mathiot

The PI is responsible to closely follow the progress of the action, and especially to contact NEMO project manager if the delay on preview (or review) are longer than the 2 weeks expected.

  1. Summary
  2. Preview
  3. Tests
  4. Review


Action VALID-05_mathiot_debug
PI(S) mathiot
Digest add a debug interface which print global min/max/sum and a simple checksum
Dependencies If any
Branch source:/NEMO/branches/{YEAR}/dev_r{REV}_{ACTION_NAME}
Previewer(s) Names
Reviewer(s) Names
Ticket #XXXX


Describe the goal of development and the methodology,
add reference documents or publications if relevant.

THe purpose of this action is to add a simple debug interface debug(ctxt,rvar) to print some key number if needed:

  • global min/max to assess if the value are physical
  • global sum to spot NaN as soon as they appears
  • 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.

The 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 modulo sum is done. Test shown that this method catch change of results as soon as it appears.

Discussion 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 …))


Describe flow chart of the changes in the code.
List the Fortran modules and subroutines to be created/edited/deleted.
Detailed list of new variables to be defined (including namelists),
give for each the chosen name and description wrt coding rules.

Documentation updates

Using previous parts, define the main changes to be done in the NEMO literature (manuals, guide, web pages, …).


Since the preview step must be completed before the PI starts the coding, the previewer(s) answers are expected to be completed within the two weeks after the PI has sent the request to the previewer(s).
Then an iterative process should take place between PI and previewer(s) in order to find a consensus

Possible bottlenecks:

  • the methodology
  • the flowchart and list of routines to be changed
  • the new list of variables wrt coding rules
  • the summary of updates in literature

Once an agreement has been reached, preview is ended and the PI can start the development into his branch.


Once the development is done, the PI should complete the tests section below and after ask the reviewers to start their review.

This part should contain the detailed results of SETTE tests (restartability and reproducibility for each of the reference configuration) and detailed results of restartability and reproducibility when the option is activated on specified configurations used for this test

Regular checks:

  • Can this change be shown to produce expected impact (option activated)?
  • Can this change be shown to have a null impact (option not activated)?
  • Results of the required bit comparability tests been run: are there no differences when activating the development?
  • If some differences appear, is reason for the change valid/understood?
  • If some differences appear, is the impact as expected on model configurations?
  • Is this change expected to preserve all diagnostics?
  • If no, is reason for the change valid/understood?
  • Are there significant changes in run time/memory?


A successful review is needed to schedule the merge of this development into the future NEMO release during next Merge Party (usually in November).


  • Is the proposed methodology now implemented?
  • Are the code changes in agreement with the flowchart defined at preview step?
  • Are the code changes in agreement with list of routines and variables as proposed at preview step?
    If, not, are the discrepancies acceptable?
  • Is the in-line documentation accurate and sufficient?
  • Do the code changes comply with NEMO coding standards?
  • Is the development documented with sufficient details for others to understand the impact of the change?
  • Is the project literature (manual, guide, web, …) now updated or completed following the proposed summary in preview section?


Is the review fully successful? If not, please indicate what is still missing

Once review is successful, the development must be scheduled for merge during next Merge Party Meeting.

Last modified 8 months ago Last modified on 2019-12-18T10:49:41+01:00