diff --git a/src/foam/db/IOstreams/Pstreams/PstreamReduceOps.C b/src/foam/db/IOstreams/Pstreams/PstreamReduceOps.C index f78bd0b38..28d93e559 100644 --- a/src/foam/db/IOstreams/Pstreams/PstreamReduceOps.C +++ b/src/foam/db/IOstreams/Pstreams/PstreamReduceOps.C @@ -68,6 +68,25 @@ void Foam::reduce error::printStack(Pout); } +# ifdef FULLDEBUG + // Check for processors that are not in the communicator + if (Pstream::myProcNo(comm) == -1) + { + FatalErrorIn + ( + "void Foam::reduce\n" + "(\n" + " bool& Value,\n" + " const andOp& bop,\n" + " const int tag,\n" + " const label comm\n" + ")" + ) << "Reduce called on the processor which is not a member " + << "of comm. This is not allowed" + << abort(FatalError); + } +# endif + // Note: C++ bool is a type separate from C and cannot be cast // For safety and compatibility with compilers, convert bool to int // to comply with MPI types. HJ, 23/Sep/2016 @@ -108,6 +127,25 @@ void Foam::reduce error::printStack(Pout); } +# ifdef FULLDEBUG + // Check for processors that are not in the communicator + if (Pstream::myProcNo(comm) == -1) + { + FatalErrorIn + ( + "void Foam::reduce\n" + "(\n" + " bool& Value,\n" + " const orOp& bop,\n" + " const int tag,\n" + " const label comm\n" + ")" + ) << "Reduce called on the processor which is not a member " + << "of comm. This is not allowed" + << abort(FatalError); + } +# endif + // Note: C++ bool is a type separate from C and cannot be cast // For safety and compatibility with compilers, convert bool to int // to comply with MPI types. HJ, 23/Sep/2016 @@ -148,6 +186,25 @@ void Foam::reduce error::printStack(Pout); } +# ifdef FULLDEBUG + // Check for processors that are not in the communicator + if (Pstream::myProcNo(comm) == -1) + { + FatalErrorIn + ( + "void Foam::reduce\n" + "(\n" + " label& Value,\n" + " const minOp