7 #define _EXTERN_C_ extern "C"
18 #pragma weak pmpi_init
19 #pragma weak PMPI_INIT
20 #pragma weak pmpi_init_
21 #pragma weak pmpi_init__
27 static int in_wrapper = 0;
30 #if QUDA_NVTX_VERSION == 3
31 #include <nvtx3/nvToolsExt.h>
32 #include <nvtx3/nvToolsExtCudaRt.h>
34 #include <nvToolsExt.h>
35 #include <nvToolsExtCudaRt.h>
43 int _wrap_py_return_val = 0;
44 if (in_wrapper)
return PMPI_Init(argc, argv);
47 nvtxNameCategoryA(999,
"MPI");
48 _wrap_py_return_val =
PMPI_Init(argc, argv);
50 PMPI_Comm_rank(MPI_COMM_HANDLE, &rank);
52 sprintf( name,
"MPI Rank %d", rank );
54 nvtxNameOsThread(pthread_self(), name);
55 nvtxNameCudaDeviceA(rank, name);
57 return _wrap_py_return_val;
63 _EXTERN_C_ int PMPI_Send(
const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm);
64 _EXTERN_C_ int MPI_Send(
const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm) {
65 int _wrap_py_return_val = 0;
66 if (in_wrapper)
return PMPI_Send(buf, count, datatype, dest, tag, comm);
69 nvtxEventAttributes_t eventAttrib = {0};
70 eventAttrib.version = NVTX_VERSION;
71 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
72 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
73 eventAttrib.message.ascii =
"MPI_Send";
74 eventAttrib.category = 999;
75 eventAttrib.colorType = NVTX_COLOR_ARGB; \
76 eventAttrib.color = 0xffffaa00; \
78 nvtxRangePushEx(&eventAttrib);
79 _wrap_py_return_val =
PMPI_Send(buf, count, datatype, dest, tag, comm);
82 return _wrap_py_return_val;
86 _EXTERN_C_ int PMPI_Recv(
void *buf,
int count, MPI_Datatype datatype,
int source,
int tag, MPI_Comm comm, MPI_Status *status);
87 _EXTERN_C_ int MPI_Recv(
void *buf,
int count, MPI_Datatype datatype,
int source,
int tag, MPI_Comm comm, MPI_Status *status) {
88 int _wrap_py_return_val = 0;
89 if (in_wrapper)
return PMPI_Recv(buf, count, datatype, source, tag, comm, status);
92 nvtxEventAttributes_t eventAttrib = {0};
93 eventAttrib.version = NVTX_VERSION;
94 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
95 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
96 eventAttrib.message.ascii =
"MPI_Recv";
97 eventAttrib.category = 999;
98 eventAttrib.colorType = NVTX_COLOR_ARGB; \
99 eventAttrib.color = 0xffffaa00; \
101 nvtxRangePushEx(&eventAttrib);
102 _wrap_py_return_val =
PMPI_Recv(buf, count, datatype, source, tag, comm, status);
105 return _wrap_py_return_val;
110 _EXTERN_C_ int MPI_Allreduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) {
111 int _wrap_py_return_val = 0;
112 if (in_wrapper)
return PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
115 nvtxEventAttributes_t eventAttrib = {0};
116 eventAttrib.version = NVTX_VERSION;
117 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
118 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
119 eventAttrib.message.ascii =
"MPI_Allreduce";
120 eventAttrib.category = 999;
121 eventAttrib.colorType = NVTX_COLOR_ARGB; \
122 eventAttrib.color = 0xffffaa00; \
124 nvtxRangePushEx(&eventAttrib);
125 _wrap_py_return_val =
PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
128 return _wrap_py_return_val;
132 _EXTERN_C_ int PMPI_Reduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype, MPI_Op op,
int root, MPI_Comm comm);
133 _EXTERN_C_ int MPI_Reduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype, MPI_Op op,
int root, MPI_Comm comm) {
134 int _wrap_py_return_val = 0;
135 if (in_wrapper)
return PMPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
138 nvtxEventAttributes_t eventAttrib = {0};
139 eventAttrib.version = NVTX_VERSION;
140 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
141 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
142 eventAttrib.message.ascii =
"MPI_Reduce";
143 eventAttrib.category = 999;
144 eventAttrib.colorType = NVTX_COLOR_ARGB; \
145 eventAttrib.color = 0xffffaa00; \
147 nvtxRangePushEx(&eventAttrib);
148 _wrap_py_return_val =
PMPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
151 return _wrap_py_return_val;
157 int _wrap_py_return_val = 0;
158 if (in_wrapper)
return PMPI_Wait(request, status);
161 nvtxEventAttributes_t eventAttrib = {0};
162 eventAttrib.version = NVTX_VERSION;
163 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
164 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
165 eventAttrib.message.ascii =
"MPI_Wait";
166 eventAttrib.category = 999;
167 eventAttrib.colorType = NVTX_COLOR_ARGB; \
168 eventAttrib.color = 0xffffaa00; \
170 nvtxRangePushEx(&eventAttrib);
171 _wrap_py_return_val =
PMPI_Wait(request, status);
174 return _wrap_py_return_val;
180 int _wrap_py_return_val = 0;
181 if (in_wrapper)
return PMPI_Waitany(count, array_of_requests, index, status);
184 nvtxEventAttributes_t eventAttrib = {0};
185 eventAttrib.version = NVTX_VERSION;
186 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
187 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
188 eventAttrib.message.ascii =
"MPI_Waitany";
189 eventAttrib.category = 999;
190 eventAttrib.colorType = NVTX_COLOR_ARGB; \
191 eventAttrib.color = 0xffffaa00; \
193 nvtxRangePushEx(&eventAttrib);
194 _wrap_py_return_val =
PMPI_Waitany(count, array_of_requests, index, status);
197 return _wrap_py_return_val;
203 int _wrap_py_return_val = 0;
204 if (in_wrapper)
return PMPI_Waitall(count, array_of_requests, array_of_statuses);
207 nvtxEventAttributes_t eventAttrib = {0};
208 eventAttrib.version = NVTX_VERSION;
209 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
210 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
211 eventAttrib.message.ascii =
"MPI_Waitall";
212 eventAttrib.category = 999;
213 eventAttrib.colorType = NVTX_COLOR_ARGB; \
214 eventAttrib.color = 0xffffaa00; \
216 nvtxRangePushEx(&eventAttrib);
217 _wrap_py_return_val =
PMPI_Waitall(count, array_of_requests, array_of_statuses);
220 return _wrap_py_return_val;
224 _EXTERN_C_ int PMPI_Waitsome(
int incount, MPI_Request array_of_requests[],
int *outcount,
int array_of_indices[], MPI_Status array_of_statuses[]);
225 _EXTERN_C_ int MPI_Waitsome(
int incount, MPI_Request array_of_requests[],
int *outcount,
int array_of_indices[], MPI_Status array_of_statuses[]) {
226 int _wrap_py_return_val = 0;
227 if (in_wrapper)
return PMPI_Waitsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses);
230 nvtxEventAttributes_t eventAttrib = {0};
231 eventAttrib.version = NVTX_VERSION;
232 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
233 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
234 eventAttrib.message.ascii =
"MPI_Waitsome";
235 eventAttrib.category = 999;
236 eventAttrib.colorType = NVTX_COLOR_ARGB; \
237 eventAttrib.color = 0xffffaa00; \
239 nvtxRangePushEx(&eventAttrib);
240 _wrap_py_return_val =
PMPI_Waitsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses);
243 return _wrap_py_return_val;
247 _EXTERN_C_ int PMPI_Gather(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm);
248 _EXTERN_C_ int MPI_Gather(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm) {
249 int _wrap_py_return_val = 0;
250 if (in_wrapper)
return PMPI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
253 nvtxEventAttributes_t eventAttrib = {0};
254 eventAttrib.version = NVTX_VERSION;
255 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
256 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
257 eventAttrib.message.ascii =
"MPI_Gather";
258 eventAttrib.category = 999;
259 eventAttrib.colorType = NVTX_COLOR_ARGB; \
260 eventAttrib.color = 0xffffaa00; \
262 nvtxRangePushEx(&eventAttrib);
263 _wrap_py_return_val =
PMPI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
266 return _wrap_py_return_val;
270 _EXTERN_C_ int PMPI_Gatherv(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
const int recvcounts[],
const int displs[], MPI_Datatype recvtype,
int root, MPI_Comm comm);
271 _EXTERN_C_ int MPI_Gatherv(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
const int recvcounts[],
const int displs[], MPI_Datatype recvtype,
int root, MPI_Comm comm) {
272 int _wrap_py_return_val = 0;
273 if (in_wrapper)
return PMPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm);
276 nvtxEventAttributes_t eventAttrib = {0};
277 eventAttrib.version = NVTX_VERSION;
278 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
279 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
280 eventAttrib.message.ascii =
"MPI_Gatherv";
281 eventAttrib.category = 999;
282 eventAttrib.colorType = NVTX_COLOR_ARGB; \
283 eventAttrib.color = 0xffffaa00; \
285 nvtxRangePushEx(&eventAttrib);
286 _wrap_py_return_val =
PMPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm);
289 return _wrap_py_return_val;
293 _EXTERN_C_ int PMPI_Scatter(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm);
294 _EXTERN_C_ int MPI_Scatter(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm) {
295 int _wrap_py_return_val = 0;
296 if (in_wrapper)
return PMPI_Scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
299 nvtxEventAttributes_t eventAttrib = {0};
300 eventAttrib.version = NVTX_VERSION;
301 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
302 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
303 eventAttrib.message.ascii =
"MPI_Scatter";
304 eventAttrib.category = 999;
305 eventAttrib.colorType = NVTX_COLOR_ARGB; \
306 eventAttrib.color = 0xffffaa00; \
308 nvtxRangePushEx(&eventAttrib);
309 _wrap_py_return_val =
PMPI_Scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
312 return _wrap_py_return_val;
316 _EXTERN_C_ int PMPI_Scatterv(
const void *sendbuf,
const int sendcounts[],
const int displs[], MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm);
317 _EXTERN_C_ int MPI_Scatterv(
const void *sendbuf,
const int sendcounts[],
const int displs[], MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm) {
318 int _wrap_py_return_val = 0;
319 if (in_wrapper)
return PMPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm);
322 nvtxEventAttributes_t eventAttrib = {0};
323 eventAttrib.version = NVTX_VERSION;
324 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
325 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
326 eventAttrib.message.ascii =
"MPI_Scatterv";
327 eventAttrib.category = 999;
328 eventAttrib.colorType = NVTX_COLOR_ARGB; \
329 eventAttrib.color = 0xffffaa00; \
331 nvtxRangePushEx(&eventAttrib);
332 _wrap_py_return_val =
PMPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm);
335 return _wrap_py_return_val;
339 _EXTERN_C_ int PMPI_Allgather(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm);
340 _EXTERN_C_ int MPI_Allgather(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm) {
341 int _wrap_py_return_val = 0;
342 if (in_wrapper)
return PMPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
345 nvtxEventAttributes_t eventAttrib = {0};
346 eventAttrib.version = NVTX_VERSION;
347 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
348 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
349 eventAttrib.message.ascii =
"MPI_Allgather";
350 eventAttrib.category = 999;
351 eventAttrib.colorType = NVTX_COLOR_ARGB; \
352 eventAttrib.color = 0xffffaa00; \
354 nvtxRangePushEx(&eventAttrib);
355 _wrap_py_return_val =
PMPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
358 return _wrap_py_return_val;
362 _EXTERN_C_ int PMPI_Allgatherv(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
const int recvcounts[],
const int displs[], MPI_Datatype recvtype, MPI_Comm comm);
363 _EXTERN_C_ int MPI_Allgatherv(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
const int recvcounts[],
const int displs[], MPI_Datatype recvtype, MPI_Comm comm) {
364 int _wrap_py_return_val = 0;
365 if (in_wrapper)
return PMPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm);
368 nvtxEventAttributes_t eventAttrib = {0};
369 eventAttrib.version = NVTX_VERSION;
370 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
371 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
372 eventAttrib.message.ascii =
"MPI_Allgatherv";
373 eventAttrib.category = 999;
374 eventAttrib.colorType = NVTX_COLOR_ARGB; \
375 eventAttrib.color = 0xffffaa00; \
377 nvtxRangePushEx(&eventAttrib);
378 _wrap_py_return_val =
PMPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm);
381 return _wrap_py_return_val;
385 _EXTERN_C_ int PMPI_Alltoall(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm);
386 _EXTERN_C_ int MPI_Alltoall(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
void *recvbuf,
int recvcount, MPI_Datatype recvtype, MPI_Comm comm) {
387 int _wrap_py_return_val = 0;
388 if (in_wrapper)
return PMPI_Alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
391 nvtxEventAttributes_t eventAttrib = {0};
392 eventAttrib.version = NVTX_VERSION;
393 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
394 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
395 eventAttrib.message.ascii =
"MPI_Alltoall";
396 eventAttrib.category = 999;
397 eventAttrib.colorType = NVTX_COLOR_ARGB; \
398 eventAttrib.color = 0xffffaa00; \
400 nvtxRangePushEx(&eventAttrib);
401 _wrap_py_return_val =
PMPI_Alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
404 return _wrap_py_return_val;
408 _EXTERN_C_ int PMPI_Alltoallv(
const void *sendbuf,
const int sendcounts[],
const int sdispls[], MPI_Datatype sendtype,
void *recvbuf,
const int recvcounts[],
const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm);
409 _EXTERN_C_ int MPI_Alltoallv(
const void *sendbuf,
const int sendcounts[],
const int sdispls[], MPI_Datatype sendtype,
void *recvbuf,
const int recvcounts[],
const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm) {
410 int _wrap_py_return_val = 0;
411 if (in_wrapper)
return PMPI_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm);
414 nvtxEventAttributes_t eventAttrib = {0};
415 eventAttrib.version = NVTX_VERSION;
416 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
417 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
418 eventAttrib.message.ascii =
"MPI_Alltoallv";
419 eventAttrib.category = 999;
420 eventAttrib.colorType = NVTX_COLOR_ARGB; \
421 eventAttrib.color = 0xffffaa00; \
423 nvtxRangePushEx(&eventAttrib);
424 _wrap_py_return_val =
PMPI_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm);
427 return _wrap_py_return_val;
431 _EXTERN_C_ int PMPI_Alltoallw(
const void *sendbuf,
const int sendcounts[],
const int sdispls[],
const MPI_Datatype sendtypes[],
void *recvbuf,
const int recvcounts[],
const int rdispls[],
const MPI_Datatype recvtypes[], MPI_Comm comm);
432 _EXTERN_C_ int MPI_Alltoallw(
const void *sendbuf,
const int sendcounts[],
const int sdispls[],
const MPI_Datatype sendtypes[],
void *recvbuf,
const int recvcounts[],
const int rdispls[],
const MPI_Datatype recvtypes[], MPI_Comm comm) {
433 int _wrap_py_return_val = 0;
434 if (in_wrapper)
return PMPI_Alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm);
437 nvtxEventAttributes_t eventAttrib = {0};
438 eventAttrib.version = NVTX_VERSION;
439 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
440 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
441 eventAttrib.message.ascii =
"MPI_Alltoallw";
442 eventAttrib.category = 999;
443 eventAttrib.colorType = NVTX_COLOR_ARGB; \
444 eventAttrib.color = 0xffffaa00; \
446 nvtxRangePushEx(&eventAttrib);
447 _wrap_py_return_val =
PMPI_Alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm);
450 return _wrap_py_return_val;
456 int _wrap_py_return_val = 0;
457 if (in_wrapper)
return PMPI_Bcast(buffer, count, datatype, root, comm);
460 nvtxEventAttributes_t eventAttrib = {0};
461 eventAttrib.version = NVTX_VERSION;
462 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
463 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
464 eventAttrib.message.ascii =
"MPI_Bcast";
465 eventAttrib.category = 999;
466 eventAttrib.colorType = NVTX_COLOR_ARGB; \
467 eventAttrib.color = 0xffffaa00; \
469 nvtxRangePushEx(&eventAttrib);
470 _wrap_py_return_val =
PMPI_Bcast(buffer, count, datatype, root, comm);
473 return _wrap_py_return_val;
477 _EXTERN_C_ int PMPI_Sendrecv(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
int dest,
int sendtag,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int source,
int recvtag, MPI_Comm comm, MPI_Status *status);
478 _EXTERN_C_ int MPI_Sendrecv(
const void *sendbuf,
int sendcount, MPI_Datatype sendtype,
int dest,
int sendtag,
void *recvbuf,
int recvcount, MPI_Datatype recvtype,
int source,
int recvtag, MPI_Comm comm, MPI_Status *status) {
479 int _wrap_py_return_val = 0;
480 if (in_wrapper)
return PMPI_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status);
483 nvtxEventAttributes_t eventAttrib = {0};
484 eventAttrib.version = NVTX_VERSION;
485 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
486 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
487 eventAttrib.message.ascii =
"MPI_Sendrecv";
488 eventAttrib.category = 999;
489 eventAttrib.colorType = NVTX_COLOR_ARGB; \
490 eventAttrib.color = 0xffffaa00; \
492 nvtxRangePushEx(&eventAttrib);
493 _wrap_py_return_val =
PMPI_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status);
496 return _wrap_py_return_val;
502 int _wrap_py_return_val = 0;
506 nvtxEventAttributes_t eventAttrib = {0};
507 eventAttrib.version = NVTX_VERSION;
508 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
509 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
510 eventAttrib.message.ascii =
"MPI_Barrier";
511 eventAttrib.category = 999;
512 eventAttrib.colorType = NVTX_COLOR_ARGB; \
513 eventAttrib.color = 0xffffaa00; \
515 nvtxRangePushEx(&eventAttrib);
519 return _wrap_py_return_val;
525 int _wrap_py_return_val = 0;
529 nvtxEventAttributes_t eventAttrib = {0};
530 eventAttrib.version = NVTX_VERSION;
531 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
532 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
533 eventAttrib.message.ascii =
"MPI_Start";
534 eventAttrib.category = 999;
535 eventAttrib.colorType = NVTX_COLOR_ARGB; \
536 eventAttrib.color = 0xffffaa00; \
538 nvtxRangePushEx(&eventAttrib);
542 return _wrap_py_return_val;
548 int _wrap_py_return_val = 0;
549 if (in_wrapper)
return PMPI_Test(request, flag, status);
552 nvtxEventAttributes_t eventAttrib = {0};
553 eventAttrib.version = NVTX_VERSION;
554 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
555 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
556 eventAttrib.message.ascii =
"MPI_Test";
557 eventAttrib.category = 999;
558 eventAttrib.colorType = NVTX_COLOR_ARGB; \
559 eventAttrib.color = 0xffffaa00; \
561 nvtxRangePushEx(&eventAttrib);
562 _wrap_py_return_val =
PMPI_Test(request, flag, status);
565 return _wrap_py_return_val;
569 _EXTERN_C_ int PMPI_Send_init(
const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm, MPI_Request *request);
570 _EXTERN_C_ int MPI_Send_init(
const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm, MPI_Request *request) {
571 int _wrap_py_return_val = 0;
572 if (in_wrapper)
return PMPI_Send_init(buf, count, datatype, dest, tag, comm, request);
575 nvtxEventAttributes_t eventAttrib = {0};
576 eventAttrib.version = NVTX_VERSION;
577 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
578 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
579 eventAttrib.message.ascii =
"MPI_Send_init";
580 eventAttrib.category = 999;
581 eventAttrib.colorType = NVTX_COLOR_ARGB; \
582 eventAttrib.color = 0xffffaa00; \
584 nvtxRangePushEx(&eventAttrib);
585 _wrap_py_return_val =
PMPI_Send_init(buf, count, datatype, dest, tag, comm, request);
588 return _wrap_py_return_val;
592 _EXTERN_C_ int PMPI_Recv_init(
void *buf,
int count, MPI_Datatype datatype,
int source,
int tag, MPI_Comm comm, MPI_Request *request);
593 _EXTERN_C_ int MPI_Recv_init(
void *buf,
int count, MPI_Datatype datatype,
int source,
int tag, MPI_Comm comm, MPI_Request *request) {
594 int _wrap_py_return_val = 0;
595 if (in_wrapper)
return PMPI_Recv_init(buf, count, datatype, source, tag, comm, request);
598 nvtxEventAttributes_t eventAttrib = {0};
599 eventAttrib.version = NVTX_VERSION;
600 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
601 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
602 eventAttrib.message.ascii =
"MPI_Recv_init";
603 eventAttrib.category = 999;
604 eventAttrib.colorType = NVTX_COLOR_ARGB; \
605 eventAttrib.color = 0xffffaa00; \
607 nvtxRangePushEx(&eventAttrib);
608 _wrap_py_return_val =
PMPI_Recv_init(buf, count, datatype, source, tag, comm, request);
611 return _wrap_py_return_val;
_EXTERN_C_ void pmpi_init(MPI_Fint *ierr)
_EXTERN_C_ int MPI_Start(MPI_Request *request)
_EXTERN_C_ int PMPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status)
_EXTERN_C_ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int PMPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request)
_EXTERN_C_ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Init(int *argc, char ***argv)
_EXTERN_C_ int PMPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int PMPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
_EXTERN_C_ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *index, MPI_Status *status)
_EXTERN_C_ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int PMPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int PMPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm)
_EXTERN_C_ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
_EXTERN_C_ int PMPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[])
_EXTERN_C_ int PMPI_Alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int PMPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request)
_EXTERN_C_ void PMPI_INIT(MPI_Fint *ierr)
_EXTERN_C_ int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
_EXTERN_C_ int PMPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm)
_EXTERN_C_ int PMPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
_EXTERN_C_ int PMPI_Test(MPI_Request *request, int *flag, MPI_Status *status)
_EXTERN_C_ int MPI_Wait(MPI_Request *request, MPI_Status *status)
_EXTERN_C_ int PMPI_Init(int *argc, char ***argv)
_EXTERN_C_ int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status *array_of_statuses)
_EXTERN_C_ int PMPI_Waitany(int count, MPI_Request array_of_requests[], int *index, MPI_Status *status)
_EXTERN_C_ int PMPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int PMPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status)
_EXTERN_C_ int PMPI_Start(MPI_Request *request)
_EXTERN_C_ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)
_EXTERN_C_ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)
_EXTERN_C_ int PMPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int PMPI_Wait(MPI_Request *request, MPI_Status *status)
_EXTERN_C_ int MPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[])
_EXTERN_C_ int PMPI_Barrier(MPI_Comm comm)
_EXTERN_C_ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
_EXTERN_C_ int PMPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
_EXTERN_C_ void pmpi_init_(MPI_Fint *ierr)
_EXTERN_C_ int PMPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
_EXTERN_C_ void pmpi_init__(MPI_Fint *ierr)
_EXTERN_C_ int MPI_Alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm)
_EXTERN_C_ int PMPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status *array_of_statuses)
_EXTERN_C_ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
_EXTERN_C_ int MPI_Barrier(MPI_Comm comm)
_EXTERN_C_ int PMPI_Scatterv(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Scatterv(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
_EXTERN_C_ int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status)