added Environment for MPI initialization
Compare changes
- Praetorius, Simon authored
+ 7
− 7
@@ -8,17 +8,17 @@
@@ -52,7 +52,7 @@ namespace AMDiS
@@ -62,7 +62,7 @@ namespace AMDiS
This MR replaces the old AMDiS::init()
- AMDiS::finalize()
pattern with a RAII class Environment
, to be instantiated at the begin of the main method, i.e.
int main(int argc, char** argv)
{
Environment env(argc, argv);
// get MPI rank and size from environment after instantiation:
std::cout << Environment::mpiRank();
std::cout << Environment::mpiSize();
}
the ``finalize'' is called automatically when env
is destructed, i.e. at the end of main().