mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use Perr instead of Pout for UPstream::debug and warnComm
- avoids polluting standard output for utilities such as foamDictionary etc
This commit is contained in:
@ -77,7 +77,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::UIPstream PstreamBuffers :"
|
Perr<< "UIPstream::UIPstream PstreamBuffers :"
|
||||||
<< " fromProcNo:" << fromProcNo_
|
<< " fromProcNo:" << fromProcNo_
|
||||||
<< " tag:" << tag_ << " comm:" << comm_
|
<< " tag:" << tag_ << " comm:" << comm_
|
||||||
<< " receive buffer size:" << messageSize_
|
<< " receive buffer size:" << messageSize_
|
||||||
|
|||||||
@ -78,7 +78,7 @@ void Foam::Pstream::combineGather
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received from "
|
Perr<< " received from "
|
||||||
<< belowID << " data:" << received << endl;
|
<< belowID << " data:" << received << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ void Foam::Pstream::combineGather
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received from "
|
Perr<< " received from "
|
||||||
<< belowID << " data:" << received << endl;
|
<< belowID << " data:" << received << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ void Foam::Pstream::combineGather
|
|||||||
{
|
{
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " sending to " << myComm.above()
|
Perr<< " sending to " << myComm.above()
|
||||||
<< " data:" << value << endl;
|
<< " data:" << value << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ void Foam::Pstream::listCombineGather
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received from "
|
Perr<< " received from "
|
||||||
<< belowID << " data:" << received << endl;
|
<< belowID << " data:" << received << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ void Foam::Pstream::listCombineGather
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received from "
|
Perr<< " received from "
|
||||||
<< belowID << " data:" << received << endl;
|
<< belowID << " data:" << received << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ void Foam::Pstream::listCombineGather
|
|||||||
{
|
{
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " sending to " << myComm.above()
|
Perr<< " sending to " << myComm.above()
|
||||||
<< " data:" << values << endl;
|
<< " data:" << values << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ void Foam::Pstream::mapCombineGather
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received from "
|
Perr<< " received from "
|
||||||
<< belowID << " data:" << received << endl;
|
<< belowID << " data:" << received << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ void Foam::Pstream::mapCombineGather
|
|||||||
{
|
{
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " sending to " << myComm.above()
|
Perr<< " sending to " << myComm.above()
|
||||||
<< " data:" << values << endl;
|
<< " data:" << values << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ void Foam::Pstream::gatherList
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received through "
|
Perr<< " received through "
|
||||||
<< belowID << " data from:" << belowID
|
<< belowID << " data from:" << belowID
|
||||||
<< " data:" << values[belowID] << endl;
|
<< " data:" << values[belowID] << endl;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ void Foam::Pstream::gatherList
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received through "
|
Perr<< " received through "
|
||||||
<< belowID << " data from:" << leafID
|
<< belowID << " data from:" << leafID
|
||||||
<< " data:" << values[leafID] << endl;
|
<< " data:" << values[leafID] << endl;
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ void Foam::Pstream::gatherList
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " sending to " << myComm.above()
|
Perr<< " sending to " << myComm.above()
|
||||||
<< " data from me:" << myProci
|
<< " data from me:" << myProci
|
||||||
<< " data:" << values[myProci] << endl;
|
<< " data:" << values[myProci] << endl;
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ void Foam::Pstream::gatherList
|
|||||||
{
|
{
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " sending to "
|
Perr<< " sending to "
|
||||||
<< myComm.above() << " data from:" << leafID
|
<< myComm.above() << " data from:" << leafID
|
||||||
<< " data:" << values[leafID] << endl;
|
<< " data:" << values[leafID] << endl;
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ void Foam::Pstream::scatterList
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " received through "
|
Perr<< " received through "
|
||||||
<< myComm.above() << " data for:" << leafID
|
<< myComm.above() << " data for:" << leafID
|
||||||
<< " data:" << values[leafID] << endl;
|
<< " data:" << values[leafID] << endl;
|
||||||
}
|
}
|
||||||
@ -310,7 +310,7 @@ void Foam::Pstream::scatterList
|
|||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
Pout<< " sent through "
|
Perr<< " sent through "
|
||||||
<< belowID << " data for:" << leafID
|
<< belowID << " data for:" << leafID
|
||||||
<< " data:" << values[leafID] << endl;
|
<< " data:" << values[leafID] << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,8 +61,8 @@ void reduce
|
|||||||
{
|
{
|
||||||
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "** reducing:" << value << " with comm:" << comm << endl;
|
Perr<< "** reducing:" << value << " with comm:" << comm << endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
Pstream::gather(value, bop, tag, comm);
|
Pstream::gather(value, bop, tag, comm);
|
||||||
Pstream::broadcast(value, comm);
|
Pstream::broadcast(value, comm);
|
||||||
|
|||||||
@ -257,7 +257,7 @@ Foam::UIPstreamBase::~UIPstreamBase()
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstreamBase Destructor : tag:" << tag_
|
Perr<< "UIPstreamBase Destructor : tag:" << tag_
|
||||||
<< " fromProcNo:" << fromProcNo_
|
<< " fromProcNo:" << fromProcNo_
|
||||||
<< " clearing receive buffer of size "
|
<< " clearing receive buffer of size "
|
||||||
<< recvBuf_.size()
|
<< recvBuf_.size()
|
||||||
|
|||||||
@ -221,7 +221,7 @@ void Foam::UPstream::setParRun(const label nProcs, const bool haveThreads)
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::setParRun :"
|
Perr<< "UPstream::setParRun :"
|
||||||
<< " nProcs:" << nProcs
|
<< " nProcs:" << nProcs
|
||||||
<< " haveThreads:" << haveThreads
|
<< " haveThreads:" << haveThreads
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -274,7 +274,7 @@ Foam::label Foam::UPstream::allocateCommunicator
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "Allocating communicator " << index << nl
|
Perr<< "Allocating communicator " << index << nl
|
||||||
<< " parent : " << parentIndex << nl
|
<< " parent : " << parentIndex << nl
|
||||||
<< " procs : " << subRanks << nl
|
<< " procs : " << subRanks << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -335,7 +335,7 @@ Foam::label Foam::UPstream::allocateCommunicator
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "Allocating communicator " << index << nl
|
Perr<< "Allocating communicator " << index << nl
|
||||||
<< " parent : " << parentIndex << nl
|
<< " parent : " << parentIndex << nl
|
||||||
<< " procs : " << flatOutput(subRanks) << nl
|
<< " procs : " << flatOutput(subRanks) << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -492,7 +492,7 @@ bool Foam::UPstream::allocateHostCommunicatorPairs()
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "Allocating host communicators "
|
Perr<< "Allocating host communicators "
|
||||||
<< interHostComm_ << ", " << intraHostComm_ << nl
|
<< interHostComm_ << ", " << intraHostComm_ << nl
|
||||||
<< " parent : " << parentCommunicator << nl
|
<< " parent : " << parentCommunicator << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -588,7 +588,7 @@ void Foam::UPstream::freeCommunicator
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "Communicators : Freeing communicator " << communicator
|
Perr<< "Communicators : Freeing communicator " << communicator
|
||||||
<< " parent: " << parentComm_[communicator]
|
<< " parent: " << parentComm_[communicator]
|
||||||
<< " myProcNo: " << myProcNo_[communicator]
|
<< " myProcNo: " << myProcNo_[communicator]
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -145,8 +145,8 @@ Foam::OSstream& Foam::messageStream::masterStream(const label communicator)
|
|||||||
{
|
{
|
||||||
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "** messageStream with comm:" << communicator << endl;
|
Perr<< "** messageStream with comm:" << communicator << endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (communicator == UPstream::worldComm || UPstream::master(communicator))
|
if (communicator == UPstream::worldComm || UPstream::master(communicator))
|
||||||
|
|||||||
@ -60,7 +60,7 @@ void Foam::UIPBstream::bufferIPCrecv()
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPBstream IPC read buffer :"
|
Perr<< "UOPBstream IPC read buffer :"
|
||||||
<< " root:" << fromProcNo_
|
<< " root:" << fromProcNo_
|
||||||
<< " comm:" << comm_
|
<< " comm:" << comm_
|
||||||
<< " probed size:" << label(bufSize)
|
<< " probed size:" << label(bufSize)
|
||||||
|
|||||||
@ -68,17 +68,17 @@ static std::streamsize UPstream_mpi_receive
|
|||||||
|
|
||||||
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : starting read from:" << fromProcNo
|
Perr<< "UIPstream::read : starting read from:" << fromProcNo
|
||||||
<< " size:" << label(bufSize)
|
<< " size:" << label(bufSize)
|
||||||
<< " tag:" << tag << " comm:" << communicator
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
else if (UPstream::debug)
|
else if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : starting read from:" << fromProcNo
|
Perr<< "UIPstream::read : starting read from:" << fromProcNo
|
||||||
<< " size:" << label(bufSize)
|
<< " size:" << label(bufSize)
|
||||||
<< " tag:" << tag << " comm:" << communicator
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
<< " commsType:" << UPstream::commsTypeNames[commsType]
|
||||||
@ -123,7 +123,7 @@ static std::streamsize UPstream_mpi_receive
|
|||||||
}
|
}
|
||||||
else if (UPstream::debug)
|
else if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : finished recv from:"
|
Perr<< "UIPstream::read : finished recv from:"
|
||||||
<< fromProcNo
|
<< fromProcNo
|
||||||
<< " size:" << label(bufSize) << " tag:" << tag
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
@ -198,7 +198,7 @@ static std::streamsize UPstream_mpi_receive
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::read : started non-blocking recv from:"
|
Perr<< "UIPstream::read : started non-blocking recv from:"
|
||||||
<< fromProcNo
|
<< fromProcNo
|
||||||
<< " size:" << label(bufSize) << " tag:" << tag
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< " request:" <<
|
<< " request:" <<
|
||||||
@ -225,7 +225,7 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
// Called by constructor
|
// Called by constructor
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream IPC read buffer :"
|
Perr<< "UIPstream IPC read buffer :"
|
||||||
<< " from:" << fromProcNo_
|
<< " from:" << fromProcNo_
|
||||||
<< " tag:" << tag_ << " comm:" << comm_
|
<< " tag:" << tag_ << " comm:" << comm_
|
||||||
<< " wanted size:" << recvBuf_.capacity()
|
<< " wanted size:" << recvBuf_.capacity()
|
||||||
@ -291,7 +291,7 @@ void Foam::UIPstream::bufferIPCrecv()
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UIPstream::UIPstream : probed size:"
|
Perr<< "UIPstream::UIPstream : probed size:"
|
||||||
<< label(count) << Foam::endl;
|
<< label(count) << Foam::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -74,17 +74,17 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && communicator != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : starting write to:" << toProcNo
|
Perr<< "UOPstream::write : starting write to:" << toProcNo
|
||||||
<< " size:" << label(bufSize)
|
<< " size:" << label(bufSize)
|
||||||
<< " tag:" << tag << " comm:" << communicator
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
<< " commType:" << UPstream::commsTypeNames[commsType]
|
<< " commType:" << UPstream::commsTypeNames[commsType]
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
else if (UPstream::debug)
|
else if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : starting write to:" << toProcNo
|
Perr<< "UOPstream::write : starting write to:" << toProcNo
|
||||||
<< " size:" << label(bufSize)
|
<< " size:" << label(bufSize)
|
||||||
<< " tag:" << tag << " comm:" << communicator
|
<< " tag:" << tag << " comm:" << communicator
|
||||||
<< " commType:" << UPstream::commsTypeNames[commsType]
|
<< " commType:" << UPstream::commsTypeNames[commsType]
|
||||||
@ -114,7 +114,7 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : finished buffered send to:"
|
Perr<< "UOPstream::write : finished buffered send to:"
|
||||||
<< toProcNo
|
<< toProcNo
|
||||||
<< " size:" << label(bufSize) << " tag:" << tag
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
@ -152,7 +152,7 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : finished send to:"
|
Perr<< "UOPstream::write : finished send to:"
|
||||||
<< toProcNo
|
<< toProcNo
|
||||||
<< " size:" << label(bufSize) << " tag:" << tag
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
@ -191,7 +191,7 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UOPstream::write : started non-blocking send to:"
|
Perr<< "UOPstream::write : started non-blocking send to:"
|
||||||
<< toProcNo
|
<< toProcNo
|
||||||
<< " size:" << label(bufSize) << " tag:" << tag
|
<< " size:" << label(bufSize) << " tag:" << tag
|
||||||
<< " request:" <<
|
<< " request:" <<
|
||||||
|
|||||||
@ -90,13 +90,13 @@ static void attachOurBuffers()
|
|||||||
|
|
||||||
if (Foam::UPstream::debug)
|
if (Foam::UPstream::debug)
|
||||||
{
|
{
|
||||||
Foam::Pout<< "UPstream::init : buffer-size " << len << '\n';
|
Foam::Perr<< "UPstream::init : buffer-size " << len << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete[] buf;
|
delete[] buf;
|
||||||
Foam::Pout<< "UPstream::init : could not attach buffer\n";
|
Foam::Perr<< "UPstream::init : could not attach buffer\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ bool Foam::UPstream::initNull()
|
|||||||
{
|
{
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::initNull : was already initialized\n";
|
Perr<< "UPstream::initNull : was already initialized\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -229,7 +229,7 @@ bool Foam::UPstream::init(int& argc, char**& argv, const bool needsThread)
|
|||||||
}
|
}
|
||||||
else if (UPstream::debug)
|
else if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::init : was already initialized\n";
|
Perr<< "UPstream::init : was already initialized\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -283,7 +283,7 @@ bool Foam::UPstream::init(int& argc, char**& argv, const bool needsThread)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::init :"
|
Perr<< "UPstream::init :"
|
||||||
<< " thread-support : requested:" << needsThread
|
<< " thread-support : requested:" << needsThread
|
||||||
<< " obtained:"
|
<< " obtained:"
|
||||||
<< (
|
<< (
|
||||||
@ -390,7 +390,7 @@ bool Foam::UPstream::init(int& argc, char**& argv, const bool needsThread)
|
|||||||
&subRank
|
&subRank
|
||||||
);
|
);
|
||||||
|
|
||||||
Pout<< "UPstream::init : in world:" << world
|
Perr<< "UPstream::init : in world:" << world
|
||||||
<< " using local communicator:" << subComm
|
<< " using local communicator:" << subComm
|
||||||
<< " rank " << subRank
|
<< " rank " << subRank
|
||||||
<< " of " << subNumProcs
|
<< " of " << subNumProcs
|
||||||
@ -436,7 +436,7 @@ void Foam::UPstream::shutdown(int errNo)
|
|||||||
}
|
}
|
||||||
else if (UPstream::debug && errNo == 0)
|
else if (UPstream::debug && errNo == 0)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::shutdown : was already finalized\n";
|
Perr<< "UPstream::shutdown : was already finalized\n";
|
||||||
}
|
}
|
||||||
ourMpi = false;
|
ourMpi = false;
|
||||||
return;
|
return;
|
||||||
@ -465,7 +465,7 @@ void Foam::UPstream::shutdown(int errNo)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::shutdown\n";
|
Perr<< "UPstream::shutdown\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for any outstanding requests
|
// Check for any outstanding requests
|
||||||
@ -691,7 +691,7 @@ void Foam::UPstream::freeCommunicatorComponents(const label index)
|
|||||||
{
|
{
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "freeCommunicatorComponents: " << index
|
Perr<< "freeCommunicatorComponents: " << index
|
||||||
<< " from " << PstreamGlobals::MPICommunicators_.size() << endl;
|
<< " from " << PstreamGlobals::MPICommunicators_.size() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,16 +49,16 @@ bool Foam::UPstream::broadcast
|
|||||||
|
|
||||||
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::broadcast : root:" << rootProcNo
|
Perr<< "UPstream::broadcast : root:" << rootProcNo
|
||||||
<< " comm:" << comm
|
<< " comm:" << comm
|
||||||
<< " size:" << label(bufSize)
|
<< " size:" << label(bufSize)
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
else if (UPstream::debug)
|
else if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::broadcast : root:" << rootProcNo
|
Perr<< "UPstream::broadcast : root:" << rootProcNo
|
||||||
<< " comm:" << comm
|
<< " comm:" << comm
|
||||||
<< " size:" << label(bufSize)
|
<< " size:" << label(bufSize)
|
||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
|
|||||||
@ -291,7 +291,7 @@ void Foam::UPstream::waitRequests(const label pos, label len)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::waitRequests : starting wait for "
|
Perr<< "UPstream::waitRequests : starting wait for "
|
||||||
<< count << " requests starting at " << pos << endl;
|
<< count << " requests starting at " << pos << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ void Foam::UPstream::waitRequests(const label pos, label len)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::waitRequests : finished wait." << endl;
|
Perr<< "UPstream::waitRequests : finished wait." << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ bool Foam::UPstream::waitAnyRequest(const label pos, label len)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::waitAnyRequest : starting wait for any of "
|
Perr<< "UPstream::waitAnyRequest : starting wait for any of "
|
||||||
<< count << " requests starting at " << pos << endl;
|
<< count << " requests starting at " << pos << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ bool Foam::UPstream::waitSomeRequests
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream:waitSomeRequest : starting wait for some of "
|
Perr<< "UPstream:waitSomeRequest : starting wait for some of "
|
||||||
<< count << " requests starting at " << pos << endl;
|
<< count << " requests starting at " << pos << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -563,7 +563,7 @@ bool Foam::UPstream::waitSomeRequests
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream:waitSomeRequest : starting wait for some of "
|
Perr<< "UPstream:waitSomeRequest : starting wait for some of "
|
||||||
<< requests.size() << " requests" << endl;
|
<< requests.size() << " requests" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -753,7 +753,7 @@ void Foam::UPstream::waitRequest(const label i)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::waitRequest : starting wait for request:"
|
Perr<< "UPstream::waitRequest : starting wait for request:"
|
||||||
<< i << endl;
|
<< i << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -771,7 +771,7 @@ void Foam::UPstream::waitRequest(const label i)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::waitRequest : finished wait for request:"
|
Perr<< "UPstream::waitRequest : finished wait for request:"
|
||||||
<< i << endl;
|
<< i << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -823,7 +823,7 @@ bool Foam::UPstream::finishedRequest(const label i)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::finishedRequest : check request:"
|
Perr<< "UPstream::finishedRequest : check request:"
|
||||||
<< i << endl;
|
<< i << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -898,7 +898,7 @@ bool Foam::UPstream::finishedRequests(const label pos, label len)
|
|||||||
|
|
||||||
if (UPstream::debug)
|
if (UPstream::debug)
|
||||||
{
|
{
|
||||||
Pout<< "UPstream::finishedRequests : check " << count
|
Perr<< "UPstream::finishedRequests : check " << count
|
||||||
<< " requests starting at " << pos << endl;
|
<< " requests starting at " << pos << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -80,18 +80,18 @@ void Foam::PstreamDetail::reduce0
|
|||||||
|
|
||||||
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Reduce (blocking):";
|
Perr<< "** MPI_Reduce (blocking):";
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
{
|
{
|
||||||
Pout<< (*values);
|
Perr<< (*values);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< UList<Type>(values, count);
|
Perr<< UList<Type>(values, count);
|
||||||
}
|
}
|
||||||
Pout<< " with comm:" << comm
|
Perr<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm << endl;
|
<< " warnComm:" << UPstream::warnComm << endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
profilingPstream::beginTiming();
|
profilingPstream::beginTiming();
|
||||||
@ -138,23 +138,23 @@ void Foam::PstreamDetail::allReduce
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Iallreduce (non-blocking):";
|
Perr<< "** MPI_Iallreduce (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Allreduce (blocking):";
|
Perr<< "** MPI_Allreduce (blocking):";
|
||||||
}
|
}
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
{
|
{
|
||||||
Pout<< (*values);
|
Perr<< (*values);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< UList<Type>(values, count);
|
Perr<< UList<Type>(values, count);
|
||||||
}
|
}
|
||||||
Pout<< " with comm:" << comm
|
Perr<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm << endl;
|
<< " warnComm:" << UPstream::warnComm << endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -245,18 +245,18 @@ void Foam::PstreamDetail::allToAll
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Ialltoall (non-blocking):";
|
Perr<< "** MPI_Ialltoall (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Alltoall (blocking):";
|
Perr<< "** MPI_Alltoall (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " numProc:" << numProc
|
Perr<< " numProc:" << numProc
|
||||||
<< " sendData:" << sendData.size()
|
<< " sendData:" << sendData.size()
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if
|
||||||
@ -376,18 +376,18 @@ void Foam::PstreamDetail::allToAllv
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Ialltoallv (non-blocking):";
|
Perr<< "** MPI_Ialltoallv (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Alltoallv (blocking):";
|
Perr<< "** MPI_Alltoallv (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " sendCounts:" << sendCounts
|
Perr<< " sendCounts:" << sendCounts
|
||||||
<< " sendOffsets:" << sendOffsets
|
<< " sendOffsets:" << sendOffsets
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if
|
||||||
@ -515,13 +515,13 @@ void Foam::PstreamDetail::allToAllConsensus
|
|||||||
|
|
||||||
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "** non-blocking consensus Alltoall (list):";
|
Perr<< "** non-blocking consensus Alltoall (list):";
|
||||||
Pout<< " numProc:" << numProc
|
Perr<< " numProc:" << numProc
|
||||||
<< " sendData:" << sendData.size()
|
<< " sendData:" << sendData.size()
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sendData.size() != numProc || recvData.size() != numProc)
|
if (sendData.size() != numProc || recvData.size() != numProc)
|
||||||
@ -717,13 +717,13 @@ void Foam::PstreamDetail::allToAllConsensus
|
|||||||
|
|
||||||
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
if (UPstream::warnComm >= 0 && comm != UPstream::warnComm)
|
||||||
{
|
{
|
||||||
Pout<< "** non-blocking consensus Alltoall (map):";
|
Perr<< "** non-blocking consensus Alltoall (map):";
|
||||||
Pout<< " numProc:" << numProc
|
Perr<< " numProc:" << numProc
|
||||||
<< " sendData:" << sendBufs.size()
|
<< " sendData:" << sendBufs.size()
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial: clear out everything
|
// Initial: clear out everything
|
||||||
@ -917,18 +917,18 @@ void Foam::PstreamDetail::gather
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Igather (non-blocking):";
|
Perr<< "** MPI_Igather (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Gather (blocking):";
|
Perr<< "** MPI_Gather (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " numProc:" << numProc
|
Perr<< " numProc:" << numProc
|
||||||
<< " count:" << count
|
<< " count:" << count
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1024,18 +1024,18 @@ void Foam::PstreamDetail::scatter
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Iscatter (non-blocking):";
|
Perr<< "** MPI_Iscatter (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Scatter (blocking):";
|
Perr<< "** MPI_Scatter (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " numProc:" << numProc
|
Perr<< " numProc:" << numProc
|
||||||
<< " count:" << count
|
<< " count:" << count
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1132,19 +1132,19 @@ void Foam::PstreamDetail::gatherv
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Igatherv (non-blocking):";
|
Perr<< "** MPI_Igatherv (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Gatherv (blocking):";
|
Perr<< "** MPI_Gatherv (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " np:" << np
|
Perr<< " np:" << np
|
||||||
<< " recvCounts:" << recvCounts
|
<< " recvCounts:" << recvCounts
|
||||||
<< " recvOffsets:" << recvOffsets
|
<< " recvOffsets:" << recvOffsets
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if
|
||||||
@ -1274,19 +1274,19 @@ void Foam::PstreamDetail::scatterv
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Iscatterv (non-blocking):";
|
Perr<< "** MPI_Iscatterv (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Scatterv (blocking):";
|
Perr<< "** MPI_Scatterv (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " np:" << np
|
Perr<< " np:" << np
|
||||||
<< " sendCounts:" << sendCounts
|
<< " sendCounts:" << sendCounts
|
||||||
<< " sendOffsets:" << sendOffsets
|
<< " sendOffsets:" << sendOffsets
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if
|
||||||
@ -1400,17 +1400,17 @@ void Foam::PstreamDetail::allGather
|
|||||||
{
|
{
|
||||||
if (immediate)
|
if (immediate)
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Iallgather (non-blocking):";
|
Perr<< "** MPI_Iallgather (non-blocking):";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< "** MPI_Allgather (blocking):";
|
Perr<< "** MPI_Allgather (blocking):";
|
||||||
}
|
}
|
||||||
Pout<< " numProc:" << UPstream::nProcs(comm)
|
Perr<< " numProc:" << UPstream::nProcs(comm)
|
||||||
<< " with comm:" << comm
|
<< " with comm:" << comm
|
||||||
<< " warnComm:" << UPstream::warnComm
|
<< " warnComm:" << UPstream::warnComm
|
||||||
<< endl;
|
<< endl;
|
||||||
error::printStack(Pout);
|
error::printStack(Perr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user