Skip to content
Snippets Groups Projects
Commit 124aea21 authored by Christian Engwer's avatar Christian Engwer
Browse files

try MPIGuard if MPI_COMM_WORLD only if MPI was found

[[Imported from SVN: r5951]]
parent d51dc906
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ int main(int argc, char** argv)
std::cout << "---- guard(MPI_COMM_WORLD)" << std::endl;
try
{
#if HAVE_MPI
// at the end of this block the guard is destroyed and possible exceptions are communicated
{
Dune::MPIGuard guard(MPI_COMM_WORLD);
......@@ -39,6 +40,9 @@ int main(int argc, char** argv)
DUNE_THROW(Dune::Exception, "Fakeproblem on process " << mpihelper.rank());
guard.finalize();
}
#else
std::cout << "Info: no mpi used\n";
#endif
}
catch (Dune::Exception & e)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment