mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Pstream : avoid compiler warnings, doxygen ignore file-scope variables
This commit is contained in:
@ -6,6 +6,10 @@ wmake libso dummy
|
||||
case "$WM_MPLIB" in
|
||||
LAM | OPENMPI | MPI | MPICH | MPICH-GM | MPIGAMMA )
|
||||
export WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
|
||||
set +x
|
||||
echo
|
||||
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
|
||||
set -x
|
||||
wmake libso mpi
|
||||
;;
|
||||
|
||||
|
||||
@ -32,12 +32,9 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||
|
||||
IPstream::IPstream
|
||||
Foam::IPstream::IPstream
|
||||
(
|
||||
const commsTypes commsType,
|
||||
const int fromProcNo,
|
||||
@ -53,13 +50,12 @@ IPstream::IPstream
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"IPstream::IPstream"
|
||||
"IPsream::IPstream"
|
||||
"("
|
||||
"const commsTypes commsType,"
|
||||
"const int fromProcNo,"
|
||||
"const commsTypes,"
|
||||
"const int fromProcNo,"
|
||||
"const label bufSize,"
|
||||
"streamFormat format,"
|
||||
"versionNumber version"
|
||||
"streamFormat, versionNumber"
|
||||
")"
|
||||
);
|
||||
}
|
||||
@ -67,7 +63,7 @@ IPstream::IPstream
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
int IPstream::read
|
||||
int Foam::IPstream::read
|
||||
(
|
||||
const commsTypes commsType,
|
||||
const int fromProcNo,
|
||||
@ -75,33 +71,32 @@ int IPstream::read
|
||||
const std::streamsize bufSize
|
||||
)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"IPstream::read"
|
||||
"("
|
||||
"const commsTypes commsType,"
|
||||
"const int fromProcNo,"
|
||||
"char* buf,"
|
||||
"const label bufSize"
|
||||
")"
|
||||
notImplemented
|
||||
(
|
||||
"IPstream::read"
|
||||
"("
|
||||
"const commsTypes,"
|
||||
"const int fromProcNo,"
|
||||
"char* buf,"
|
||||
"const label bufSize"
|
||||
")"
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void IPstream::waitRequests()
|
||||
void Foam::IPstream::waitRequests()
|
||||
{}
|
||||
|
||||
|
||||
bool IPstream::finishedRequest(const label)
|
||||
bool Foam::IPstream::finishedRequest(const label)
|
||||
{
|
||||
notImplemented("IPstream::finishedRequest()");
|
||||
notImplemented("IPstream::finishedRequest()");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -32,12 +32,9 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
OPstream::~OPstream()
|
||||
Foam::OPstream::~OPstream()
|
||||
{
|
||||
notImplemented("OPstream::~OPstream()");
|
||||
}
|
||||
@ -45,7 +42,7 @@ OPstream::~OPstream()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool OPstream::write
|
||||
bool Foam::OPstream::write
|
||||
(
|
||||
const commsTypes commsType,
|
||||
const int toProcNo,
|
||||
@ -68,11 +65,11 @@ bool OPstream::write
|
||||
}
|
||||
|
||||
|
||||
void OPstream::waitRequests()
|
||||
void Foam::OPstream::waitRequests()
|
||||
{}
|
||||
|
||||
|
||||
bool OPstream::finishedRequest(const label)
|
||||
bool Foam::OPstream::finishedRequest(const label)
|
||||
{
|
||||
notImplemented("OPstream::finishedRequest()");
|
||||
return false;
|
||||
@ -81,6 +78,4 @@ bool OPstream::finishedRequest(const label)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -29,16 +29,13 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void Pstream::addValidParOptions(HashTable<string>& validParOptions)
|
||||
void Foam::Pstream::addValidParOptions(HashTable<string>& validParOptions)
|
||||
{}
|
||||
|
||||
|
||||
bool Pstream::init(int& argc, char**& argv)
|
||||
bool Foam::Pstream::init(int& argc, char**& argv)
|
||||
{
|
||||
FatalErrorIn("Pstream::init(int& argc, char**& argv)")
|
||||
<< "Trying to use the dummy Pstream library." << nl
|
||||
@ -49,24 +46,21 @@ bool Pstream::init(int& argc, char**& argv)
|
||||
}
|
||||
|
||||
|
||||
void Pstream::exit(int errnum)
|
||||
void Foam::Pstream::exit(int errnum)
|
||||
{
|
||||
notImplemented("Pstream::exit(int errnum)");
|
||||
}
|
||||
|
||||
|
||||
void Pstream::abort()
|
||||
void Foam::Pstream::abort()
|
||||
{
|
||||
notImplemented("Pstream::abort()");
|
||||
}
|
||||
|
||||
|
||||
void reduce(scalar&, const sumOp<scalar>&)
|
||||
void Foam::reduce(scalar&, const sumOp<scalar>&)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Write primitive and binary block from OPstream
|
||||
Write primitive and binary block from OPstream gamma-mpi
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -46,8 +46,10 @@ namespace Foam
|
||||
|
||||
// Largest message sent so far. This tracks the size of the receive
|
||||
// buffer on the receiving end. Done so we only send out resize messages
|
||||
// if nessecary
|
||||
// if necessary
|
||||
//! @cond fileScope
|
||||
labelList maxSendSize;
|
||||
//! @endcond fileScope
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -26,7 +26,8 @@ Namespace
|
||||
Foam::PstreamGlobals
|
||||
|
||||
Description
|
||||
Global functions and variables for working with parallel streams.
|
||||
Global functions and variables for working with parallel streams,
|
||||
but principally for gamma/mpi
|
||||
|
||||
SourceFiles
|
||||
PstreamGlobals.C
|
||||
|
||||
@ -33,18 +33,16 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
// Outstanding non-blocking operations.
|
||||
DynamicList<MPI_Request> IPstream_outstandingRequests_;
|
||||
|
||||
//! @cond fileScope
|
||||
Foam::DynamicList<MPI_Request> IPstream_outstandingRequests_;
|
||||
//! @endcond fileScope
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||
|
||||
IPstream::IPstream
|
||||
Foam::IPstream::IPstream
|
||||
(
|
||||
const commsTypes commsType,
|
||||
const int fromProcNo,
|
||||
@ -89,7 +87,7 @@ IPstream::IPstream
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
label IPstream::read
|
||||
Foam::label Foam::IPstream::read
|
||||
(
|
||||
const commsTypes commsType,
|
||||
const int fromProcNo,
|
||||
@ -192,7 +190,7 @@ label IPstream::read
|
||||
}
|
||||
|
||||
|
||||
void IPstream::waitRequests()
|
||||
void Foam::IPstream::waitRequests()
|
||||
{
|
||||
if (IPstream_outstandingRequests_.size() > 0)
|
||||
{
|
||||
@ -219,7 +217,7 @@ void IPstream::waitRequests()
|
||||
}
|
||||
|
||||
|
||||
bool IPstream::finishedRequest(const label i)
|
||||
bool Foam::IPstream::finishedRequest(const label i)
|
||||
{
|
||||
if (i >= IPstream_outstandingRequests_.size())
|
||||
{
|
||||
@ -244,6 +242,4 @@ bool IPstream::finishedRequest(const label i)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -31,20 +31,16 @@ Description
|
||||
|
||||
#include "OPstream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
// Outstanding non-blocking operations.
|
||||
DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
||||
|
||||
//! @cond fileScope
|
||||
Foam::DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
||||
//! @endcond fileScope
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
OPstream::~OPstream()
|
||||
Foam::OPstream::~OPstream()
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -66,7 +62,7 @@ OPstream::~OPstream()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool OPstream::write
|
||||
bool Foam::OPstream::write
|
||||
(
|
||||
const commsTypes commsType,
|
||||
const int toProcNo,
|
||||
@ -80,7 +76,7 @@ bool OPstream::write
|
||||
{
|
||||
transferFailed = MPI_Bsend
|
||||
(
|
||||
(char*)buf,
|
||||
const_cast<char*>(buf),
|
||||
bufSize,
|
||||
MPI_PACKED,
|
||||
procID(toProcNo),
|
||||
@ -92,7 +88,7 @@ bool OPstream::write
|
||||
{
|
||||
transferFailed = MPI_Send
|
||||
(
|
||||
(char*)buf,
|
||||
const_cast<char*>(buf),
|
||||
bufSize,
|
||||
MPI_PACKED,
|
||||
procID(toProcNo),
|
||||
@ -106,7 +102,7 @@ bool OPstream::write
|
||||
|
||||
transferFailed = MPI_Isend
|
||||
(
|
||||
(char*)buf,
|
||||
const_cast<char*>(buf),
|
||||
bufSize,
|
||||
MPI_PACKED,
|
||||
procID(toProcNo),
|
||||
@ -132,7 +128,7 @@ bool OPstream::write
|
||||
}
|
||||
|
||||
|
||||
void OPstream::waitRequests()
|
||||
void Foam::OPstream::waitRequests()
|
||||
{
|
||||
if (OPstream_outstandingRequests_.size() > 0)
|
||||
{
|
||||
@ -159,7 +155,7 @@ void OPstream::waitRequests()
|
||||
}
|
||||
|
||||
|
||||
bool OPstream::finishedRequest(const label i)
|
||||
bool Foam::OPstream::finishedRequest(const label i)
|
||||
{
|
||||
if (i >= OPstream_outstandingRequests_.size())
|
||||
{
|
||||
@ -184,6 +180,4 @@ bool OPstream::finishedRequest(const label i)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -42,12 +42,14 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void Pstream::addValidParOptions(HashTable<string>& validParOptions)
|
||||
// NOTE:
|
||||
// valid parallel options vary between implementations, but flag common ones.
|
||||
// if they are not removed by MPI_Init(), the subsequent argument processing
|
||||
// will notice that they are wrong
|
||||
void Foam::Pstream::addValidParOptions(HashTable<string>& validParOptions)
|
||||
{
|
||||
validParOptions.insert("np", "");
|
||||
validParOptions.insert("p4pg", "PI file");
|
||||
@ -59,7 +61,7 @@ void Pstream::addValidParOptions(HashTable<string>& validParOptions)
|
||||
}
|
||||
|
||||
|
||||
bool Pstream::init(int& argc, char**& argv)
|
||||
bool Foam::Pstream::init(int& argc, char**& argv)
|
||||
{
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
@ -119,7 +121,7 @@ bool Pstream::init(int& argc, char**& argv)
|
||||
}
|
||||
|
||||
|
||||
void Pstream::exit(int errnum)
|
||||
void Foam::Pstream::exit(int errnum)
|
||||
{
|
||||
# ifndef SGIMPI
|
||||
int size;
|
||||
@ -140,13 +142,13 @@ void Pstream::exit(int errnum)
|
||||
}
|
||||
|
||||
|
||||
void Pstream::abort()
|
||||
void Foam::Pstream::abort()
|
||||
{
|
||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||
}
|
||||
|
||||
|
||||
void reduce(scalar& Value, const sumOp<scalar>& bop)
|
||||
void Foam::reduce(scalar& Value, const sumOp<scalar>& bop)
|
||||
{
|
||||
if (!Pstream::parRun())
|
||||
{
|
||||
@ -426,6 +428,4 @@ void reduce(scalar& Value, const sumOp<scalar>& bop)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user