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