Project

General

Profile

Statistics
| Branch: | Revision:

root / src / sim / parsim / cmpicommbuffer.cc @ e1750c09

History | View | Annotate | Download (17.1 KB)

1 01873262 Georg Kunz
//=========================================================================
2
//  CMPICOMMBUFFER.CC - part of
3
//
4
//                  OMNeT++/OMNEST
5
//           Discrete System Simulation in C++
6
//
7
//  Author: Andras Varga, 2003
8
//          Dept. of Electrical and Computer Systems Engineering,
9
//          Monash University, Melbourne, Australia
10
//
11
//=========================================================================
12
13
/*--------------------------------------------------------------*
14
  Copyright (C) 2003-2008 Andras Varga
15
  Copyright (C) 2006-2008 OpenSim Ltd.
16

17
  This file is distributed WITHOUT ANY WARRANTY. See the file
18
  `license' for details on this and other legal matters.
19
*--------------------------------------------------------------*/
20
21
#ifdef WITH_MPI
22
23
#include <string.h>
24
#include <mpi.h>
25
#include "cmpicommbuffer.h"
26
#include "globals.h"
27
#include "regmacros.h"
28
29
USING_NAMESPACE
30
31
Register_Class(cMPICommBuffer);
32
33
34
cMPICommBuffer::cMPICommBuffer()
35
{
36
}
37
38
cMPICommBuffer::~cMPICommBuffer()
39
{
40
}
41
42
void cMPICommBuffer::pack(char d)
43
{
44
    extendBufferFor(sizeof(char));
45
    if (MPI_Pack(&d, 1, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
46
        throw cRuntimeError("cMPICommBuffer::pack(char): MPI_Pack() returned error");
47
}
48
49
void cMPICommBuffer::pack(unsigned char d)
50
{
51
    extendBufferFor(sizeof(unsigned char));
52
    if (MPI_Pack(&d, 1, MPI_UNSIGNED_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
53
        throw cRuntimeError("cMPICommBuffer::pack(unsigned char): MPI_Pack() returned error");
54
}
55
56
void cMPICommBuffer::pack(bool d)
57
{
58
    extendBufferFor(sizeof(char));
59
    if (MPI_Pack(&d, 1, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
60
        throw cRuntimeError("cMPICommBuffer::pack(bool): MPI_Pack() returned error");
61
}
62
63
void cMPICommBuffer::pack(short d)
64
{
65
    extendBufferFor(sizeof(short));
66
    if (MPI_Pack(&d, 1, MPI_SHORT, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
67
        throw cRuntimeError("cMPICommBuffer::pack(short): MPI_Pack() returned error");
68
}
69
70
void cMPICommBuffer::pack(unsigned short d)
71
{
72
    extendBufferFor(sizeof(unsigned short));
73
    if (MPI_Pack(&d, 1, MPI_UNSIGNED_SHORT, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
74
        throw cRuntimeError("cMPICommBuffer::pack(unsigned short): MPI_Pack() returned error");
75
}
76
77
void cMPICommBuffer::pack(int d)
78
{
79
    extendBufferFor(sizeof(int));
80
    if (MPI_Pack(&d, 1, MPI_INT, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
81
        throw cRuntimeError("cMPICommBuffer::pack(int): MPI_Pack() returned error");
82
}
83
84
void cMPICommBuffer::pack(unsigned int d)
85
{
86
    extendBufferFor(sizeof(unsigned));
87
    if (MPI_Pack(&d, 1, MPI_UNSIGNED, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
88
        throw cRuntimeError("cMPICommBuffer::pack(unsigned int): MPI_Pack() returned error");
89
}
90
91
void cMPICommBuffer::pack(long d)
92
{
93
    extendBufferFor(sizeof(long));
94
    if (MPI_Pack(&d, 1, MPI_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
95
        throw cRuntimeError("cMPICommBuffer::pack(long): MPI_Pack() returned error");
96
}
97
98
void cMPICommBuffer::pack(unsigned long d)
99
{
100
    extendBufferFor(sizeof(unsigned long));
101
    if (MPI_Pack(&d, 1, MPI_UNSIGNED_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
102
        throw cRuntimeError("cMPICommBuffer::pack(unsigned long): MPI_Pack() returned error");
103
}
104
105
void cMPICommBuffer::pack(opp_long_long d)
106
{
107
    extendBufferFor(sizeof(opp_long_long));
108
    if (MPI_Pack(&d, 1, MPI_LONG_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
109
        throw cRuntimeError("cMPICommBuffer::pack(opp_long_long): MPI_Pack() returned error");
110
}
111
112
void cMPICommBuffer::pack(opp_unsigned_long_long d)
113
{
114
    extendBufferFor(sizeof(opp_unsigned_long_long));
115
    if (MPI_Pack(&d, 1, MPI_UNSIGNED_LONG_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
116
        throw cRuntimeError("cMPICommBuffer::pack(opp_unsigned_long_long): MPI_Pack() returned error");
117
}
118
119
void cMPICommBuffer::pack(float d)
120
{
121
    extendBufferFor(sizeof(float));
122
    if (MPI_Pack(&d, 1, MPI_FLOAT, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
123
        throw cRuntimeError("cMPICommBuffer::pack(float): MPI_Pack() returned error");
124
}
125
126
void cMPICommBuffer::pack(double d)
127
{
128
    extendBufferFor(sizeof(double));
129
    if (MPI_Pack(&d, 1, MPI_DOUBLE, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
130
        throw cRuntimeError("cMPICommBuffer::pack(double): MPI_Pack() returned error");
131
}
132
133
void cMPICommBuffer::pack(long double d)
134
{
135
    extendBufferFor(sizeof(long double));
136
    if (MPI_Pack(&d, 1, MPI_LONG_DOUBLE, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
137
        throw cRuntimeError("cMPICommBuffer::pack(long double): MPI_Pack() returned error");
138
}
139
140
// pack a string
141
void cMPICommBuffer::pack(const char *d)
142
{
143
    int len = d ? strlen(d) : 0;
144
    pack(len);
145
146
    extendBufferFor(len*sizeof(char));
147
    if (MPI_Pack((void *)d, len, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
148
        throw cRuntimeError("cMPICommBuffer::pack(const char*): MPI_Pack() returned error");
149
}
150
151
void cMPICommBuffer::pack(const opp_string& d)
152
{
153
    pack(d.c_str());
154
}
155
156
void cMPICommBuffer::pack(SimTime d)
157
{
158
    pack((opp_long_long)d.raw());
159
}
160
161
void cMPICommBuffer::pack(const char *d, int size)
162
{
163
    extendBufferFor(size*sizeof(char));
164
    if (MPI_Pack((void *)d, size, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
165
        throw cRuntimeError("cMPICommBuffer::pack(const char*): MPI_Pack() returned error");
166
}
167
168
void cMPICommBuffer::pack(const unsigned char *d, int size)
169
{
170
    extendBufferFor(size*sizeof(unsigned char));
171
    if (MPI_Pack((void *)d, size, MPI_UNSIGNED_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
172
        throw cRuntimeError("cMPICommBuffer::pack(unsigned char*): MPI_Pack() returned error");
173
}
174
175
void cMPICommBuffer::pack(const bool *d, int size)
176
{
177
    extendBufferFor(size*sizeof(char));
178
    if (MPI_Pack((void *)d, size, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
179
        throw cRuntimeError("cMPICommBuffer::pack(char*): MPI_Pack() returned error");
180
}
181
182
void cMPICommBuffer::pack(const short *d, int size)
183
{
184
    extendBufferFor(size*sizeof(short));
185
    if (MPI_Pack((void *)d, size, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
186
        throw cRuntimeError("cMPICommBuffer::pack(char*): MPI_Pack() returned error");
187
}
188
189
void cMPICommBuffer::pack(const unsigned short *d, int size)
190
{
191
    extendBufferFor(size*sizeof(short));
192
    if (MPI_Pack((void *)d, size, MPI_CHAR, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
193
        throw cRuntimeError("cMPICommBuffer::pack(char*): MPI_Pack() returned error");
194
}
195
196
void cMPICommBuffer::pack(const int *d, int size)
197
{
198
    extendBufferFor(size*sizeof(int));
199
    if (MPI_Pack((void *)d, size, MPI_INT, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
200
        throw cRuntimeError("cMPICommBuffer::pack(int*): MPI_Pack() returned error");
201
}
202
203
void cMPICommBuffer::pack(const unsigned int *d, int size)
204
{
205
    extendBufferFor(size*sizeof(unsigned));
206
    if (MPI_Pack((void *)d, size, MPI_UNSIGNED, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
207
        throw cRuntimeError("cMPICommBuffer::pack(unsigned*): MPI_Pack() returned error");
208
}
209
210
void cMPICommBuffer::pack(const long *d, int size)
211
{
212
    extendBufferFor(size*sizeof(long));
213
    if (MPI_Pack((void *)d, size, MPI_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
214
        throw cRuntimeError("cMPICommBuffer::pack(long*): MPI_Pack() returned error");
215
}
216
217
void cMPICommBuffer::pack(const unsigned long *d, int size)
218
{
219
    extendBufferFor(size*sizeof(unsigned long));
220
    if (MPI_Pack((void *)d, size, MPI_UNSIGNED_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
221
        throw cRuntimeError("cMPICommBuffer::pack(unsigned long*): MPI_Pack() returned error");
222
}
223
224
void cMPICommBuffer::pack(const opp_long_long *d, int size)
225
{
226
    extendBufferFor(size*sizeof(opp_long_long));
227
    if (MPI_Pack((void *)d, size, MPI_LONG_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
228
        throw cRuntimeError("cMPICommBuffer::pack(opp_long_long*): MPI_Pack() returned error");
229
}
230
231
void cMPICommBuffer::pack(const opp_unsigned_long_long *d, int size)
232
{
233
    extendBufferFor(size*sizeof(opp_unsigned_long_long));
234
    if (MPI_Pack((void *)d, size, MPI_UNSIGNED_LONG_LONG, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
235
        throw cRuntimeError("cMPICommBuffer::pack(opp_unsigned_long_long*): MPI_Pack() returned error");
236
}
237
238
void cMPICommBuffer::pack(const float *d, int size)
239
{
240
    extendBufferFor(size*sizeof(float));
241
    if (MPI_Pack((void *)d, size, MPI_FLOAT, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
242
        throw cRuntimeError("cMPICommBuffer::pack(float*): MPI_Pack() returned error");
243
}
244
245
void cMPICommBuffer::pack(const double *d, int size)
246
{
247
    extendBufferFor(size*sizeof(double));
248
    if (MPI_Pack((void *)d, size, MPI_DOUBLE, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
249
        throw cRuntimeError("cMPICommBuffer::pack(double*): MPI_Pack() returned error");
250
}
251
252
void cMPICommBuffer::pack(const long double *d, int size)
253
{
254
    extendBufferFor(size*sizeof(long double));
255
    if (MPI_Pack((void *)d, size, MPI_LONG_DOUBLE, mBuffer, mBufferSize, &mMsgSize, MPI_COMM_WORLD))
256
        throw cRuntimeError("cMPICommBuffer::pack(long double*): MPI_Pack() returned error");
257
}
258
259
// pack string array
260
void cMPICommBuffer::pack(const char **d, int size)
261
{
262
    for (int i=0; i<size; i++)
263
        pack(d[i]);
264
}
265
266
void cMPICommBuffer::pack(const opp_string *d, int size)
267
{
268
    for (int i = 0; i < size; i++)
269
        pack(d[i]);
270
}
271
272
void cMPICommBuffer::pack(const SimTime *d, int size)
273
{
274
    for (int i = 0; i < size; i++)
275
        pack(d[i]);
276
}
277
278
//--------------------------------
279
280
void cMPICommBuffer::unpack(char& d)
281
{
282
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_CHAR, MPI_COMM_WORLD))
283
        throw cRuntimeError("cMPICommBuffer::unpack(char): MPI_Unpack() returned error");
284
}
285
286
void cMPICommBuffer::unpack(unsigned char& d)
287
{
288
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_UNSIGNED_CHAR, MPI_COMM_WORLD))
289
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned char): MPI_Unpack() returned error");
290
}
291
292
void cMPICommBuffer::unpack(bool& d)
293
{
294
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_CHAR, MPI_COMM_WORLD))
295
        throw cRuntimeError("cMPICommBuffer::unpack(short): MPI_Unpack() returned error");
296
}
297
298
void cMPICommBuffer::unpack(short& d)
299
{
300
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_SHORT, MPI_COMM_WORLD))
301
        throw cRuntimeError("cMPICommBuffer::unpack(short): MPI_Unpack() returned error");
302
}
303
304
void cMPICommBuffer::unpack(unsigned short& d)
305
{
306
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_UNSIGNED_SHORT, MPI_COMM_WORLD))
307
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned short): MPI_Unpack() returned error");
308
}
309
310
void cMPICommBuffer::unpack(int& d)
311
{
312
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_INT, MPI_COMM_WORLD))
313
        throw cRuntimeError("cMPICommBuffer::unpack(int): MPI_Unpack() returned error");
314
}
315
316
void cMPICommBuffer::unpack(unsigned int& d)
317
{
318
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_UNSIGNED, MPI_COMM_WORLD))
319
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned int): MPI_Unpack() returned error");
320
}
321
322
void cMPICommBuffer::unpack(long& d)
323
{
324
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_LONG, MPI_COMM_WORLD))
325
        throw cRuntimeError("cMPICommBuffer::unpack(long): MPI_Unpack() returned error");
326
}
327
328
void cMPICommBuffer::unpack(unsigned long& d)
329
{
330
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_UNSIGNED_LONG, MPI_COMM_WORLD))
331
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned long): MPI_Unpack() returned error");
332
}
333
334
void cMPICommBuffer::unpack(opp_long_long& d)
335
{
336
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_LONG_LONG, MPI_COMM_WORLD))
337
        throw cRuntimeError("cMPICommBuffer::unpack(opp_long_long): MPI_Unpack() returned error");
338
}
339
340
void cMPICommBuffer::unpack(opp_unsigned_long_long& d)
341
{
342
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_UNSIGNED_LONG_LONG, MPI_COMM_WORLD))
343
        throw cRuntimeError("cMPICommBuffer::unpack(opp_unsigned_long_long): MPI_Unpack() returned error");
344
}
345
346
void cMPICommBuffer::unpack(float& d)
347
{
348
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_FLOAT, MPI_COMM_WORLD))
349
        throw cRuntimeError("cMPICommBuffer::unpack(float): MPI_Unpack() returned error");
350
}
351
352
void cMPICommBuffer::unpack(double& d)
353
{
354
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_DOUBLE, MPI_COMM_WORLD))
355
        throw cRuntimeError("cMPICommBuffer::unpack(double): MPI_Unpack() returned error");
356
}
357
358
void cMPICommBuffer::unpack(long double& d)
359
{
360
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, &d, 1, MPI_LONG_DOUBLE, MPI_COMM_WORLD))
361
        throw cRuntimeError("cMPICommBuffer::unpack(long double): MPI_Unpack() returned error");
362
}
363
364
// unpack a string
365
void cMPICommBuffer::unpack(const char *&d)
366
{
367
    int len;
368
    unpack(len);
369
    char *tmp = new char[len+1];
370
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, tmp, len, MPI_CHAR, MPI_COMM_WORLD))
371
        throw cRuntimeError("cMPICommBuffer::unpack(char*): MPI_Unpack() returned error");
372
    tmp[len] = '\0';
373
    d = tmp;
374
}
375
376
void cMPICommBuffer::unpack(opp_string& d)
377
{
378
    int len;
379
    unpack(len);
380
    d.reserve(len+1);
381
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d.buffer(), len, MPI_CHAR, MPI_COMM_WORLD))
382
        throw cRuntimeError("cMPICommBuffer::unpack(char*): MPI_Unpack() returned error");
383
    d.buffer()[len] = '\0';
384
}
385
386
void cMPICommBuffer::unpack(SimTime& d)
387
{
388
    opp_long_long raw;
389
    unpack(raw);
390
    d.setRaw(raw);
391
}
392
393
void cMPICommBuffer::unpack(char *d, int size)
394
{
395
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_CHAR, MPI_COMM_WORLD))
396
        throw cRuntimeError("cMPICommBuffer::unpack(char*): MPI_Unpack() returned error");
397
}
398
399
void cMPICommBuffer::unpack(unsigned char *d, int size)
400
{
401
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_UNSIGNED_CHAR, MPI_COMM_WORLD))
402
        throw cRuntimeError("cMPICommBuffer::unpack(char*): MPI_Unpack() returned error");
403
}
404
405
void cMPICommBuffer::unpack(bool *d, int size)
406
{
407
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_CHAR, MPI_COMM_WORLD))
408
        throw cRuntimeError("cMPICommBuffer::unpack(bool*): MPI_Unpack() returned error");
409
}
410
411
void cMPICommBuffer::unpack(short *d, int size)
412
{
413
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_SHORT, MPI_COMM_WORLD))
414
        throw cRuntimeError("cMPICommBuffer::unpack(short*): MPI_Unpack() returned error");
415
}
416
417
void cMPICommBuffer::unpack(unsigned short *d, int size)
418
{
419
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_UNSIGNED_SHORT, MPI_COMM_WORLD))
420
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned short*): MPI_Unpack() returned error");
421
}
422
423
void cMPICommBuffer::unpack(int *d, int size)
424
{
425
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_INT, MPI_COMM_WORLD))
426
        throw cRuntimeError("cMPICommBuffer::unpack(int*): MPI_Unpack() returned error");
427
}
428
429
void cMPICommBuffer::unpack(unsigned int *d, int size)
430
{
431
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_UNSIGNED, MPI_COMM_WORLD))
432
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned int*): MPI_Unpack() returned error");
433
}
434
435
void cMPICommBuffer::unpack(long *d, int size)
436
{
437
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_LONG, MPI_COMM_WORLD))
438
        throw cRuntimeError("cMPICommBuffer::unpack(long*): MPI_Unpack() returned error");
439
}
440
441
void cMPICommBuffer::unpack(unsigned long *d, int size)
442
{
443
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_UNSIGNED_LONG, MPI_COMM_WORLD))
444
        throw cRuntimeError("cMPICommBuffer::unpack(unsigned long*): MPI_Unpack() returned error");
445
}
446
447
void cMPICommBuffer::unpack(opp_long_long *d, int size)
448
{
449
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_LONG_LONG, MPI_COMM_WORLD))
450
        throw cRuntimeError("cMPICommBuffer::unpack(opp_long_long*): MPI_Unpack() returned error");
451
}
452
453
void cMPICommBuffer::unpack(opp_unsigned_long_long *d, int size)
454
{
455
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_UNSIGNED_LONG_LONG, MPI_COMM_WORLD))
456
        throw cRuntimeError("cMPICommBuffer::unpack(opp_unsigned_long_long*): MPI_Unpack() returned error");
457
}
458
459
void cMPICommBuffer::unpack(float *d, int size)
460
{
461
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_FLOAT, MPI_COMM_WORLD))
462
        throw cRuntimeError("cMPICommBuffer::unpack(float*): MPI_Unpack() returned error");
463
}
464
465
void cMPICommBuffer::unpack(double *d, int size)
466
{
467
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_DOUBLE, MPI_COMM_WORLD))
468
        throw cRuntimeError("cMPICommBuffer::unpack(double*): MPI_Unpack() returned error");
469
}
470
471
void cMPICommBuffer::unpack(long double *d, int size)
472
{
473
    if (MPI_Unpack(mBuffer, mMsgSize, &mPosition, d, size, MPI_LONG_DOUBLE, MPI_COMM_WORLD))
474
        throw cRuntimeError("cMPICommBuffer::unpack(long double*): MPI_Unpack() returned error");
475
}
476
477
void cMPICommBuffer::unpack(const char **d, int size)
478
{
479
    for (int i = 0; i < size; i++)
480
        unpack(d[i]);
481
}
482
483
void cMPICommBuffer::unpack(opp_string *d, int size)
484
{
485
    for (int i = 0; i < size; i++)
486
        unpack(d[i]);
487
}
488
489
void cMPICommBuffer::unpack(SimTime *d, int size)
490
{
491
    for (int i = 0; i < size; i++)
492
        unpack(d[i]);
493
}
494
495
#endif // WITH_MPI