Changes between Initial Version and Version 1 of PDAF_print_info


Ignore:
Timestamp:
Dec 5, 2019, 4:17:47 PM (5 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAF_print_info

    v1 v1  
     1= PDAF_print_info =
     2
     3This page documents the routine `PDAF_print_info` of PDAF.
     4
     5This routine is called to display memory and timing information measured by PDAF.
     6
     7== Displaying memory information ==
     8
     9Information about the memory required by PDAF through allocated arrays can be obtained by inserting into the program the line
     10{{{
     11  CALL PDAF_print_info(2)
     12}}}
     13The function displays the following information
     14 * Memory required for the ensemble array, state vector, and transform matrix
     15 * Memory required by the analysis step
     16 * Memory required to perform the ensemble transformation
     17
     18The output will look like this:
     19{{{
     20                       PDAF Memory overview
     21          ---------------------------------------------
     22                     Allocated memory  (MB)
     23              state and U:   0.59617 MB (persistent)
     24           ensemble array:   0.64087 MB (persistent)
     25            analysis step:   6.05578 MB (temporary)
     26               resampling:   2.81129 MB (temporary)
     27}}}
     28
     29Currently 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`.
     30
     31== Displaying timing information ==
     32
     33Timing information can be displayed by adding
     34{{{
     35  CALL PDAF_print_info(X)
     36}}}
     37to the code. Where X is the timer level to be shown. Available choices are
     38 * X=1: Basic timers
     39 * X=3: Timers showing the time spent int he different call-back routines (this veriant was added with PDAF 1.15)
     40 * X=4: More detailed timers about parts of the filter algorithm (before PDAF 1.15, this was timer level 3)
     41 * X=5: Very detailed timers about various operations in the filter algorithm (before PDAF 1.15, this was timer level 4)
     42
     43For X=1, the output will look like
     44{{{
     45  PDAF                     PDAF Timing information
     46  PDAF          ---------------------------------------------
     47  PDAF                  Initialize PDAF:      0.078 s
     48  PDAF                Ensemble forecast:      0.003 s
     49  PDAF                  LESTKF analysis:     25.183 s
     50  PDAF                      Prepoststep:      0.017 s
     51}}}
     52
     53We recommend to use X=3 for optimizing the user routines. The output will look like
     54{{{
     55  PDAF            PDAF Timing information - call-back routines
     56  PDAF        ----------------------------------------------------
     57  PDAF          Initialize PDAF:                     0.078 s
     58  PDAF            init_ens_pdaf:                       0.077 s
     59  PDAF          Ensemble forecast:                   0.003 s
     60  PDAF            MPI communication in PDAF:           0.000 s
     61  PDAF            distribute_state_pdaf:               0.001 s
     62  PDAF            collect_state_pdaf:                  0.000 s
     63  PDAF          LESTKF analysis:                    25.183 s
     64  PDAF            PDAF-internal operations:           24.762 s
     65  PDAF            init_n_domains_pdaf:                 0.000 s
     66  PDAF            init_dim_obs_f_pdaf:                 0.000 s
     67  PDAF            obs_op_f_pdaf:                       0.003 s
     68  PDAF            init_dim_l_pdaf:                     0.001 s
     69  PDAF            init_dim_obs_l_pdaf:                 0.001 s
     70  PDAF            g2l_state_pdaf:                      0.001 s
     71  PDAF            g2l_obs_pdaf:                        0.021 s
     72  PDAF            init_obs_l_pdaf:                     0.000 s
     73  PDAF            prodRinvA_l_pdaf:                    0.006 s
     74  PDAF            l2g_state_pdaf:                      0.014 s
     75  PDAF          prepoststep_pdaf:                    0.017 s
     76}}}
     77This output will show you in which routine most time is spent. If it is a call-back routine, you have the possibility to check for optimizations to this routine to speed up the computation. If most time is spend inside PDAF, as in the example, you can't further optimize.
     78
     79