wiki:OfflineAddingMemoryandTimingInformation

Version 3 (modified by lnerger, 8 years ago) (diff)

--

Offline Mode: Adding memory and timing information

Offline Mode: Implementation Guide

  1. Main page
  2. Adaptation of the parallelization
  3. Initialization of PDAF
  4. Implementation of the analysis step
  5. Memory and timing information

Overview

PDAF provides functions to display the memory required by the array allocated inside PDAF. In addition, information about the execution duration of different parts of PDAF can be displayed. These information can be obtained by calling the routine PDAF_print_info.

Displaying memory information

Information about the memory required by PDAF through allocated arrays can be obtained by inserting into the program the line

  CALL PDAF_print_info(2)

The function displays the following information

  • Memory required for the ensemble array, state vector, and matrix Uinv
  • Memory required by the analysis step
  • Memory required to perform the ensemble transformation

The output will look like this:

{{{
                       PDAF Memory overview
          ---------------------------------------------
                     Allocated memory  (MB)
              state and U:   0.59617 MB (persistent)
           ensemble array:   0.64087 MB (persistent)
            analysis step:   6.05578 MB (temporary)
               resampling:   2.81129 MB (temporary)
}}}

Currently only the memory required by the first process of the filter processes is displayed. Thus the total required memory should be the displayed memory multiplied by the number of processes in `COMM_filter`.

== Displaying timing information ==

Timing information can be displayed by adding
{{{
  CALL PDAF_print_info(1)
}}}
to the code. This will provide an output like
{{{
                     PDAF Timing information
          ---------------------------------------------
            Generate state ensemble:      0.513 s
                  Time of forecasts:      0.010 s
              Time for assimilation:      0.200 s
            ensemble transformation:      0.245 s
                Time of prepoststep:      0.016 s
}}}
Mode detailed information can be obtained using a value of 3 or 4 in the call to `PDAF_print_info`.