4#ifndef MPI_UTILITIES_H_
5#define MPI_UTILITIES_H_
39 inline const Datatype& type(
bool) {
return BOOL; }
40 inline const Datatype& type(
const bool*) {
return BOOL; }
41 inline const Datatype& type(
char) {
return CHAR; }
42 inline const Datatype& type(
const char*) {
return CHAR; }
43 inline const Datatype& type(
unsigned char) {
return UNSIGNED_CHAR; }
44 inline const Datatype& type(
const unsigned char*) {
return UNSIGNED_CHAR; }
45 inline const Datatype& type(
short int) {
return SHORT; }
46 inline const Datatype& type(
const short int*) {
return SHORT; }
47 inline const Datatype& type(
unsigned short int) {
return UNSIGNED_SHORT; }
48 inline const Datatype& type(
const unsigned short int*) {
return UNSIGNED_SHORT; }
49 inline const Datatype& type(
int) {
return INT; }
50 inline const Datatype& type(
const int*) {
return INT; }
51 inline const Datatype& type(
unsigned int) {
return UNSIGNED; }
52 inline const Datatype& type(
const unsigned int*) {
return UNSIGNED; }
53 inline const Datatype& type(
long) {
return LONG_INT; }
54 inline const Datatype& type(
const long*) {
return LONG_INT; }
55 inline const Datatype& type(
unsigned long) {
return UNSIGNED_LONG; }
56 inline const Datatype& type(
const unsigned long*) {
return UNSIGNED_LONG; }
57 inline const Datatype& type(
sys_float) {
return FLOAT; }
58 inline const Datatype& type(
const sys_float*) {
return FLOAT; }
59 inline const Datatype& type(
double) {
return DOUBLE; }
60 inline const Datatype& type(
const double*) {
return DOUBLE; }
61 inline const Datatype& type(complex<sys_float>) {
return COMPLEX; }
62 inline const Datatype& type(
const complex<sys_float>*) {
return COMPLEX; }
63 inline const Datatype& type(complex<double>) {
return DOUBLE_COMPLEX; }
64 inline const Datatype& type(
const complex<double>*) {
return DOUBLE_COMPLEX; }
85#define Barrier() total_insanity()
86#define Bcast(W,X,Y,Z) total_insanity()
87#define Finalize() COMM_WORLD.total_insanity()
88#define Get_size() total_insanity()
89#define Get_rank() total_insanity()
90#define Init(Y,Z) COMM_WORLD.total_insanity()
91#define Reduce(U,V,W,X,Y,Z) total_insanity()
126 void init(
int nJobs );
132 if(
cpu.i().lgMPI() )
144 if(
cpu.i().lgMPI() )
153 oss <<
"grid" << setfill(
'0' ) << setw(9) << n <<
"_";
void append_file(FILE *, const char *)
string GridPointPrefix(int n)