Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Functions
Utilities::System Namespace Reference

Classes

struct  MemoryStats
 

Functions

double get_cpu_load ()
 
void get_memory_stats (MemoryStats &stats)
 
std::string get_hostname ()
 
std::string get_time ()
 
bool job_supports_mpi ()
 
bool program_uses_mpi () DEAL_II_DEPRECATED
 
Functions that work

in parallel via MPI. The functions following here are all deprecated and have been moved to namespace Utilities::MPI.

unsigned int get_n_mpi_processes (const MPI_Comm &mpi_communicator) DEAL_II_DEPRECATED
 
unsigned int get_this_mpi_process (const MPI_Comm &mpi_communicator) DEAL_II_DEPRECATED
 
void calculate_collective_mpi_min_max_avg (const MPI_Comm &mpi_communicator, const double my_value, MinMaxAvg &result) DEAL_II_DEPRECATED
 

Detailed Description

A namespace for utility functions that probe system properties.

Function Documentation

double Utilities::System::get_cpu_load ( )

Return the CPU load as returned by "uptime". Note that the interpretation of this number depends on the actual number of processors in the machine. This is presently only implemented on Linux, using the /proc/loadavg pseudo-file, on other systems we simply return zero.

void Utilities::System::get_memory_stats ( MemoryStats &  stats)

Fills the

Parameters
statsstructure with information about the memory consumption of this process. This is only implemented on Linux.
std::string Utilities::System::get_hostname ( )

Return the name of the host this process runs on.

std::string Utilities::System::get_time ( )

Return the present time as HH:MM:SS.

bool Utilities::System::job_supports_mpi ( )

Return whether (i) deal.II has been compiled to support MPI (for example by compiling with CXX=mpiCC) and if so whether (ii) MPI_Init() has been called (for example using the Utilities::System::MPI_InitFinalize class). In other words, the result indicates whether the current job is running under MPI.

Note
The function does not take into account whether an MPI job actually runs on more than one processor or is, in fact, a single-node job that happens to run under MPI.
bool Utilities::System::program_uses_mpi ( )
unsigned int Utilities::System::get_n_mpi_processes ( const MPI_Comm &  mpi_communicator)

This function is an alias for Utilities::MPI::n_mpi_processes.

Deprecated:
unsigned int Utilities::System::get_this_mpi_process ( const MPI_Comm &  mpi_communicator)

This function is an alias for Utilities::MPI::this_mpi_process.

Deprecated:
void Utilities::System::calculate_collective_mpi_min_max_avg ( const MPI_Comm &  mpi_communicator,
const double  my_value,
MinMaxAvg &  result 
)