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

use mpi helper.


[[Imported from SVN: r160]]
parent 8d59d14d
......@@ -3,8 +3,9 @@
// $Id$
// Dune includes
#include "config.h"
#include <dune/grid/sgrid.hh>
#include "config.h" // file constructed by ./configure script
#include <dune/grid/sgrid.hh> // load sgrid definition
#include <dune/common/mpihelper.hh> // include mpi helper class
#include "unitcube.hh"
#include "functors.hh"
......@@ -50,9 +51,8 @@ void uniformintegration (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 {
......@@ -78,10 +78,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