Utilities::System Namespace Reference
[Utility functions and classes]

Classes

class  MPI_InitFinalize

Functions

double get_cpu_load ()
std::string get_hostname ()
std::string get_time ()
unsigned int get_n_mpi_processes (const MPI_Comm &mpi_communicator)
unsigned int get_this_mpi_process (const MPI_Comm &mpi_communicator)
bool program_uses_mpi ()

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.

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.

unsigned int Utilities::System::get_n_mpi_processes ( const MPI_Comm &  mpi_communicator  ) 

Return the number of MPI processes there exist in the given communicator object. If this is a sequential job, it returns 1.

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

Return the number of the present MPI process in the space of processes described by the given communicator. This will be a unique value for each process between zero and (less than) the number of all processes (given by get_n_mpi_processes()).

bool Utilities::System::program_uses_mpi (  ) 

Returns whether deal.II has been configured to use MPI and if so whether MPI has already been initialized using MPI_Init().


deal.II documentation generated on Mon Nov 23 22:58:41 2009 by doxygen 1.6.1