fixed: MPI handling across all apps

we need to call mpi_init when compiled against mpi (in particular mpich)
even if running with a single node.

this fixes this across all apps in a uniform way (the dune-intended approach)
This commit is contained in:
Arne Morten Kvarving
2013-10-08 13:44:56 +02:00
parent c29aabe236
commit 24e2dff7c4
16 changed files with 147 additions and 106 deletions
+10
View File
@@ -43,6 +43,14 @@
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <sys/utsname.h>
#include <iostream>
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
#include <dune/common/parallel/mpihelper.hh>
#else
#include <dune/common/mpihelper.hh>
#endif
namespace Opm{
template <class IsotropyPolicy>
struct Implicit
@@ -173,6 +181,8 @@ std::string toString(T const& value) {
int main(int argc, char** argv)
try
{
Dune::MPIHelper::instance(argc, argv);
if (argc == 1) {
usageandexit();
}