MPI_Helpers class contains static helper methods to support MPI within oomph-lib. The methods init(...) and finalize() initialize and finalize MPI in oomph-lib and manage the oomph-libs global communicator communicator_pt(). NOTE: This class encapsulates static helper methods and instances of it CANNOT be instantiated. More...
#include <oomph_utilities.h>
Static Public Member Functions | |
static void | init (int argc, char **argv, const bool &make_duplicate_of_mpi_comm_world=true) |
initialise mpi (oomph-libs equivalent of MPI_Init(...)) Initialises MPI and creates the global oomph-lib communicator. If optional boolean flag is set to false, we use MPI_COMM_WORLD itself as oomph-lib's communicator. Defaults to true. More... | |
static void | finalize () |
finalize mpi (oomph-lib equivalent of MPI_Finalize()) Deletes the global oomph-lib communicator and finalizes MPI. More... | |
static OomphCommunicator * | communicator_pt () |
access to global communicator. This is the oomph-lib equivalent of MPI_COMM_WORLD More... | |
static bool | mpi_has_been_initialised () |
return true if MPI has been initialised More... | |
Private Member Functions | |
MPI_Helpers () | |
private default constructor definition (to prevent instances of the class being instantiated) More... | |
MPI_Helpers (const MPI_Helpers &) | |
private copy constructor definition (to prevent instances of the class being instantiated) More... | |
Static Private Attributes | |
static bool | MPI_has_been_initialised = false |
Bool set to true if MPI has been initialised. More... | |
static OomphCommunicator * | Communicator_pt = 0 |
the global communicator More... | |
MPI_Helpers class contains static helper methods to support MPI within oomph-lib. The methods init(...) and finalize() initialize and finalize MPI in oomph-lib and manage the oomph-libs global communicator communicator_pt(). NOTE: This class encapsulates static helper methods and instances of it CANNOT be instantiated.
Definition at line 831 of file oomph_utilities.h.
|
private |
private default constructor definition (to prevent instances of the class being instantiated)
|
private |
private copy constructor definition (to prevent instances of the class being instantiated)
|
static |
access to global communicator. This is the oomph-lib equivalent of MPI_COMM_WORLD
access to the global oomph-lib communicator
Definition at line 1046 of file oomph_utilities.cc.
References Communicator_pt, and MPI_has_been_initialised.
Referenced by oomph::Z2ErrorEstimator::doc_flux(), oomph::MemoryUsage::doc_my_memory_usage(), oomph::MemoryUsage::doc_total_memory_usage(), oomph::SuperLUSolver::factorise_distributed(), oomph::HelmholtzMGPreconditioner< DIM >::full_setup(), oomph::Pseudo_Elastic_Preconditioner_Subsidiary_Operator_Helper::get_elastic_preconditioner_hypre(), oomph::Z2ErrorEstimator::get_element_errors(), oomph::Node::hanging_pt(), oomph::HypreInterface::hypre_solve(), oomph::HypreInterface::HypreInterface(), oomph::Problem::Problem(), oomph::MemoryUsage::run_continous_top(), oomph::MGPreconditioner< DIM >::setup(), oomph::HelmholtzGMRESMG< MATRIX >::solve(), oomph::HelmholtzFGMRESMG< MATRIX >::solve(), and oomph::MemoryUsage::stop_continous_top().
|
static |
finalize mpi (oomph-lib equivalent of MPI_Finalize()) Deletes the global oomph-lib communicator and finalizes MPI.
finalize mpi
Definition at line 1032 of file oomph_utilities.cc.
References Communicator_pt.
Referenced by oomph::CommandLineArgs::parse_and_assign().
|
static |
initialise mpi (oomph-libs equivalent of MPI_Init(...)) Initialises MPI and creates the global oomph-lib communicator. If optional boolean flag is set to false, we use MPI_COMM_WORLD itself as oomph-lib's communicator. Defaults to true.
Initialize mpi. If optional boolean flag is set to false, we use MPI_COMM_WORLD itself as oomph-lib's communicator. Defaults to true.
Definition at line 983 of file oomph_utilities.cc.
References oomph::MPIOutputModifier::communicator_pt(), Communicator_pt, MPI_has_been_initialised, oomph::oomph_info, oomph::oomph_mpi_output, and oomph::OomphInfo::output_modifier_pt().
|
inlinestatic |
return true if MPI has been initialised
Definition at line 851 of file oomph_utilities.h.
Referenced by oomph::HypreHelpers::create_HYPRE_Matrix(), oomph::MemoryUsage::doc_my_memory_usage(), oomph::MemoryUsage::doc_total_memory_usage(), oomph::SuperLUSolver::factorise(), oomph::Z2ErrorEstimator::get_element_errors(), oomph::HypreInterface::hypre_solve(), oomph::HypreInterface::HypreInterface(), oomph::Problem::newton_solve(), oomph::Problem::Problem(), oomph::ProjectionProblem< PROJECTABLE_ELEMENT >::project(), oomph::MemoryUsage::run_continous_top(), oomph::MatrixVectorProduct::setup(), oomph::MemoryUsage::stop_continous_top(), and oomph::TimingHelpers::timer().
|
staticprivate |
the global communicator
Definition at line 869 of file oomph_utilities.h.
Referenced by communicator_pt(), finalize(), and init().
|
staticprivate |
Bool set to true if MPI has been initialised.
Definition at line 866 of file oomph_utilities.h.
Referenced by communicator_pt(), and init().