From 96223f508d9443f3f915b91571fff0ae59880097 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 15 Dec 2016 22:43:56 -0700 Subject: [PATCH] Fix a quicktest. 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. --- tests/quick_tests/mpi.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/quick_tests/mpi.cc b/tests/quick_tests/mpi.cc index 4cd4259521..350d1f8a85 100644 --- a/tests/quick_tests/mpi.cc +++ b/tests/quick_tests/mpi.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// 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. // @@ -48,6 +48,14 @@ int main(int argc, char *argv[] ) 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; -- 2.39.5