From bd54dce2bec3f95c8bf0f0415447ff456c50e7e9 Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Wed, 27 Apr 2011 19:07:37 +0000 Subject: [PATCH] mark test "mpicollectivecommunication" as skipped if MPI is not available [[Imported from SVN: r6429]] --- dune/common/test/mpicollectivecommunication.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dune/common/test/mpicollectivecommunication.cc b/dune/common/test/mpicollectivecommunication.cc index 6d5b1f389..5c5d1271b 100644 --- a/dune/common/test/mpicollectivecommunication.cc +++ b/dune/common/test/mpicollectivecommunication.cc @@ -14,13 +14,11 @@ int main(int argc, char** argv) { typedef Dune::MPIHelper Helper; - typedef Helper::MPICommunicator MPIComm; + Helper& mpi = Helper::instance(argc, argv); #if HAVE_MPI { - Helper& mpi = Helper::instance(argc, argv); - - + typedef Helper::MPICommunicator MPIComm; Dune::CollectiveCommunication<MPIComm> comm(mpi.getCommunicator()); enum { length = 5 }; @@ -52,6 +50,7 @@ int main(int argc, char** argv) std::cout << "We are at the end!"<<std::endl; #else std::cout << "WARNING: test Dune::CollectiveCommunication<MPI_Comm> disabled because MPI not available! " << std::endl; + return 77; #endif return 0; } -- GitLab