From: Wolfgang Bangerth Date: Fri, 16 Dec 2016 05:43:56 +0000 (-0700) Subject: Fix a quicktest. X-Git-Tag: v8.5.0-rc1~331^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96223f508d9443f3f915b91571fff0ae59880097;p=dealii.git 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. --- 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;