Offline Mode: Adding memory and timing information (PDAF 2)
Offline Mode: Implementation Guide for PDAF 2
- Main page
- Adaptation of the parallelization
- Initialization of PDAF
- Implementation of the analysis step
- Memory and timing information
Contents of this page
This Implementaton Guide describes the implementation of the offline mode as of PDAF V2.3. This is intended as a reference for existing implementations before the release of PDAF V3.0. For new implementations, we recommend to follow the updated Implementation Guide for PDAF 3. |
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
.
These routines are usually called in finalize_pdaf
.
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(10)
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
.