The test assigned MPI return codes to a variable, but then did not do anything with this
variable. We may as well test for errors.
// ---------------------------------------------------------------------
//
-// Copyright (C) 2013 - 2015 by the deal.II authors
+// Copyright (C) 2013 - 2016 by the deal.II authors
//
// This file is part of the deal.II library.
//
else if (myrank==0)
err = MPI_Recv(&value, 1, MPI_INT, 1, 1, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
+ if (err != MPI_SUCCESS)
+ {
+ std::cerr << "MPI_Send/Recv error code = "
+ << err
+ << std::endl;
+ abort ();
+ }
+
if (myrank==0 && value!=1)
{
std::cerr << "ERROR: MPI_Send/Recv did not work!" << std::endl;
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams