Skip to content
Snippets Groups Projects

added Environment for MPI initialization

Merged Praetorius, Simon requested to merge feature/environment into master
1 file
+ 7
7
Compare changes
  • Side-by-side
  • Inline
+ 7
7
@@ -8,17 +8,17 @@
namespace AMDiS
{
/// Establishes an environemnt for sequential and parallel AMDiS programs
/// Establishes an environment for sequential and parallel AMDiS programs
/**
* This object initializes the MPI environement, parses initfiles and may
* initialize other external libraries. It is constructed with the program
* commandline arguments. In its destruction, the MPI environemnt is finalized.
* In the vast majority of AMDiS programs, an instance of Environemnt should
* be desclared at the very beginning of the main function.
* commandline arguments. In its destruction, the MPI environment is finalized.
* In the vast majority of AMDiS programs, an instance of Environment should
* be declared at the very beginning of the main function.
**/
class Environment
{
// insternal static container holding a pointer to the Dune::MPIHelper.
// internal static container holding a pointer to the Dune::MPIHelper.
struct Mpi
{
static Mpi& instance()
@@ -52,7 +52,7 @@ namespace AMDiS
/// Create an environment without mpi initialization, with a fixed initfile given as string
Environment(std::string const& initFileName = "");
/// Create an environemtn with initialization of MPI and initifiles from commandline arguments
/// Create an environment with initialization of MPI and initifiles from commandline arguments
/// or the provided initfile filename.
Environment(int& argc, char**& argv, std::string const& initFileName = "");
@@ -62,7 +62,7 @@ namespace AMDiS
return Mpi::instance().rank();
}
/// Return the MPI_Size if the group created by Dune::MPIHelper.
/// Return the MPI_Size of the group created by Dune::MPIHelper.
static int mpiSize()
{
return Mpi::instance().size();
Loading