www.mooseframework.org
MemoryUsage.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef MEMORYUSAGE_H
16 #define MEMORYUSAGE_H
17 
18 #include "GeneralPostprocessor.h"
19 
20 class MemoryUsage;
21 
22 template <>
24 
29 {
30 public:
32 
33  virtual void timestepSetup() override;
34 
35  virtual void initialize() override;
36  virtual void execute() override;
37  virtual void finalize() override;
38  virtual PostprocessorValue getValue() override;
39 
40 protected:
41  enum class MemType
42  {
46  } _mem_type;
47 
48  enum class ValueType
49  {
50  total,
51  average,
52  max_process,
53  min_process
54  } _value_type;
55 
57  Real _value;
58 
61 
63  const bool _report_peak_value;
64 };
65 
66 #endif // MEMORYUSAGE_H
MemoryUsage(const InputParameters &parameters)
Definition: MemoryUsage.C:46
virtual PostprocessorValue getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
Definition: MemoryUsage.C:164
enum MemoryUsage::MemType _mem_type
InputParameters validParams< MemoryUsage >()
Definition: MemoryUsage.C:29
Real _value
memory usage metric in bytes
Definition: MemoryUsage.h:57
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
virtual void timestepSetup() override
Gets called at the beginning of the timestep before this object is asked to do its job...
Definition: MemoryUsage.C:57
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:73
Output maximum, average, or total process memory usage.
Definition: MemoryUsage.h:28
virtual void execute() override
Execute method.
Definition: MemoryUsage.C:69
Real _peak_value
peak memory usage metric in bytes (of multiple samples in the current time step)
Definition: MemoryUsage.h:60
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
const bool _report_peak_value
report peak value for multiple samples in a time step
Definition: MemoryUsage.h:63
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: MemoryUsage.C:63
enum MemoryUsage::ValueType _value_type
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:133