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
|
case "$WM_MPLIB" in
|
||||||
LAM | OPENMPI | MPI | MPICH | MPICH-GM | MPIGAMMA )
|
LAM | OPENMPI | MPI | MPICH | MPICH-GM | MPIGAMMA )
|
||||||
export WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
|
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
|
wmake libso mpi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@ -32,12 +32,9 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
IPstream::IPstream
|
Foam::IPstream::IPstream
|
||||||
(
|
(
|
||||||
const commsTypes commsType,
|
const commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -53,13 +50,12 @@ IPstream::IPstream
|
|||||||
{
|
{
|
||||||
notImplemented
|
notImplemented
|
||||||
(
|
(
|
||||||
"IPstream::IPstream"
|
"IPsream::IPstream"
|
||||||
"("
|
"("
|
||||||
"const commsTypes commsType,"
|
"const commsTypes,"
|
||||||
"const int fromProcNo,"
|
"const int fromProcNo,"
|
||||||
"const label bufSize,"
|
"const label bufSize,"
|
||||||
"streamFormat format,"
|
"streamFormat, versionNumber"
|
||||||
"versionNumber version"
|
|
||||||
")"
|
")"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -67,7 +63,7 @@ IPstream::IPstream
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
int IPstream::read
|
int Foam::IPstream::read
|
||||||
(
|
(
|
||||||
const commsTypes commsType,
|
const commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -75,33 +71,32 @@ int IPstream::read
|
|||||||
const std::streamsize bufSize
|
const std::streamsize bufSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
notImplemented
|
notImplemented
|
||||||
(
|
(
|
||||||
"IPstream::read"
|
"IPstream::read"
|
||||||
"("
|
"("
|
||||||
"const commsTypes commsType,"
|
"const commsTypes,"
|
||||||
"const int fromProcNo,"
|
"const int fromProcNo,"
|
||||||
"char* buf,"
|
"char* buf,"
|
||||||
"const label bufSize"
|
"const label bufSize"
|
||||||
")"
|
")"
|
||||||
);
|
);
|
||||||
|
|
||||||
return 0;
|
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 * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
OPstream::~OPstream()
|
Foam::OPstream::~OPstream()
|
||||||
{
|
{
|
||||||
notImplemented("OPstream::~OPstream()");
|
notImplemented("OPstream::~OPstream()");
|
||||||
}
|
}
|
||||||
@ -45,7 +42,7 @@ OPstream::~OPstream()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool OPstream::write
|
bool Foam::OPstream::write
|
||||||
(
|
(
|
||||||
const commsTypes commsType,
|
const commsTypes commsType,
|
||||||
const int toProcNo,
|
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()");
|
notImplemented("OPstream::finishedRequest()");
|
||||||
return false;
|
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)")
|
FatalErrorIn("Pstream::init(int& argc, char**& argv)")
|
||||||
<< "Trying to use the dummy Pstream library." << nl
|
<< "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)");
|
notImplemented("Pstream::exit(int errnum)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Pstream::abort()
|
void Foam::Pstream::abort()
|
||||||
{
|
{
|
||||||
notImplemented("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
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
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
|
// 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
|
// buffer on the receiving end. Done so we only send out resize messages
|
||||||
// if nessecary
|
// if necessary
|
||||||
|
//! @cond fileScope
|
||||||
labelList maxSendSize;
|
labelList maxSendSize;
|
||||||
|
//! @endcond fileScope
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -26,7 +26,8 @@ Namespace
|
|||||||
Foam::PstreamGlobals
|
Foam::PstreamGlobals
|
||||||
|
|
||||||
Description
|
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
|
SourceFiles
|
||||||
PstreamGlobals.C
|
PstreamGlobals.C
|
||||||
|
|||||||
@ -33,18 +33,16 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Outstanding non-blocking operations.
|
// Outstanding non-blocking operations.
|
||||||
DynamicList<MPI_Request> IPstream_outstandingRequests_;
|
//! @cond fileScope
|
||||||
|
Foam::DynamicList<MPI_Request> IPstream_outstandingRequests_;
|
||||||
|
//! @endcond fileScope
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
IPstream::IPstream
|
Foam::IPstream::IPstream
|
||||||
(
|
(
|
||||||
const commsTypes commsType,
|
const commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -89,7 +87,7 @@ IPstream::IPstream
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
label IPstream::read
|
Foam::label Foam::IPstream::read
|
||||||
(
|
(
|
||||||
const commsTypes commsType,
|
const commsTypes commsType,
|
||||||
const int fromProcNo,
|
const int fromProcNo,
|
||||||
@ -192,7 +190,7 @@ label IPstream::read
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void IPstream::waitRequests()
|
void Foam::IPstream::waitRequests()
|
||||||
{
|
{
|
||||||
if (IPstream_outstandingRequests_.size() > 0)
|
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())
|
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"
|
#include "OPstream.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Outstanding non-blocking operations.
|
// Outstanding non-blocking operations.
|
||||||
DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
//! @cond fileScope
|
||||||
|
Foam::DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
||||||
|
//! @endcond fileScope
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
OPstream::~OPstream()
|
Foam::OPstream::~OPstream()
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -66,7 +62,7 @@ OPstream::~OPstream()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool OPstream::write
|
bool Foam::OPstream::write
|
||||||
(
|
(
|
||||||
const commsTypes commsType,
|
const commsTypes commsType,
|
||||||
const int toProcNo,
|
const int toProcNo,
|
||||||
@ -80,7 +76,7 @@ bool OPstream::write
|
|||||||
{
|
{
|
||||||
transferFailed = MPI_Bsend
|
transferFailed = MPI_Bsend
|
||||||
(
|
(
|
||||||
(char*)buf,
|
const_cast<char*>(buf),
|
||||||
bufSize,
|
bufSize,
|
||||||
MPI_PACKED,
|
MPI_PACKED,
|
||||||
procID(toProcNo),
|
procID(toProcNo),
|
||||||
@ -92,7 +88,7 @@ bool OPstream::write
|
|||||||
{
|
{
|
||||||
transferFailed = MPI_Send
|
transferFailed = MPI_Send
|
||||||
(
|
(
|
||||||
(char*)buf,
|
const_cast<char*>(buf),
|
||||||
bufSize,
|
bufSize,
|
||||||
MPI_PACKED,
|
MPI_PACKED,
|
||||||
procID(toProcNo),
|
procID(toProcNo),
|
||||||
@ -106,7 +102,7 @@ bool OPstream::write
|
|||||||
|
|
||||||
transferFailed = MPI_Isend
|
transferFailed = MPI_Isend
|
||||||
(
|
(
|
||||||
(char*)buf,
|
const_cast<char*>(buf),
|
||||||
bufSize,
|
bufSize,
|
||||||
MPI_PACKED,
|
MPI_PACKED,
|
||||||
procID(toProcNo),
|
procID(toProcNo),
|
||||||
@ -132,7 +128,7 @@ bool OPstream::write
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OPstream::waitRequests()
|
void Foam::OPstream::waitRequests()
|
||||||
{
|
{
|
||||||
if (OPstream_outstandingRequests_.size() > 0)
|
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())
|
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("np", "");
|
||||||
validParOptions.insert("p4pg", "PI file");
|
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);
|
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
|
# ifndef SGIMPI
|
||||||
int size;
|
int size;
|
||||||
@ -140,13 +142,13 @@ void Pstream::exit(int errnum)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Pstream::abort()
|
void Foam::Pstream::abort()
|
||||||
{
|
{
|
||||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
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())
|
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