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

use mpi helper.


[[Imported from SVN: r165]]
parent dc39a99e
......@@ -6,6 +6,8 @@
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <dune/common/mpihelper.hh> // include mpi helper class
#include "elementdata.hh"
#include "vertexdata.hh"
......@@ -29,9 +31,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 {
......@@ -71,9 +72,6 @@ int main(int argc, char **argv)
std::cout << "Unknown ERROR" << std::endl;
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