Commit a2bd2c1b authored by Robert Klöfkorn's avatar Robert Klöfkorn

use mpi helper.


[[Imported from SVN: r161]]
parent a7b0ec34
......@@ -5,14 +5,16 @@
#include <fstream> // for input/output to files
#include <vector> // STL vector class
#include <dune/grid/common/mcmgmapper.hh> // mapper class
#include "vtkout.hh"
#include <dune/common/mpihelper.hh> // include mpi helper class
#include "vtkout.hh"
#include "unitcube.hh"
#include "transportproblem.hh"
#include "initialize.hh"
#include "parfvdatahandle.hh"
#include "parevolve.hh"
//===============================================================
// the time loop function working for all types of grids
//===============================================================
......@@ -63,9 +65,8 @@ void partimeloop (const G& grid, double tend)
int main (int argc , char ** argv)
{
#if HAVE_MPI
MPI_Init(&argc,&argv);
#endif
// initialize MPI, finalize is done automatically on exit
Dune::MPIHelper::instance(argc,argv);
// start try/catch block to get error messages from dune
try {
......@@ -86,10 +87,6 @@ int main (int argc , char ** argv)
return 1;
}
#if HAVE_MPI
MPI_Finalize();
#endif
// done
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment