Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v3.1.1
  • v3.1.0
  • v3.0.1
  • v3.0.0
  • v2.1.3
  • v2.1.2
  • v2.1.1
  • v2.1.0
  • v2.0.0
  • v1.2.1
  • v1.2.0
  • v1.1.3
13 results

frss

  • Clone with SSH
  • Clone with HTTPS
  • Tobias Melson's avatar
    Tobias Melson authored
    Exracting the memory information from 'ps -o rss' overestimates the
    memory used by the MPI application, because of shared libraries. Using
    the data from /proc/meminfo gives a better estimate of the used memory,
    however, determining the baseline used by the operating system is harder
    to detect.
    0d99043f
    History

    FRSS

    Introduction

    FRSS is a library for printing the resident set size (RSS) of a Fortran application at runtime. It is MPI-aware and displays the memory information for the corresponding MPI rank. It can also be used to determine the maximum used memory per node.

    Usage

    Print the RSS

    Anywhere in you Fortran code, you can trigger the output by calling the subroutine:

    call frss_print()

    It will print the following information to stdout:

    Abbreviation Description Source
    RSS Current resident set size /proc/self/status
    HWM High water mark of the RSS /proc/self/status
    OOM Out-of-memory score /proc/self/oom_score
    dt Elapsed wall-clock time since last call

    If you want to display this information only for a specific MPI rank, call (e.g. for rank 0):

    call frss_print_rank(0)

    You can also display the currently used memory of the node your application is running on by calling:

    call frss_print_node()

    Monitor memory consumption of a node

    To determine the high water mark of the used memory per node, you need to start the measurement first providing the desired time sampling. For extracting the memory information every 1000 milliseconds, for example, call:

    call frss_monitor_node(1000)

    Before your application finishes, print the measured data with:

    call frss_print_node()

    The output contains the following information:

    Label Description Source
    Total Total usable memory /proc/meminfo
    Used (now) Currently used memory /proc/meminfo
    Used (initial) Used memory when frss_monitor_node was called /proc/meminfo
    Used (max) Maxmimum of used memory during measurement /proc/meminfo

    Link with FRSS

    In order to use FRSS, you need to link with the library, e.g. by using the following flags: -L/path/to/frss -lfrss.

    License

    GPLv3