https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MemoryUsageReporter.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
12#include "Moose.h"
13#include "MooseObject.h"
14#include "libmesh/communicator.h"
15
20{
21public:
22 MemoryUsageReporter(const MooseObject * moose_object);
23
24protected:
27
29 processor_id_type _my_rank;
30
32 processor_id_type _nrank;
33
35 const std::vector<unsigned int> & _hardware_id;
36
38 unsigned long long _memory_total;
39
41 std::vector<unsigned long long> _hardware_memory_total;
42
43private:
46
49};
Mix-in class for querying memory metrics used by MemoryUsage and VectorMemoryUsage.
unsigned long long _memory_total
total RAM installed in the local node
const std::vector< unsigned int > & _hardware_id
hardware IDs for each MPI rank (valid on rank zero only)
std::vector< unsigned long long > _hardware_memory_total
total RAM for each hardware ID (node) (valid on rank zero only)
processor_id_type _nrank
number of ranks in the object's communicator
const Parallel::Communicator & _mur_communicator
communicator for this object
void sharedMemoryRanksByProcessorname()
Identify hardware by MPI processor name.
processor_id_type _my_rank
this objects rank
void sharedMemoryRanksBySplitCommunicator()
Use a share memory type communicator split (MPI3)
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31