00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
#ifndef SPMD_H
00039
#define SPMD_H
00040
00041
#include "REAL.H"
00042
#include "Vector.H"
00043
#include "Box.H"
00044
#include "MayDay.H"
00045
#include "RealVect.H"
00046
class IntVectSet;
00047
00048
00050
00054
int procID();
00055
00057
00060
unsigned int numProc();
00061
00062
00063
template <
class T>
00064
int linearSize(
const T& inputT);
00065
00066
template <
class T>
00067
void linearIn(T& a_outputT,
const void*
const inBuf);
00068
00069
template <
class T>
00070
void linearOut(
void*
const a_outBuf,
const T& inputT);
00071
00072
#ifdef CH_MPI
00073
00074
00088
template <
class T>
00089
void gather(
Vector<T>& a_outVec,
const T& a_input,
int a_dest);
00090
00091
00092
00093
00094
00095
00096
00097
#endif
00098
00100
00109
template <
class T>
00110
void broadcast(T& a_inAndOut,
int a_src);
00111
00112
00113
template < >
00114
int linearSize(
const int& a_input);
00115
00116
00117
template < >
00118
void linearIn(
int& a_outputT,
const void*
const inBuf);
00119
00120
00121
template < >
00122
void linearOut(
void*
const a_outBuf,
const int& a_inputT);
00123
00124
00125
template < >
00126
int linearSize(
const Real& a_input);
00127
00128
00129
template < >
00130
void linearIn(
Real& a_outputT,
const void*
const a_inBuf);
00131
00132
00133
template < >
00134
void linearOut(
void*
const a_outBuf,
const Real& a_inputT);
00135
00136
00137
template < >
00138
int linearSize(
const Box& a_input);
00139
00140
00141
template < >
00142
void linearIn(
Box& a_outputT,
const void*
const a_inBuf);
00143
00144
00145
template < >
00146
void linearOut(
void*
const a_outBuf,
const Box& a_inputT);
00147
00148
00149
template < >
00150
int linearSize(
const Vector<int>& a_input);
00151
template < >
00152
void linearIn(
Vector<int>& a_outputT,
const void*
const inBuf);
00153
template < >
00154
void linearOut(
void*
const a_outBuf,
const Vector<int>& a_inputT);
00155
00156
00157
template < >
00158
int linearSize(
const Vector<Real>& a_input);
00159
template < >
00160
void linearIn(
Vector<Real>& a_outputT,
const void*
const inBuf);
00161
template < >
00162
void linearOut(
void*
const a_outBuf,
const Vector<Real>& a_inputT);
00163
00164
00165
template < >
00166
int linearSize(
const Vector<Box>& a_input);
00167
template < >
00168
void linearIn(
Vector<Box>& a_outputT,
const void*
const inBuf);
00169
template < >
00170
void linearOut(
void*
const a_outBuf,
const Vector<Box>& a_inputT);
00171
00172
00173
template < >
00174
int linearSize(
const Vector<
Vector<Box> >& a_input);
00175
template < >
00176
void linearIn(
Vector<
Vector<Box> >& a_outputT,
const void*
const inBuf);
00177
template < >
00178
void linearOut(
void*
const a_outBuf,
const Vector<
Vector<Box> >& a_inputT);
00179
00180
00181
template < >
00182
int linearSize(
const RealVect& vindex);
00183
00184
00185
template < >
00186
void linearIn(
RealVect& a_outputT,
const void*
const inBuf);
00187
00188
00189
template < >
00190
void linearOut(
void*
const a_outBuf,
const RealVect& a_inputT);
00191
00192
00193
00194
template < >
00195
int linearSize(
const Vector<
Vector<int> >& a_input);
00196
template < >
00197
void linearIn(
Vector<
Vector<int> >& a_outputT,
const void*
const inBuf);
00198
template < >
00199
void linearOut(
void*
const a_outBuf,
const Vector<
Vector<int> >& a_inputT);
00200
00201
00202
00203
template <
class T>
00204
int linearListSize(
const Vector<T>& a_input);
00205
00206
00207
template <
class T>
00208
void linearListIn(
Vector<T>& a_outputT,
const void*
const a_inBuf);
00209
00210
00211
template <
class T>
00212
void linearListOut(
void*
const a_outBuf,
const Vector<T>& a_inputT);
00213
00214 class SerialTask
00215 {
00216
public:
00217 enum task {
compute=0 };
00218 };
00219
00220
00221
int
00222
uniqueProc(
const SerialTask::task& a_task);
00223
00224
#ifdef CH_MPI
00225
#include <mpi.h>
00226
struct Chombo_MPI{
static MPI_Comm comm;};
00227
void setChomboMPIErrorHandler();
00228
00229
#else
00230
00231
extern int num_procs ;
00232
#endif
00233
00234
#include "SPMDI.H"
00235
00236
#endif // SPMD.H
00237