4 #ifndef MPI_UTILITIES_H_
5 #define MPI_UTILITIES_H_
41 inline MPI_Datatype MPI_type(
char) {
return MPI_CHAR; }
42 inline MPI_Datatype MPI_type(
const char*) {
return MPI_CHAR; }
43 inline MPI_Datatype MPI_type(
unsigned char) {
return MPI_UNSIGNED_CHAR; }
44 inline MPI_Datatype MPI_type(
const unsigned char*) {
return MPI_UNSIGNED_CHAR; }
45 inline MPI_Datatype MPI_type(
short int) {
return MPI_SHORT; }
46 inline MPI_Datatype MPI_type(
const short int*) {
return MPI_SHORT; }
47 inline MPI_Datatype MPI_type(
unsigned short int) {
return MPI_UNSIGNED_SHORT; }
48 inline MPI_Datatype MPI_type(
const unsigned short int*) {
return MPI_UNSIGNED_SHORT; }
49 inline MPI_Datatype MPI_type(
int) {
return MPI_INT; }
50 inline MPI_Datatype MPI_type(
const int*) {
return MPI_INT; }
51 inline MPI_Datatype MPI_type(
unsigned int) {
return MPI_UNSIGNED; }
52 inline MPI_Datatype MPI_type(
const unsigned int*) {
return MPI_UNSIGNED; }
53 inline MPI_Datatype MPI_type(
long) {
return MPI_LONG_INT; }
54 inline MPI_Datatype MPI_type(
const long*) {
return MPI_LONG_INT; }
55 inline MPI_Datatype MPI_type(
unsigned long) {
return MPI_UNSIGNED_LONG; }
56 inline MPI_Datatype MPI_type(
const unsigned long*) {
return MPI_UNSIGNED_LONG; }
57 inline MPI_Datatype MPI_type(
long long) {
return MPI_LONG_LONG; }
58 inline MPI_Datatype MPI_type(
const long long*) {
return MPI_LONG_LONG; }
59 inline MPI_Datatype MPI_type(
unsigned long long) {
return MPI_UNSIGNED_LONG_LONG; }
60 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)
Definition: mpi_utilities.cpp:122
unsigned int p_ncpu
Definition: mpi_utilities.h:104
int next_job()
Definition: mpi_utilities.h:135
long MPI_Status
Definition: mpi_utilities.h:73
MPI_state
Definition: mpi_utilities.h:7
Definition: mpi_utilities.h:7
void * MPI_File
Definition: mpi_utilities.h:74
MPI_File MPI_FILE_NULL
Definition: mpi_utilities.cpp:52
load_balance(unsigned int nJobs, unsigned int nCPU)
Definition: mpi_utilities.h:120
exit_type
Definition: cddefines.h:151
unsigned int p_ptr
Definition: mpi_utilities.h:102
vector< int > p_jobs
Definition: mpi_utilities.h:101
void init(unsigned int nJobs, unsigned int nCPU)
Definition: mpi_utilities.cpp:67
load_balance()
Definition: mpi_utilities.h:116
void append_file(FILE *, const char *)
Definition: mpi_utilities.cpp:477
~load_balance()
Definition: mpi_utilities.h:125
float sys_float
Definition: cddefines.h:130
int mpi_mode_w
Definition: mpi_utilities.cpp:62
int MPI_ERR_INTERN
Definition: mpi_utilities.cpp:51
void p_clear0()
Definition: mpi_utilities.h:105
void process_output()
Definition: mpi_utilities.cpp:139
void p_clear1()
Definition: mpi_utilities.h:109
int total_insanity(MPI_File, int, MPI_Status *)
Definition: mpi_utilities.cpp:54
int mpi_mode_r
Definition: mpi_utilities.cpp:61
unsigned int p_rank
Definition: mpi_utilities.h:103
Definition: mpi_utilities.h:7
Definition: mpi_utilities.h:7
Definition: mpi_utilities.h:99
void clear()
Definition: mpi_utilities.h:129
string GridPointPrefix(int n)
Definition: mpi_utilities.h:154
int mpi_mode_a
Definition: mpi_utilities.cpp:63
long MPI_Offset
Definition: mpi_utilities.h:72
int MPI_SUCCESS
Definition: mpi_utilities.cpp:50