Changes between Version 5 and Version 6 of OfflineAddingMemoryandTimingInformation


Ignore:
Timestamp:
May 18, 2025, 7:52:59 PM (5 hours ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OfflineAddingMemoryandTimingInformation

    v5 v6  
    2424PDAF 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`.
    2525
     26The calls described here are implemented in `finalize_pdaf.F90` in the template and tutorial codes. One can directly use these routines without changes.
     27
    2628== Displaying memory information ==
    2729
    28 Information about the memory required by PDAF through allocated arrays can be obtained by inserting into the program the line
     30Information about the memory required by PDAF through allocated arrays is provided by the call
    2931{{{
    30   CALL PDAF_print_info(2)
     32  if (mype_world==0) CALL PDAF_print_info(10)
    3133}}}
    3234The function displays the following information
     
    4648}}}
    4749
    48 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`.
     50This memory information shows only the memory required by a single filter processes. In the example codes, this is the process with `mype_world=0`. One can also display the overall allocated memory by adding
     51{{{
     52  CALL PDAF_print_info(11)
     53}}}
     54to the routine `finalize_pdaf`.
    4955
    5056== Displaying timing information ==
    5157
    52 Timing information can be displayed by adding
     58Timing information is displayed by the call
    5359{{{
    54   CALL PDAF_print_info(1)
     60  CALL PDAF_print_info(3)
    5561}}}
    5662to the code. This will provide an output like
    5763{{{
    58                      PDAF Timing information
    59           ---------------------------------------------
    60             Generate state ensemble:      0.513 s
    61                   Time of forecasts:      0.010 s
    62               Time for assimilation:      0.200 s
    63             ensemble transformation:      0.245 s
    64                 Time of prepoststep:      0.016 s
     64PDAF            PDAF Timing information - call-back routines
     65PDAF        ----------------------------------------------------
     66PDAF          Initialize PDAF:                     2.761 s
     67PDAF            init_ens_pdaf:                       2.760 s
     68PDAF          LESTKF analysis:                    62.393 s
     69PDAF            PDAF-internal operations:           32.830 s
     70PDAF            OMI-internal routines:              12.946 s
     71PDAF            init_n_domains_pdaf:                 0.000 s
     72PDAF            init_dim_l_pdaf:                     0.031 s
     73PDAF            Time in OMI observation module routines
     74PDAF              init_dim_obs_pdafomi:              0.410 s
     75PDAF              obs_op_pdafomi:                    0.006 s
     76PDAF              init_dim_obs_l_pdafomi:           15.759 s
     77PDAF          prepoststep_pdaf:                    4.473 s
    6578}}}
    66 Mode detailed information can be obtained using a value of 3 or 4 in the call to `PDAF_print_info`.
     79This timing display is particularly aimed at distinguishing the time spent in call-back routines from the time spent in PDAF-internal routines or PDAF-OMI internal routines. This timing information indicate those call-back routines that need particularly much time.
    6780
     81Less detailed information cab be obtained using a value of 1, and more detailed information can be obtained using a value of 4 in the call to `PDAF_print_info`.
     82