https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MemoryUsage.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
13#include "MemoryUsageReporter.h"
14#include "MemoryUtils.h"
15
20{
21public:
23
25
26 virtual void timestepSetup() override;
27
28 virtual void initialize() override {}
29 virtual void execute() override;
30 virtual void finalize() override;
31 virtual PostprocessorValue getValue() const override;
32
33protected:
40
41 enum class ValueType
42 {
43 total,
44 average,
48
51
53 Real _value;
54
57
60};
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Mix-in class for querying memory metrics used by MemoryUsage and VectorMemoryUsage.
Output maximum, average, or total process memory usage.
Definition MemoryUsage.h:20
enum MemoryUsage::ValueType _value_type
Real _peak_value
peak memory usage metric in bytes (of multiple samples in the current time step)
Definition MemoryUsage.h:56
static InputParameters validParams()
Definition MemoryUsage.C:18
virtual void execute() override
Execute method.
Definition MemoryUsage.C:56
MemoryUtils::MemUnits _mem_units
The unit prefix for the reported memory statistics (kilobyte, megabyte, etc).
Definition MemoryUsage.h:50
virtual void timestepSetup() override
Gets called at the beginning of the timestep before this object is asked to do its job.
Definition MemoryUsage.C:50
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
const bool _report_peak_value
report peak value for multiple samples in a time step
Definition MemoryUsage.h:59
enum MemoryUsage::MemType _mem_type
Real _value
memory usage metric in bytes
Definition MemoryUsage.h:53
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
Definition MemoryUsage.C:85
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition MemoryUsage.h:28
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131