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

use mpi helper.


[[Imported from SVN: r164]]
parent 777e7fc1
......@@ -5,11 +5,14 @@
#include "config.h"
#include <iostream>
#include <iomanip>
#include <dune/grid/io/file/vtk/vtkwriter.hh>
#include <dune/grid/io/file/vtk/vtkwriter.hh> // VTK output routines
#include <dune/common/mpihelper.hh> // include mpi helper class
#include "unitcube.hh"
#include "functors.hh"
#include "integrateentity.hh"
//! adaptive refinement test
template<class Grid, class Functor>
void adaptiveintegration (Grid& grid, const Functor& f)
......@@ -111,9 +114,8 @@ void dowork (Grid& grid)
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 {
......@@ -151,10 +153,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