UPstream.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2018 OpenFOAM Foundation
9 Copyright (C) 2016-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "Pstream.H"
30
31// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32
34{}
35
36
38{
40 << "The dummy Pstream library cannot be used in parallel mode"
41 << endl;
42
43 return false;
44}
45
46
47bool Foam::UPstream::init(int& argc, char**& argv, const bool needsThread)
48{
50 << "The dummy Pstream library cannot be used in parallel mode"
51 << endl
53
54 return false;
55}
56
57
59{}
60
61
62void Foam::UPstream::exit(int errNo)
63{
64 // No MPI - just exit
65 std::exit(errNo);
66}
67
68
70{
71 // No MPI - just abort
72 std::abort();
73}
74
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78void Foam::UPstream::allocatePstreamCommunicator
79(
80 const label,
81 const label
82)
83{}
84
85
86void Foam::UPstream::freePstreamCommunicator(const label)
87{}
88
89
91{
92 return 0;
93}
94
95
97{}
98
99
100void Foam::UPstream::waitRequests(const label start)
101{}
102
103
105{}
106
107
109{
111 return false;
112}
113
114
115// ************************************************************************* //
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
void exit()
Job end with "exit" termination.
Definition: JobInfo.C:234
static bool initNull()
Special purpose initialisation function.
Definition: UPstream.C:37
static label nRequests()
Get number of outstanding requests.
Definition: UPstream.C:90
static void addValidParOptions(HashTable< string > &validParOptions)
Definition: UPstream.C:33
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
Definition: UPstream.C:100
static void resetRequests(const label sz)
Truncate number of outstanding requests.
Definition: UPstream.C:96
static void abort()
Call MPI_Abort with no other checks or cleanup.
Definition: UPstream.C:69
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished?
Definition: UPstream.C:108
static void waitRequest(const label i)
Wait until request i has finished.
Definition: UPstream.C:104
void shutdown() const
Generate status=done in lock (only when run-state = master)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
error FatalError
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130