4 #ifndef MPI_UTILITIES_H_
5 #define MPI_UTILITIES_H_
39 inline MPI_Datatype MPI_type(
char) {
return MPI_CHAR; }
40 inline MPI_Datatype MPI_type(
const char*) {
return MPI_CHAR; }
41 inline MPI_Datatype MPI_type(
unsigned char) {
return MPI_UNSIGNED_CHAR; }
42 inline MPI_Datatype MPI_type(
const unsigned char*) {
return MPI_UNSIGNED_CHAR; }
43 inline MPI_Datatype MPI_type(
short int) {
return MPI_SHORT; }
44 inline MPI_Datatype MPI_type(
const short int*) {
return MPI_SHORT; }
45 inline MPI_Datatype MPI_type(
unsigned short int) {
return MPI_UNSIGNED_SHORT; }
46 inline MPI_Datatype MPI_type(
const unsigned short int*) {
return MPI_UNSIGNED_SHORT; }
47 inline MPI_Datatype MPI_type(
int) {
return MPI_INT; }
48 inline MPI_Datatype MPI_type(
const int*) {
return MPI_INT; }
49 inline MPI_Datatype MPI_type(
unsigned int) {
return MPI_UNSIGNED; }
50 inline MPI_Datatype MPI_type(
const unsigned int*) {
return MPI_UNSIGNED; }
51 inline MPI_Datatype MPI_type(
long) {
return MPI_LONG_INT; }
52 inline MPI_Datatype MPI_type(
const long*) {
return MPI_LONG_INT; }
53 inline MPI_Datatype MPI_type(
unsigned long) {
return MPI_UNSIGNED_LONG; }
54 inline MPI_Datatype MPI_type(
const unsigned long*) {
return MPI_UNSIGNED_LONG; }
56 inline MPI_Datatype MPI_type(
long long) {
return MPI_LONG_LONG; }
57 inline MPI_Datatype MPI_type(
const long long*) {
return MPI_LONG_LONG; }
58 inline MPI_Datatype MPI_type(
unsigned long long) {
return MPI_UNSIGNED_LONG_LONG; }
59 inline MPI_Datatype MPI_type(
const unsigned long long*) {
return MPI_UNSIGNED_LONG_LONG; }
61 inline MPI_Datatype MPI_type(
sys_float) {
return MPI_FLOAT; }
62 inline MPI_Datatype MPI_type(
const sys_float*) {
return MPI_FLOAT; }
63 inline MPI_Datatype MPI_type(
double) {
return MPI_DOUBLE; }
64 inline MPI_Datatype MPI_type(
const double*) {
return MPI_DOUBLE; }
65 inline MPI_Datatype MPI_type(complex<sys_float>) {
return MPI_COMPLEX; }
66 inline MPI_Datatype MPI_type(
const complex<sys_float>*) {
return MPI_COMPLEX; }
67 inline MPI_Datatype MPI_type(complex<double>) {
return MPI_DOUBLE_COMPLEX; }
68 inline MPI_Datatype MPI_type(
const complex<double>*) {
return MPI_DOUBLE_COMPLEX; }
84 #define MPI_Barrier(Z) TotalInsanityAsStub<int>()
85 #define MPI_Bcast(V,W,X,Y,Z) TotalInsanityAsStub<int>()
86 #define MPI_Finalize() TotalInsanityAsStub<int>()
87 #define MPI_Comm_size(Y,Z) TotalInsanityAsStub<int>()
88 #define MPI_Comm_rank(Y,Z) TotalInsanityAsStub<int>()
89 #define MPI_Init(Y,Z) TotalInsanityAsStub<int>()
90 #define MPI_Reduce(T,U,V,W,X,Y,Z) TotalInsanityAsStub<int>()
91 #define MPI_File_open(V,W,X,Y,Z) TotalInsanityAsStub<int>()
92 #define MPI_File_set_view(U,V,W,X,Y,Z) TotalInsanityAsStub<int>()
93 #define MPI_File_get_size(Y,Z) TotalInsanityAsStub<int>()
94 #define MPI_File_write(V,W,X,Y,Z) total_insanity(V,X,Z)
95 #define MPI_File_close(Z) TotalInsanityAsStub<int>()
134 void init(
unsigned int nJobs,
unsigned int nCPU );
157 oss <<
"grid" << setfill(
'0' ) << setw(9) << n <<
"_";
void finalize(exit_type exit_status)
load_balance(unsigned int nJobs, unsigned int nCPU)
void init(unsigned int nJobs, unsigned int nCPU)
int total_insanity(MPI_File, int, MPI_Status *)
void append_file(FILE *dest, const char *source)
string GridPointPrefix(int n)