1#ifndef HILA_HILAPP_MPI_H_
2#define HILA_HILAPP_MPI_H_
13enum MPI_Datatype :
int {
35enum MPI_Op :
int { MPI_SUM, MPI_PROD, MPI_MAX, MPI_MIN, MPI_MAXLOC, MPI_MINLOC };
37typedef void *MPI_Comm;
38typedef void *MPI_Request;
39typedef struct ompi_status_public_t MPI_Status;
40typedef void *MPI_Comm;
43typedef void *MPI_Errhandler;
44#define MPI_IN_PLACE nullptr
45#define MPI_COMM_WORLD nullptr
46#define MPI_STATUS_IGNORE nullptr
47#define MPI_ERRORS_RETURN nullptr
48#define MPI_REQUEST_NULL nullptr
51enum MPI_thread_level :
int {
54 MPI_THREAD_SERIALIZED,
58struct ompi_status_public_t {
72int MPI_Init(
int *argc,
char ***argv);
74int MPI_Init_thread(
int *argc,
char ***argv,
int threadlevel,
int *provided);
76int MPI_Comm_rank(MPI_Comm comm,
int *rank);
78int MPI_Comm_size(MPI_Comm comm,
int *size);
80int MPI_Comm_split(MPI_Comm comm,
int color,
int key, MPI_Comm *newcomm);
82int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler);
84int MPI_Bcast(
void *buffer,
int count, MPI_Datatype datatype,
int root, MPI_Comm comm);
86int MPI_Reduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype,
87 MPI_Op op,
int root, MPI_Comm comm);
89int MPI_Ireduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype,
90 MPI_Op op,
int root, MPI_Comm comm, MPI_Request *request);
92int MPI_Allreduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype,
93 MPI_Op op, MPI_Comm comm);
95int MPI_Iallreduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype,
96 MPI_Op op, MPI_Comm comm, MPI_Request *request);
98int MPI_Send(
const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag,
101int MPI_Isend(
const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag,
102 MPI_Comm comm, MPI_Request *request);
104int MPI_Recv(
void *buf,
int count, MPI_Datatype datatype,
int source,
int tag,
105 MPI_Comm comm, MPI_Status *status);
107int MPI_Irecv(
void *buf,
int count, MPI_Datatype datatype,
int source,
int tag,
108 MPI_Comm comm, MPI_Request *request);
110int MPI_Wait(MPI_Request *request, MPI_Status *status);
112int MPI_Waitall(
int count, MPI_Request array_of_requests[],
113 MPI_Status *array_of_statuses);
115int MPI_Barrier(MPI_Comm comm);
117int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request);
119int MPI_Cancel(MPI_Request *request);
121int MPI_Test(MPI_Request *request,
int *flag, MPI_Status *status);
123int MPI_Test_cancelled(
const MPI_Status *status,
int *flag);
125int MPI_Request_free(MPI_Request *request);
127int MPI_Abort(MPI_Comm comm,
int errorcode);
129MPI_Fint MPI_Comm_c2f(MPI_Comm comm);
133int MPI_Get_address(
const void *location, MPI_Aint *address);
135int MPI_Type_create_struct(
int count,
136 const int array_of_blocklengths[],
137 const MPI_Aint array_of_displacements[],
138 const MPI_Datatype array_of_types[],
139 MPI_Datatype *newtype);
141int MPI_Type_commit(MPI_Datatype *datatype);
143typedef void MPI_User_function(
void *invec,
void *inoutvec,
int *len, MPI_Datatype *datatype);
145int MPI_Op_create(MPI_User_function *user_fn,
int commute, MPI_Op *op);