Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MPI_Inst.c
Go to the documentation of this file.
1 /* ############################ MALP License ############################## */
2 /* # Fri Jan 18 14:00:00 CET 2013 # */
3 /* # Copyright or (C) or Copr. Commissariat a l'Energie Atomique # */
4 /* # # */
5 /* # This software is governed by the CeCILL-C license under French law # */
6 /* # and abiding by the rules of distribution of free software. You can # */
7 /* # use, modify and/ or redistribute the software under the terms of # */
8 /* # the CeCILL-C license as circulated by CEA, CNRS and INRIA at the # */
9 /* # following URL http://www.cecill.info. # */
10 /* # # */
11 /* # The fact that you are presently reading this means that you have # */
12 /* # had knowledge of the CeCILL-C license and that you accept its # */
13 /* # terms. # */
14 /* # # */
15 /* # Authors: # */
16 /* # - BESNARD Jean-Baptiste jean-baptiste.besnard@cea.fr # */
17 /* # # */
18 /* ######################################################################## */
19 #include <VMPI.h>
20 #include "VMPI_Wrap.h"
21 #include "MPI_Events.h"
22 #include "MPI_Inst.h"
23 #include "Event_Desc.h"
24 #include "Timer.h"
25 #include "Event_Pack.h"
26 #include "Stream_MGR.h"
27 #include "OTF_Event_forge.h"
28 #include "Posix_Profile.h"
29 #include "MALP_Config.h"
30 
31 #include <mpi.h>
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <string.h>
35 
36 #define PRINT_NAME( a ) printf( #a"\n");
37 #define SET_SOURCE( a ) _container.event.mpi_event.source = a;
38 #define SET_DEST( a ) _container.event.mpi_event.dest = a;
39 #define SET_TAG( a ) _container.event.mpi_event.tag = a;
40 #define SET_COUNT( a ) _container.event.mpi_event.count = a;
41 #define SET_COMM( a ) _container.event.mpi_event.comm = (uint64_t)a;
42 #define SET_DATATYPE( a ) _container.event.mpi_event.datatype = (uint64_t)a;
43 #define COMP_SIZE( a ) PMPI_Type_size( datatype ,&_size); \
44  _size *= a;
45 
46 int MPI_Abort( MPI_Comm comm, int errorcode )
47 {
48 
49  /* Virtualize MPI */
50  MACRO_MPI_Comm (comm)
51 
52  /* Pre instrum */
53  int _rank = Stream_desc_get()->mpi_rank;
54 
55  struct MALP_Trace_Event _container;
56 
57  /********************************/
58  /* FILL MPI EVENT */
59  /********************************/
60 
61  _container.event.mpi_event.type =
62  T_MPI_ENUM(MPI_ABORT)
63  ;
64 
65  /* Set default source & dest before override */
66  _container.event.mpi_event.source = _rank;
67  _container.event.mpi_event.dest = _rank;
68 
69 
70 
71 
72 
73 
74  SET_COMM (comm)
75 
76  /* Fill in size informations if needed */
77  int _size = 0;
78  #if 0
79 
80  #endif
81  _container.event.mpi_event.size = _size;
82 
83  /********************************/
84  /* EMIT OTF ENTER */
85  /********************************/
86 
87  struct MALP_Trace_Event otf_event;
88 
89  uint64_t _begin = Timer_tsc ();
90 
93  {
94 
95  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
96  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
97  MALP_EVENT_MPI, _container.event.mpi_event.type );
98  Event_Packer_push(&otf_event);
99  }
100 
101  /********************************/
102  /* ACTUAL FUNCTION CALL */
103  /********************************/
104 
106  int ret = PMPI_Abort( comm, errorcode );
108 
109  /********************************/
110  /* EMIT OTF END */
111  /********************************/
112 
113  uint64_t _end = Timer_tsc();
114  uint64_t _duration = _end - _begin;
115 
117  {
119  {
120 
121  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
122  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
123  MALP_EVENT_MPI, _container.event.mpi_event.type );
124 
125 
126  Event_Packer_push(&otf_event);
127  }
128 
129  /********************************/
130  /* EMIT MALP EVENT */
131  /********************************/
132 
133  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
134 
135  /* Submit event if MPI instrumented */
136  Event_Packer_push(&_container);
137  }
138 
139 
140  return ret;
141 }
142 int MPI_Accumulate( void * origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win )
143 {
144 
145  /* Virtualize MPI */
146 
147 
148  /* Pre instrum */
149  int _rank = Stream_desc_get()->mpi_rank;
150 
151  struct MALP_Trace_Event _container;
152 
153  /********************************/
154  /* FILL MPI EVENT */
155  /********************************/
156 
157  _container.event.mpi_event.type =
158  T_MPI_ENUM(MPI_ACCUMULATE)
159  ;
160 
161  /* Set default source & dest before override */
162  _container.event.mpi_event.source = _rank;
163  _container.event.mpi_event.dest = _rank;
164 
165 
166 
167 
168 
169 
170 
171 
172  /* Fill in size informations if needed */
173  int _size = 0;
174  #if 0
175 
176  #endif
177  _container.event.mpi_event.size = _size;
178 
179  /********************************/
180  /* EMIT OTF ENTER */
181  /********************************/
182 
183  struct MALP_Trace_Event otf_event;
184 
185  uint64_t _begin = Timer_tsc ();
186 
189  {
190 
191  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
192  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
193  MALP_EVENT_MPI, _container.event.mpi_event.type );
194  Event_Packer_push(&otf_event);
195  }
196 
197  /********************************/
198  /* ACTUAL FUNCTION CALL */
199  /********************************/
200 
202  int ret = PMPI_Accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win );
204 
205  /********************************/
206  /* EMIT OTF END */
207  /********************************/
208 
209  uint64_t _end = Timer_tsc();
210  uint64_t _duration = _end - _begin;
211 
213  {
215  {
216 
217  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
218  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
219  MALP_EVENT_MPI, _container.event.mpi_event.type );
220 
221 
222  Event_Packer_push(&otf_event);
223  }
224 
225  /********************************/
226  /* EMIT MALP EVENT */
227  /********************************/
228 
229  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
230 
231  /* Submit event if MPI instrumented */
232  Event_Packer_push(&_container);
233  }
234 
235 
236  return ret;
237 }
238 int MPI_Add_error_class( int * errorclass )
239 {
240 
241  /* Virtualize MPI */
242 
243 
244  /* Pre instrum */
245  int _rank = Stream_desc_get()->mpi_rank;
246 
247  struct MALP_Trace_Event _container;
248 
249  /********************************/
250  /* FILL MPI EVENT */
251  /********************************/
252 
253  _container.event.mpi_event.type =
254  T_MPI_ENUM(MPI_ADD_ERROR_CLASS)
255  ;
256 
257  /* Set default source & dest before override */
258  _container.event.mpi_event.source = _rank;
259  _container.event.mpi_event.dest = _rank;
260 
261 
262 
263 
264 
265 
266 
267 
268  /* Fill in size informations if needed */
269  int _size = 0;
270  #if 0
271 
272  #endif
273  _container.event.mpi_event.size = _size;
274 
275  /********************************/
276  /* EMIT OTF ENTER */
277  /********************************/
278 
279  struct MALP_Trace_Event otf_event;
280 
281  uint64_t _begin = Timer_tsc ();
282 
285  {
286 
287  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
288  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
289  MALP_EVENT_MPI, _container.event.mpi_event.type );
290  Event_Packer_push(&otf_event);
291  }
292 
293  /********************************/
294  /* ACTUAL FUNCTION CALL */
295  /********************************/
296 
298  int ret = PMPI_Add_error_class( errorclass );
300 
301  /********************************/
302  /* EMIT OTF END */
303  /********************************/
304 
305  uint64_t _end = Timer_tsc();
306  uint64_t _duration = _end - _begin;
307 
309  {
311  {
312 
313  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
314  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
315  MALP_EVENT_MPI, _container.event.mpi_event.type );
316 
317 
318  Event_Packer_push(&otf_event);
319  }
320 
321  /********************************/
322  /* EMIT MALP EVENT */
323  /********************************/
324 
325  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
326 
327  /* Submit event if MPI instrumented */
328  Event_Packer_push(&_container);
329  }
330 
331 
332  return ret;
333 }
334 int MPI_Add_error_code( int errorclass, int * errorcode )
335 {
336 
337  /* Virtualize MPI */
338 
339 
340  /* Pre instrum */
341  int _rank = Stream_desc_get()->mpi_rank;
342 
343  struct MALP_Trace_Event _container;
344 
345  /********************************/
346  /* FILL MPI EVENT */
347  /********************************/
348 
349  _container.event.mpi_event.type =
350  T_MPI_ENUM(MPI_ADD_ERROR_CODE)
351  ;
352 
353  /* Set default source & dest before override */
354  _container.event.mpi_event.source = _rank;
355  _container.event.mpi_event.dest = _rank;
356 
357 
358 
359 
360 
361 
362 
363 
364  /* Fill in size informations if needed */
365  int _size = 0;
366  #if 0
367 
368  #endif
369  _container.event.mpi_event.size = _size;
370 
371  /********************************/
372  /* EMIT OTF ENTER */
373  /********************************/
374 
375  struct MALP_Trace_Event otf_event;
376 
377  uint64_t _begin = Timer_tsc ();
378 
381  {
382 
383  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
384  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
385  MALP_EVENT_MPI, _container.event.mpi_event.type );
386  Event_Packer_push(&otf_event);
387  }
388 
389  /********************************/
390  /* ACTUAL FUNCTION CALL */
391  /********************************/
392 
394  int ret = PMPI_Add_error_code( errorclass, errorcode );
396 
397  /********************************/
398  /* EMIT OTF END */
399  /********************************/
400 
401  uint64_t _end = Timer_tsc();
402  uint64_t _duration = _end - _begin;
403 
405  {
407  {
408 
409  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
410  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
411  MALP_EVENT_MPI, _container.event.mpi_event.type );
412 
413 
414  Event_Packer_push(&otf_event);
415  }
416 
417  /********************************/
418  /* EMIT MALP EVENT */
419  /********************************/
420 
421  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
422 
423  /* Submit event if MPI instrumented */
424  Event_Packer_push(&_container);
425  }
426 
427 
428  return ret;
429 }
430 int MPI_Add_error_string( int errorcode, char * string )
431 {
432 
433  /* Virtualize MPI */
434 
435 
436  /* Pre instrum */
437  int _rank = Stream_desc_get()->mpi_rank;
438 
439  struct MALP_Trace_Event _container;
440 
441  /********************************/
442  /* FILL MPI EVENT */
443  /********************************/
444 
445  _container.event.mpi_event.type =
446  T_MPI_ENUM(MPI_ADD_ERROR_STRING)
447  ;
448 
449  /* Set default source & dest before override */
450  _container.event.mpi_event.source = _rank;
451  _container.event.mpi_event.dest = _rank;
452 
453 
454 
455 
456 
457 
458 
459 
460  /* Fill in size informations if needed */
461  int _size = 0;
462  #if 0
463 
464  #endif
465  _container.event.mpi_event.size = _size;
466 
467  /********************************/
468  /* EMIT OTF ENTER */
469  /********************************/
470 
471  struct MALP_Trace_Event otf_event;
472 
473  uint64_t _begin = Timer_tsc ();
474 
477  {
478 
479  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
480  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
481  MALP_EVENT_MPI, _container.event.mpi_event.type );
482  Event_Packer_push(&otf_event);
483  }
484 
485  /********************************/
486  /* ACTUAL FUNCTION CALL */
487  /********************************/
488 
490  int ret = PMPI_Add_error_string( errorcode, string );
492 
493  /********************************/
494  /* EMIT OTF END */
495  /********************************/
496 
497  uint64_t _end = Timer_tsc();
498  uint64_t _duration = _end - _begin;
499 
501  {
503  {
504 
505  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
506  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
507  MALP_EVENT_MPI, _container.event.mpi_event.type );
508 
509 
510  Event_Packer_push(&otf_event);
511  }
512 
513  /********************************/
514  /* EMIT MALP EVENT */
515  /********************************/
516 
517  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
518 
519  /* Submit event if MPI instrumented */
520  Event_Packer_push(&_container);
521  }
522 
523 
524  return ret;
525 }
526 int MPI_Address( void * location, MPI_Aint * address )
527 {
528 
529  /* Virtualize MPI */
530 
531 
532  /* Pre instrum */
533  int _rank = Stream_desc_get()->mpi_rank;
534 
535  struct MALP_Trace_Event _container;
536 
537  /********************************/
538  /* FILL MPI EVENT */
539  /********************************/
540 
541  _container.event.mpi_event.type =
542  T_MPI_ENUM(MPI_ADDRESS)
543  ;
544 
545  /* Set default source & dest before override */
546  _container.event.mpi_event.source = _rank;
547  _container.event.mpi_event.dest = _rank;
548 
549 
550 
551 
552 
553 
554 
555 
556  /* Fill in size informations if needed */
557  int _size = 0;
558  #if 0
559 
560  #endif
561  _container.event.mpi_event.size = _size;
562 
563  /********************************/
564  /* EMIT OTF ENTER */
565  /********************************/
566 
567  struct MALP_Trace_Event otf_event;
568 
569  uint64_t _begin = Timer_tsc ();
570 
573  {
574 
575  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
576  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
577  MALP_EVENT_MPI, _container.event.mpi_event.type );
578  Event_Packer_push(&otf_event);
579  }
580 
581  /********************************/
582  /* ACTUAL FUNCTION CALL */
583  /********************************/
584 
586  int ret = PMPI_Address( location, address );
588 
589  /********************************/
590  /* EMIT OTF END */
591  /********************************/
592 
593  uint64_t _end = Timer_tsc();
594  uint64_t _duration = _end - _begin;
595 
597  {
599  {
600 
601  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
602  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
603  MALP_EVENT_MPI, _container.event.mpi_event.type );
604 
605 
606  Event_Packer_push(&otf_event);
607  }
608 
609  /********************************/
610  /* EMIT MALP EVENT */
611  /********************************/
612 
613  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
614 
615  /* Submit event if MPI instrumented */
616  Event_Packer_push(&_container);
617  }
618 
619 
620  return ret;
621 }
622 int MPI_Allgather( void * sendbuf, int sendcount, MPI_Datatype sendtype, void * recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm )
623 {
624 
625  /* Virtualize MPI */
626  MACRO_MPI_Comm (comm)
627 
628  /* Pre instrum */
629  int _rank = Stream_desc_get()->mpi_rank;
630 
631  struct MALP_Trace_Event _container;
632 
633  /********************************/
634  /* FILL MPI EVENT */
635  /********************************/
636 
637  _container.event.mpi_event.type =
638  T_MPI_ENUM(MPI_ALLGATHER)
639  ;
640 
641  /* Set default source & dest before override */
642  _container.event.mpi_event.source = _rank;
643  _container.event.mpi_event.dest = _rank;
644 
645 
646 
647 
648 
649 
650  SET_COMM (comm)
651 
652  /* Fill in size informations if needed */
653  int _size = 0;
654  #if 0
655 
656  #endif
657  _container.event.mpi_event.size = _size;
658 
659  /********************************/
660  /* EMIT OTF ENTER */
661  /********************************/
662 
663  struct MALP_Trace_Event otf_event;
664 
665  uint64_t _begin = Timer_tsc ();
666 
669  {
670 
671  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
672  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
673  MALP_EVENT_MPI, _container.event.mpi_event.type );
674  Event_Packer_push(&otf_event);
675  }
676 
677  /********************************/
678  /* ACTUAL FUNCTION CALL */
679  /********************************/
680 
682  int ret = PMPI_Allgather( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm );
684 
685  /********************************/
686  /* EMIT OTF END */
687  /********************************/
688 
689  uint64_t _end = Timer_tsc();
690  uint64_t _duration = _end - _begin;
691 
693  {
695  {
696 
697  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
698  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
699  MALP_EVENT_MPI, _container.event.mpi_event.type );
700 
701 
702  Event_Packer_push(&otf_event);
703  }
704 
705  /********************************/
706  /* EMIT MALP EVENT */
707  /********************************/
708 
709  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
710 
711  /* Submit event if MPI instrumented */
712  Event_Packer_push(&_container);
713  }
714 
715 
716  return ret;
717 }
718 int MPI_Allgatherv( void * sendbuf, int sendcount, MPI_Datatype sendtype, void * recvbuf, int * recvcounts, int * displs, MPI_Datatype recvtype, MPI_Comm comm )
719 {
720 
721  /* Virtualize MPI */
722  MACRO_MPI_Comm (comm)
723 
724  /* Pre instrum */
725  int _rank = Stream_desc_get()->mpi_rank;
726 
727  struct MALP_Trace_Event _container;
728 
729  /********************************/
730  /* FILL MPI EVENT */
731  /********************************/
732 
733  _container.event.mpi_event.type =
734  T_MPI_ENUM(MPI_ALLGATHERV)
735  ;
736 
737  /* Set default source & dest before override */
738  _container.event.mpi_event.source = _rank;
739  _container.event.mpi_event.dest = _rank;
740 
741 
742 
743 
744 
745 
746  SET_COMM (comm)
747 
748  /* Fill in size informations if needed */
749  int _size = 0;
750  #if 0
751 
752  #endif
753  _container.event.mpi_event.size = _size;
754 
755  /********************************/
756  /* EMIT OTF ENTER */
757  /********************************/
758 
759  struct MALP_Trace_Event otf_event;
760 
761  uint64_t _begin = Timer_tsc ();
762 
765  {
766 
767  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
768  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
769  MALP_EVENT_MPI, _container.event.mpi_event.type );
770  Event_Packer_push(&otf_event);
771  }
772 
773  /********************************/
774  /* ACTUAL FUNCTION CALL */
775  /********************************/
776 
778  int ret = PMPI_Allgatherv( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm );
780 
781  /********************************/
782  /* EMIT OTF END */
783  /********************************/
784 
785  uint64_t _end = Timer_tsc();
786  uint64_t _duration = _end - _begin;
787 
789  {
791  {
792 
793  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
794  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
795  MALP_EVENT_MPI, _container.event.mpi_event.type );
796 
797 
798  Event_Packer_push(&otf_event);
799  }
800 
801  /********************************/
802  /* EMIT MALP EVENT */
803  /********************************/
804 
805  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
806 
807  /* Submit event if MPI instrumented */
808  Event_Packer_push(&_container);
809  }
810 
811 
812  return ret;
813 }
814 int MPI_Alloc_mem( MPI_Aint size, MPI_Info info, void * baseptr )
815 {
816 
817  /* Virtualize MPI */
818 
819 
820  /* Pre instrum */
821  int _rank = Stream_desc_get()->mpi_rank;
822 
823  struct MALP_Trace_Event _container;
824 
825  /********************************/
826  /* FILL MPI EVENT */
827  /********************************/
828 
829  _container.event.mpi_event.type =
830  T_MPI_ENUM(MPI_ALLOC_MEM)
831  ;
832 
833  /* Set default source & dest before override */
834  _container.event.mpi_event.source = _rank;
835  _container.event.mpi_event.dest = _rank;
836 
837 
838 
839 
840 
841 
842 
843 
844  /* Fill in size informations if needed */
845  int _size = 0;
846  #if 0
847 
848  #endif
849  _container.event.mpi_event.size = _size;
850 
851  /********************************/
852  /* EMIT OTF ENTER */
853  /********************************/
854 
855  struct MALP_Trace_Event otf_event;
856 
857  uint64_t _begin = Timer_tsc ();
858 
861  {
862 
863  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
864  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
865  MALP_EVENT_MPI, _container.event.mpi_event.type );
866  Event_Packer_push(&otf_event);
867  }
868 
869  /********************************/
870  /* ACTUAL FUNCTION CALL */
871  /********************************/
872 
874  int ret = PMPI_Alloc_mem( size, info, baseptr );
876 
877  /********************************/
878  /* EMIT OTF END */
879  /********************************/
880 
881  uint64_t _end = Timer_tsc();
882  uint64_t _duration = _end - _begin;
883 
885  {
887  {
888 
889  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
890  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
891  MALP_EVENT_MPI, _container.event.mpi_event.type );
892 
893 
894  Event_Packer_push(&otf_event);
895  }
896 
897  /********************************/
898  /* EMIT MALP EVENT */
899  /********************************/
900 
901  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
902 
903  /* Submit event if MPI instrumented */
904  Event_Packer_push(&_container);
905  }
906 
907 
908  return ret;
909 }
910 int MPI_Allreduce( void * sendbuf, void * recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm )
911 {
912 
913  /* Virtualize MPI */
914  MACRO_MPI_Comm (comm)
915 
916  /* Pre instrum */
917  int _rank = Stream_desc_get()->mpi_rank;
918 
919  struct MALP_Trace_Event _container;
920 
921  /********************************/
922  /* FILL MPI EVENT */
923  /********************************/
924 
925  _container.event.mpi_event.type =
926  T_MPI_ENUM(MPI_ALLREDUCE)
927  ;
928 
929  /* Set default source & dest before override */
930  _container.event.mpi_event.source = _rank;
931  _container.event.mpi_event.dest = _rank;
932 
933 
934 
935 
936  SET_COUNT (count)
937  SET_DATATYPE (datatype)
938  SET_COMM (comm)
939 
940  /* Fill in size informations if needed */
941  int _size = 0;
942  #if 1
943  COMP_SIZE (count)
944  #endif
945  _container.event.mpi_event.size = _size;
946 
947  /********************************/
948  /* EMIT OTF ENTER */
949  /********************************/
950 
951  struct MALP_Trace_Event otf_event;
952 
953  uint64_t _begin = Timer_tsc ();
954 
957  {
958 
959  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
960  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
961  MALP_EVENT_MPI, _container.event.mpi_event.type );
962  Event_Packer_push(&otf_event);
963  }
964 
965  /********************************/
966  /* ACTUAL FUNCTION CALL */
967  /********************************/
968 
970  int ret = PMPI_Allreduce( sendbuf, recvbuf, count, datatype, op, comm );
972 
973  /********************************/
974  /* EMIT OTF END */
975  /********************************/
976 
977  uint64_t _end = Timer_tsc();
978  uint64_t _duration = _end - _begin;
979 
981  {
983  {
984 
985  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
986  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
987  MALP_EVENT_MPI, _container.event.mpi_event.type );
988 
989 
990  Event_Packer_push(&otf_event);
991  }
992 
993  /********************************/
994  /* EMIT MALP EVENT */
995  /********************************/
996 
997  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
998 
999  /* Submit event if MPI instrumented */
1000  Event_Packer_push(&_container);
1001  }
1002 
1003 
1004  return ret;
1005 }
1006 int MPI_Alltoall( void * sendbuf, int sendcount, MPI_Datatype sendtype, void * recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm )
1007 {
1008 
1009  /* Virtualize MPI */
1010  MACRO_MPI_Comm (comm)
1011 
1012  /* Pre instrum */
1013  int _rank = Stream_desc_get()->mpi_rank;
1014 
1015  struct MALP_Trace_Event _container;
1016 
1017  /********************************/
1018  /* FILL MPI EVENT */
1019  /********************************/
1020 
1021  _container.event.mpi_event.type =
1022  T_MPI_ENUM(MPI_ALLTOALL)
1023  ;
1024 
1025  /* Set default source & dest before override */
1026  _container.event.mpi_event.source = _rank;
1027  _container.event.mpi_event.dest = _rank;
1028 
1029 
1030 
1031 
1032 
1033 
1034  SET_COMM (comm)
1035 
1036  /* Fill in size informations if needed */
1037  int _size = 0;
1038  #if 0
1039 
1040  #endif
1041  _container.event.mpi_event.size = _size;
1042 
1043  /********************************/
1044  /* EMIT OTF ENTER */
1045  /********************************/
1046 
1047  struct MALP_Trace_Event otf_event;
1048 
1049  uint64_t _begin = Timer_tsc ();
1050 
1053  {
1054 
1055  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1056  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1057  MALP_EVENT_MPI, _container.event.mpi_event.type );
1058  Event_Packer_push(&otf_event);
1059  }
1060 
1061  /********************************/
1062  /* ACTUAL FUNCTION CALL */
1063  /********************************/
1064 
1066  int ret = PMPI_Alltoall( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm );
1068 
1069  /********************************/
1070  /* EMIT OTF END */
1071  /********************************/
1072 
1073  uint64_t _end = Timer_tsc();
1074  uint64_t _duration = _end - _begin;
1075 
1077  {
1079  {
1080 
1081  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1082  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1083  MALP_EVENT_MPI, _container.event.mpi_event.type );
1084 
1085 
1086  Event_Packer_push(&otf_event);
1087  }
1088 
1089  /********************************/
1090  /* EMIT MALP EVENT */
1091  /********************************/
1092 
1093  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1094 
1095  /* Submit event if MPI instrumented */
1096  Event_Packer_push(&_container);
1097  }
1098 
1099 
1100  return ret;
1101 }
1102 int MPI_Alltoallv( void * sendbuf, int * sendcounts, int * sdispls, MPI_Datatype sendtype, void * recvbuf, int * recvcounts, int * rdispls, MPI_Datatype recvtype, MPI_Comm comm )
1103 {
1104 
1105  /* Virtualize MPI */
1106  MACRO_MPI_Comm (comm)
1107 
1108  /* Pre instrum */
1109  int _rank = Stream_desc_get()->mpi_rank;
1110 
1111  struct MALP_Trace_Event _container;
1112 
1113  /********************************/
1114  /* FILL MPI EVENT */
1115  /********************************/
1116 
1117  _container.event.mpi_event.type =
1118  T_MPI_ENUM(MPI_ALLTOALLV)
1119  ;
1120 
1121  /* Set default source & dest before override */
1122  _container.event.mpi_event.source = _rank;
1123  _container.event.mpi_event.dest = _rank;
1124 
1125 
1126 
1127 
1128 
1129 
1130  SET_COMM (comm)
1131 
1132  /* Fill in size informations if needed */
1133  int _size = 0;
1134  #if 0
1135 
1136  #endif
1137  _container.event.mpi_event.size = _size;
1138 
1139  /********************************/
1140  /* EMIT OTF ENTER */
1141  /********************************/
1142 
1143  struct MALP_Trace_Event otf_event;
1144 
1145  uint64_t _begin = Timer_tsc ();
1146 
1149  {
1150 
1151  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1152  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1153  MALP_EVENT_MPI, _container.event.mpi_event.type );
1154  Event_Packer_push(&otf_event);
1155  }
1156 
1157  /********************************/
1158  /* ACTUAL FUNCTION CALL */
1159  /********************************/
1160 
1162  int ret = PMPI_Alltoallv( sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm );
1164 
1165  /********************************/
1166  /* EMIT OTF END */
1167  /********************************/
1168 
1169  uint64_t _end = Timer_tsc();
1170  uint64_t _duration = _end - _begin;
1171 
1173  {
1175  {
1176 
1177  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1178  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1179  MALP_EVENT_MPI, _container.event.mpi_event.type );
1180 
1181 
1182  Event_Packer_push(&otf_event);
1183  }
1184 
1185  /********************************/
1186  /* EMIT MALP EVENT */
1187  /********************************/
1188 
1189  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1190 
1191  /* Submit event if MPI instrumented */
1192  Event_Packer_push(&_container);
1193  }
1194 
1195 
1196  return ret;
1197 }
1198 int MPI_Alltoallw( void * sendbuf, int * sendcounts, int * sdispls, MPI_Datatype * sendtypes, void * recvbuf, int * recvcounts, int * rdispls, MPI_Datatype * recvtypes, MPI_Comm comm )
1199 {
1200 
1201  /* Virtualize MPI */
1202  MACRO_MPI_Comm (comm)
1203 
1204  /* Pre instrum */
1205  int _rank = Stream_desc_get()->mpi_rank;
1206 
1207  struct MALP_Trace_Event _container;
1208 
1209  /********************************/
1210  /* FILL MPI EVENT */
1211  /********************************/
1212 
1213  _container.event.mpi_event.type =
1214  T_MPI_ENUM(MPI_ALLTOALLW)
1215  ;
1216 
1217  /* Set default source & dest before override */
1218  _container.event.mpi_event.source = _rank;
1219  _container.event.mpi_event.dest = _rank;
1220 
1221 
1222 
1223 
1224 
1225 
1226  SET_COMM (comm)
1227 
1228  /* Fill in size informations if needed */
1229  int _size = 0;
1230  #if 0
1231 
1232  #endif
1233  _container.event.mpi_event.size = _size;
1234 
1235  /********************************/
1236  /* EMIT OTF ENTER */
1237  /********************************/
1238 
1239  struct MALP_Trace_Event otf_event;
1240 
1241  uint64_t _begin = Timer_tsc ();
1242 
1245  {
1246 
1247  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1248  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1249  MALP_EVENT_MPI, _container.event.mpi_event.type );
1250  Event_Packer_push(&otf_event);
1251  }
1252 
1253  /********************************/
1254  /* ACTUAL FUNCTION CALL */
1255  /********************************/
1256 
1258  int ret = PMPI_Alltoallw( sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm );
1260 
1261  /********************************/
1262  /* EMIT OTF END */
1263  /********************************/
1264 
1265  uint64_t _end = Timer_tsc();
1266  uint64_t _duration = _end - _begin;
1267 
1269  {
1271  {
1272 
1273  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1274  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1275  MALP_EVENT_MPI, _container.event.mpi_event.type );
1276 
1277 
1278  Event_Packer_push(&otf_event);
1279  }
1280 
1281  /********************************/
1282  /* EMIT MALP EVENT */
1283  /********************************/
1284 
1285  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1286 
1287  /* Submit event if MPI instrumented */
1288  Event_Packer_push(&_container);
1289  }
1290 
1291 
1292  return ret;
1293 }
1294 int MPI_Attr_delete( MPI_Comm comm, int keyval )
1295 {
1296 
1297  /* Virtualize MPI */
1298  MACRO_MPI_Comm (comm)
1299 
1300  /* Pre instrum */
1301  int _rank = Stream_desc_get()->mpi_rank;
1302 
1303  struct MALP_Trace_Event _container;
1304 
1305  /********************************/
1306  /* FILL MPI EVENT */
1307  /********************************/
1308 
1309  _container.event.mpi_event.type =
1310  T_MPI_ENUM(MPI_ATTR_DELETE)
1311  ;
1312 
1313  /* Set default source & dest before override */
1314  _container.event.mpi_event.source = _rank;
1315  _container.event.mpi_event.dest = _rank;
1316 
1317 
1318 
1319 
1320 
1321 
1322  SET_COMM (comm)
1323 
1324  /* Fill in size informations if needed */
1325  int _size = 0;
1326  #if 0
1327 
1328  #endif
1329  _container.event.mpi_event.size = _size;
1330 
1331  /********************************/
1332  /* EMIT OTF ENTER */
1333  /********************************/
1334 
1335  struct MALP_Trace_Event otf_event;
1336 
1337  uint64_t _begin = Timer_tsc ();
1338 
1341  {
1342 
1343  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1344  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1345  MALP_EVENT_MPI, _container.event.mpi_event.type );
1346  Event_Packer_push(&otf_event);
1347  }
1348 
1349  /********************************/
1350  /* ACTUAL FUNCTION CALL */
1351  /********************************/
1352 
1354  int ret = PMPI_Attr_delete( comm, keyval );
1356 
1357  /********************************/
1358  /* EMIT OTF END */
1359  /********************************/
1360 
1361  uint64_t _end = Timer_tsc();
1362  uint64_t _duration = _end - _begin;
1363 
1365  {
1367  {
1368 
1369  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1370  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1371  MALP_EVENT_MPI, _container.event.mpi_event.type );
1372 
1373 
1374  Event_Packer_push(&otf_event);
1375  }
1376 
1377  /********************************/
1378  /* EMIT MALP EVENT */
1379  /********************************/
1380 
1381  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1382 
1383  /* Submit event if MPI instrumented */
1384  Event_Packer_push(&_container);
1385  }
1386 
1387 
1388  return ret;
1389 }
1390 int MPI_Attr_get( MPI_Comm comm, int keyval, void * attribute_val, int * flag )
1391 {
1392 
1393  /* Virtualize MPI */
1394  MACRO_MPI_Comm (comm)
1395 
1396  /* Pre instrum */
1397  int _rank = Stream_desc_get()->mpi_rank;
1398 
1399  struct MALP_Trace_Event _container;
1400 
1401  /********************************/
1402  /* FILL MPI EVENT */
1403  /********************************/
1404 
1405  _container.event.mpi_event.type =
1406  T_MPI_ENUM(MPI_ATTR_GET)
1407  ;
1408 
1409  /* Set default source & dest before override */
1410  _container.event.mpi_event.source = _rank;
1411  _container.event.mpi_event.dest = _rank;
1412 
1413 
1414 
1415 
1416 
1417 
1418  SET_COMM (comm)
1419 
1420  /* Fill in size informations if needed */
1421  int _size = 0;
1422  #if 0
1423 
1424  #endif
1425  _container.event.mpi_event.size = _size;
1426 
1427  /********************************/
1428  /* EMIT OTF ENTER */
1429  /********************************/
1430 
1431  struct MALP_Trace_Event otf_event;
1432 
1433  uint64_t _begin = Timer_tsc ();
1434 
1437  {
1438 
1439  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1440  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1441  MALP_EVENT_MPI, _container.event.mpi_event.type );
1442  Event_Packer_push(&otf_event);
1443  }
1444 
1445  /********************************/
1446  /* ACTUAL FUNCTION CALL */
1447  /********************************/
1448 
1450  int ret = PMPI_Attr_get( comm, keyval, attribute_val, flag );
1452 
1453  /********************************/
1454  /* EMIT OTF END */
1455  /********************************/
1456 
1457  uint64_t _end = Timer_tsc();
1458  uint64_t _duration = _end - _begin;
1459 
1461  {
1463  {
1464 
1465  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1466  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1467  MALP_EVENT_MPI, _container.event.mpi_event.type );
1468 
1469 
1470  Event_Packer_push(&otf_event);
1471  }
1472 
1473  /********************************/
1474  /* EMIT MALP EVENT */
1475  /********************************/
1476 
1477  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1478 
1479  /* Submit event if MPI instrumented */
1480  Event_Packer_push(&_container);
1481  }
1482 
1483 
1484  return ret;
1485 }
1486 int MPI_Attr_put( MPI_Comm comm, int keyval, void * attribute_val )
1487 {
1488 
1489  /* Virtualize MPI */
1490  MACRO_MPI_Comm (comm)
1491 
1492  /* Pre instrum */
1493  int _rank = Stream_desc_get()->mpi_rank;
1494 
1495  struct MALP_Trace_Event _container;
1496 
1497  /********************************/
1498  /* FILL MPI EVENT */
1499  /********************************/
1500 
1501  _container.event.mpi_event.type =
1502  T_MPI_ENUM(MPI_ATTR_PUT)
1503  ;
1504 
1505  /* Set default source & dest before override */
1506  _container.event.mpi_event.source = _rank;
1507  _container.event.mpi_event.dest = _rank;
1508 
1509 
1510 
1511 
1512 
1513 
1514  SET_COMM (comm)
1515 
1516  /* Fill in size informations if needed */
1517  int _size = 0;
1518  #if 0
1519 
1520  #endif
1521  _container.event.mpi_event.size = _size;
1522 
1523  /********************************/
1524  /* EMIT OTF ENTER */
1525  /********************************/
1526 
1527  struct MALP_Trace_Event otf_event;
1528 
1529  uint64_t _begin = Timer_tsc ();
1530 
1533  {
1534 
1535  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1536  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1537  MALP_EVENT_MPI, _container.event.mpi_event.type );
1538  Event_Packer_push(&otf_event);
1539  }
1540 
1541  /********************************/
1542  /* ACTUAL FUNCTION CALL */
1543  /********************************/
1544 
1546  int ret = PMPI_Attr_put( comm, keyval, attribute_val );
1548 
1549  /********************************/
1550  /* EMIT OTF END */
1551  /********************************/
1552 
1553  uint64_t _end = Timer_tsc();
1554  uint64_t _duration = _end - _begin;
1555 
1557  {
1559  {
1560 
1561  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1562  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1563  MALP_EVENT_MPI, _container.event.mpi_event.type );
1564 
1565 
1566  Event_Packer_push(&otf_event);
1567  }
1568 
1569  /********************************/
1570  /* EMIT MALP EVENT */
1571  /********************************/
1572 
1573  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1574 
1575  /* Submit event if MPI instrumented */
1576  Event_Packer_push(&_container);
1577  }
1578 
1579 
1580  return ret;
1581 }
1582 int MPI_Barrier( MPI_Comm comm )
1583 {
1584 
1585  /* Virtualize MPI */
1586  MACRO_MPI_Comm (comm)
1587 
1588  /* Pre instrum */
1589  int _rank = Stream_desc_get()->mpi_rank;
1590 
1591  struct MALP_Trace_Event _container;
1592 
1593  /********************************/
1594  /* FILL MPI EVENT */
1595  /********************************/
1596 
1597  _container.event.mpi_event.type =
1598  T_MPI_ENUM(MPI_BARRIER)
1599  ;
1600 
1601  /* Set default source & dest before override */
1602  _container.event.mpi_event.source = _rank;
1603  _container.event.mpi_event.dest = _rank;
1604 
1605 
1606 
1607 
1608 
1609 
1610  SET_COMM (comm)
1611 
1612  /* Fill in size informations if needed */
1613  int _size = 0;
1614  #if 0
1615 
1616  #endif
1617  _container.event.mpi_event.size = _size;
1618 
1619  /********************************/
1620  /* EMIT OTF ENTER */
1621  /********************************/
1622 
1623  struct MALP_Trace_Event otf_event;
1624 
1625  uint64_t _begin = Timer_tsc ();
1626 
1629  {
1630 
1631  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1632  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1633  MALP_EVENT_MPI, _container.event.mpi_event.type );
1634  Event_Packer_push(&otf_event);
1635  }
1636 
1637  /********************************/
1638  /* ACTUAL FUNCTION CALL */
1639  /********************************/
1640 
1642  int ret = PMPI_Barrier( comm );
1644 
1645  /********************************/
1646  /* EMIT OTF END */
1647  /********************************/
1648 
1649  uint64_t _end = Timer_tsc();
1650  uint64_t _duration = _end - _begin;
1651 
1653  {
1655  {
1656 
1657  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1658  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1659  MALP_EVENT_MPI, _container.event.mpi_event.type );
1660 
1661 
1662  Event_Packer_push(&otf_event);
1663  }
1664 
1665  /********************************/
1666  /* EMIT MALP EVENT */
1667  /********************************/
1668 
1669  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1670 
1671  /* Submit event if MPI instrumented */
1672  Event_Packer_push(&_container);
1673  }
1674 
1675 
1676  return ret;
1677 }
1678 int MPI_Bcast( void * buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm )
1679 {
1680 
1681  /* Virtualize MPI */
1682  MACRO_MPI_Comm (comm)
1683 
1684  /* Pre instrum */
1685  int _rank = Stream_desc_get()->mpi_rank;
1686 
1687  struct MALP_Trace_Event _container;
1688 
1689  /********************************/
1690  /* FILL MPI EVENT */
1691  /********************************/
1692 
1693  _container.event.mpi_event.type =
1694  T_MPI_ENUM(MPI_BCAST)
1695  ;
1696 
1697  /* Set default source & dest before override */
1698  _container.event.mpi_event.source = _rank;
1699  _container.event.mpi_event.dest = _rank;
1700 
1701 
1702 
1703 
1704  SET_COUNT (count)
1705  SET_DATATYPE (datatype)
1706  SET_COMM (comm)
1707 
1708  /* Fill in size informations if needed */
1709  int _size = 0;
1710  #if 1
1711  COMP_SIZE (count)
1712  #endif
1713  _container.event.mpi_event.size = _size;
1714 
1715  /********************************/
1716  /* EMIT OTF ENTER */
1717  /********************************/
1718 
1719  struct MALP_Trace_Event otf_event;
1720 
1721  uint64_t _begin = Timer_tsc ();
1722 
1725  {
1726 
1727  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1728  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1729  MALP_EVENT_MPI, _container.event.mpi_event.type );
1730  Event_Packer_push(&otf_event);
1731  }
1732 
1733  /********************************/
1734  /* ACTUAL FUNCTION CALL */
1735  /********************************/
1736 
1738  int ret = PMPI_Bcast( buffer, count, datatype, root, comm );
1740 
1741  /********************************/
1742  /* EMIT OTF END */
1743  /********************************/
1744 
1745  uint64_t _end = Timer_tsc();
1746  uint64_t _duration = _end - _begin;
1747 
1749  {
1751  {
1752 
1753  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1754  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1755  MALP_EVENT_MPI, _container.event.mpi_event.type );
1756 
1757 
1758  Event_Packer_push(&otf_event);
1759  }
1760 
1761  /********************************/
1762  /* EMIT MALP EVENT */
1763  /********************************/
1764 
1765  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1766 
1767  /* Submit event if MPI instrumented */
1768  Event_Packer_push(&_container);
1769  }
1770 
1771 
1772  return ret;
1773 }
1774 int MPI_Bsend( void * buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm )
1775 {
1776 
1777  /* Virtualize MPI */
1778  MACRO_MPI_Comm (comm)
1779 
1780  /* Pre instrum */
1781  int _rank = Stream_desc_get()->mpi_rank;
1782 
1783  struct MALP_Trace_Event _container;
1784 
1785  /********************************/
1786  /* FILL MPI EVENT */
1787  /********************************/
1788 
1789  _container.event.mpi_event.type =
1790  T_MPI_ENUM(MPI_BSEND)
1791  ;
1792 
1793  /* Set default source & dest before override */
1794  _container.event.mpi_event.source = _rank;
1795  _container.event.mpi_event.dest = _rank;
1796 
1797 
1798  SET_DEST (dest)
1799  SET_TAG (tag)
1800  SET_COUNT (count)
1801  SET_DATATYPE (datatype)
1802  SET_COMM (comm)
1803 
1804  /* Fill in size informations if needed */
1805  int _size = 0;
1806  #if 1
1807  COMP_SIZE (count)
1808  #endif
1809  _container.event.mpi_event.size = _size;
1810 
1811  /********************************/
1812  /* EMIT OTF ENTER */
1813  /********************************/
1814 
1815  struct MALP_Trace_Event otf_event;
1816 
1817  uint64_t _begin = Timer_tsc ();
1818 
1821  {
1822 
1823  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1824  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1825  MALP_EVENT_MPI, _container.event.mpi_event.type );
1826  Event_Packer_push(&otf_event);
1827  }
1828 
1829  /********************************/
1830  /* ACTUAL FUNCTION CALL */
1831  /********************************/
1832 
1834  int ret = PMPI_Bsend( buf, count, datatype, dest, tag, comm );
1836 
1837  /********************************/
1838  /* EMIT OTF END */
1839  /********************************/
1840 
1841  uint64_t _end = Timer_tsc();
1842  uint64_t _duration = _end - _begin;
1843 
1845  {
1847  {
1848 
1849  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1850  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1851  MALP_EVENT_MPI, _container.event.mpi_event.type );
1852 
1853 
1854  Event_Packer_push(&otf_event);
1855  }
1856 
1857  /********************************/
1858  /* EMIT MALP EVENT */
1859  /********************************/
1860 
1861  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1862 
1863  /* Submit event if MPI instrumented */
1864  Event_Packer_push(&_container);
1865  }
1866 
1867 
1868  return ret;
1869 }
1870 int MPI_Bsend_init( void * buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request * request )
1871 {
1872 
1873  /* Virtualize MPI */
1874  MACRO_MPI_Comm (comm)
1875 
1876  /* Pre instrum */
1877  int _rank = Stream_desc_get()->mpi_rank;
1878 
1879  struct MALP_Trace_Event _container;
1880 
1881  /********************************/
1882  /* FILL MPI EVENT */
1883  /********************************/
1884 
1885  _container.event.mpi_event.type =
1886  T_MPI_ENUM(MPI_BSEND_INIT)
1887  ;
1888 
1889  /* Set default source & dest before override */
1890  _container.event.mpi_event.source = _rank;
1891  _container.event.mpi_event.dest = _rank;
1892 
1893 
1894  SET_DEST (dest)
1895  SET_TAG (tag)
1896  SET_COUNT (count)
1897  SET_DATATYPE (datatype)
1898  SET_COMM (comm)
1899 
1900  /* Fill in size informations if needed */
1901  int _size = 0;
1902  #if 1
1903  COMP_SIZE (count)
1904  #endif
1905  _container.event.mpi_event.size = _size;
1906 
1907  /********************************/
1908  /* EMIT OTF ENTER */
1909  /********************************/
1910 
1911  struct MALP_Trace_Event otf_event;
1912 
1913  uint64_t _begin = Timer_tsc ();
1914 
1917  {
1918 
1919  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
1920  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
1921  MALP_EVENT_MPI, _container.event.mpi_event.type );
1922  Event_Packer_push(&otf_event);
1923  }
1924 
1925  /********************************/
1926  /* ACTUAL FUNCTION CALL */
1927  /********************************/
1928 
1930  int ret = PMPI_Bsend_init( buf, count, datatype, dest, tag, comm, request );
1932 
1933  /********************************/
1934  /* EMIT OTF END */
1935  /********************************/
1936 
1937  uint64_t _end = Timer_tsc();
1938  uint64_t _duration = _end - _begin;
1939 
1941  {
1943  {
1944 
1945  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
1946  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
1947  MALP_EVENT_MPI, _container.event.mpi_event.type );
1948 
1949 
1950  Event_Packer_push(&otf_event);
1951  }
1952 
1953  /********************************/
1954  /* EMIT MALP EVENT */
1955  /********************************/
1956 
1957  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
1958 
1959  /* Submit event if MPI instrumented */
1960  Event_Packer_push(&_container);
1961  }
1962 
1963 
1964  return ret;
1965 }
1966 int MPI_Buffer_attach( void * buffer, int size )
1967 {
1968 
1969  /* Virtualize MPI */
1970 
1971 
1972  /* Pre instrum */
1973  int _rank = Stream_desc_get()->mpi_rank;
1974 
1975  struct MALP_Trace_Event _container;
1976 
1977  /********************************/
1978  /* FILL MPI EVENT */
1979  /********************************/
1980 
1981  _container.event.mpi_event.type =
1982  T_MPI_ENUM(MPI_BUFFER_ATTACH)
1983  ;
1984 
1985  /* Set default source & dest before override */
1986  _container.event.mpi_event.source = _rank;
1987  _container.event.mpi_event.dest = _rank;
1988 
1989 
1990 
1991 
1992 
1993 
1994 
1995 
1996  /* Fill in size informations if needed */
1997  int _size = 0;
1998  #if 0
1999 
2000  #endif
2001  _container.event.mpi_event.size = _size;
2002 
2003  /********************************/
2004  /* EMIT OTF ENTER */
2005  /********************************/
2006 
2007  struct MALP_Trace_Event otf_event;
2008 
2009  uint64_t _begin = Timer_tsc ();
2010 
2013  {
2014 
2015  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2016  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2017  MALP_EVENT_MPI, _container.event.mpi_event.type );
2018  Event_Packer_push(&otf_event);
2019  }
2020 
2021  /********************************/
2022  /* ACTUAL FUNCTION CALL */
2023  /********************************/
2024 
2026  int ret = PMPI_Buffer_attach( buffer, size );
2028 
2029  /********************************/
2030  /* EMIT OTF END */
2031  /********************************/
2032 
2033  uint64_t _end = Timer_tsc();
2034  uint64_t _duration = _end - _begin;
2035 
2037  {
2039  {
2040 
2041  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2042  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2043  MALP_EVENT_MPI, _container.event.mpi_event.type );
2044 
2045 
2046  Event_Packer_push(&otf_event);
2047  }
2048 
2049  /********************************/
2050  /* EMIT MALP EVENT */
2051  /********************************/
2052 
2053  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2054 
2055  /* Submit event if MPI instrumented */
2056  Event_Packer_push(&_container);
2057  }
2058 
2059 
2060  return ret;
2061 }
2062 int MPI_Buffer_detach( void * buffer, int * size )
2063 {
2064 
2065  /* Virtualize MPI */
2066 
2067 
2068  /* Pre instrum */
2069  int _rank = Stream_desc_get()->mpi_rank;
2070 
2071  struct MALP_Trace_Event _container;
2072 
2073  /********************************/
2074  /* FILL MPI EVENT */
2075  /********************************/
2076 
2077  _container.event.mpi_event.type =
2078  T_MPI_ENUM(MPI_BUFFER_DETACH)
2079  ;
2080 
2081  /* Set default source & dest before override */
2082  _container.event.mpi_event.source = _rank;
2083  _container.event.mpi_event.dest = _rank;
2084 
2085 
2086 
2087 
2088 
2089 
2090 
2091 
2092  /* Fill in size informations if needed */
2093  int _size = 0;
2094  #if 0
2095 
2096  #endif
2097  _container.event.mpi_event.size = _size;
2098 
2099  /********************************/
2100  /* EMIT OTF ENTER */
2101  /********************************/
2102 
2103  struct MALP_Trace_Event otf_event;
2104 
2105  uint64_t _begin = Timer_tsc ();
2106 
2109  {
2110 
2111  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2112  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2113  MALP_EVENT_MPI, _container.event.mpi_event.type );
2114  Event_Packer_push(&otf_event);
2115  }
2116 
2117  /********************************/
2118  /* ACTUAL FUNCTION CALL */
2119  /********************************/
2120 
2122  int ret = PMPI_Buffer_detach( buffer, size );
2124 
2125  /********************************/
2126  /* EMIT OTF END */
2127  /********************************/
2128 
2129  uint64_t _end = Timer_tsc();
2130  uint64_t _duration = _end - _begin;
2131 
2133  {
2135  {
2136 
2137  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2138  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2139  MALP_EVENT_MPI, _container.event.mpi_event.type );
2140 
2141 
2142  Event_Packer_push(&otf_event);
2143  }
2144 
2145  /********************************/
2146  /* EMIT MALP EVENT */
2147  /********************************/
2148 
2149  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2150 
2151  /* Submit event if MPI instrumented */
2152  Event_Packer_push(&_container);
2153  }
2154 
2155 
2156  return ret;
2157 }
2158 int MPI_Cancel( MPI_Request * request )
2159 {
2160 
2161  /* Virtualize MPI */
2162 
2163 
2164  /* Pre instrum */
2165  int _rank = Stream_desc_get()->mpi_rank;
2166 
2167  struct MALP_Trace_Event _container;
2168 
2169  /********************************/
2170  /* FILL MPI EVENT */
2171  /********************************/
2172 
2173  _container.event.mpi_event.type =
2174  T_MPI_ENUM(MPI_CANCEL)
2175  ;
2176 
2177  /* Set default source & dest before override */
2178  _container.event.mpi_event.source = _rank;
2179  _container.event.mpi_event.dest = _rank;
2180 
2181 
2182 
2183 
2184 
2185 
2186 
2187 
2188  /* Fill in size informations if needed */
2189  int _size = 0;
2190  #if 0
2191 
2192  #endif
2193  _container.event.mpi_event.size = _size;
2194 
2195  /********************************/
2196  /* EMIT OTF ENTER */
2197  /********************************/
2198 
2199  struct MALP_Trace_Event otf_event;
2200 
2201  uint64_t _begin = Timer_tsc ();
2202 
2205  {
2206 
2207  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2208  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2209  MALP_EVENT_MPI, _container.event.mpi_event.type );
2210  Event_Packer_push(&otf_event);
2211  }
2212 
2213  /********************************/
2214  /* ACTUAL FUNCTION CALL */
2215  /********************************/
2216 
2218  int ret = PMPI_Cancel( request );
2220 
2221  /********************************/
2222  /* EMIT OTF END */
2223  /********************************/
2224 
2225  uint64_t _end = Timer_tsc();
2226  uint64_t _duration = _end - _begin;
2227 
2229  {
2231  {
2232 
2233  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2234  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2235  MALP_EVENT_MPI, _container.event.mpi_event.type );
2236 
2237 
2238  Event_Packer_push(&otf_event);
2239  }
2240 
2241  /********************************/
2242  /* EMIT MALP EVENT */
2243  /********************************/
2244 
2245  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2246 
2247  /* Submit event if MPI instrumented */
2248  Event_Packer_push(&_container);
2249  }
2250 
2251 
2252  return ret;
2253 }
2254 int MPI_Cart_coords( MPI_Comm comm, int rank, int maxdims, int * coords )
2255 {
2256 
2257  /* Virtualize MPI */
2258  MACRO_MPI_Comm (comm)
2259 
2260  /* Pre instrum */
2261  int _rank = Stream_desc_get()->mpi_rank;
2262 
2263  struct MALP_Trace_Event _container;
2264 
2265  /********************************/
2266  /* FILL MPI EVENT */
2267  /********************************/
2268 
2269  _container.event.mpi_event.type =
2270  T_MPI_ENUM(MPI_CART_COORDS)
2271  ;
2272 
2273  /* Set default source & dest before override */
2274  _container.event.mpi_event.source = _rank;
2275  _container.event.mpi_event.dest = _rank;
2276 
2277 
2278 
2279 
2280 
2281 
2282  SET_COMM (comm)
2283 
2284  /* Fill in size informations if needed */
2285  int _size = 0;
2286  #if 0
2287 
2288  #endif
2289  _container.event.mpi_event.size = _size;
2290 
2291  /********************************/
2292  /* EMIT OTF ENTER */
2293  /********************************/
2294 
2295  struct MALP_Trace_Event otf_event;
2296 
2297  uint64_t _begin = Timer_tsc ();
2298 
2301  {
2302 
2303  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2304  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2305  MALP_EVENT_MPI, _container.event.mpi_event.type );
2306  Event_Packer_push(&otf_event);
2307  }
2308 
2309  /********************************/
2310  /* ACTUAL FUNCTION CALL */
2311  /********************************/
2312 
2314  int ret = PMPI_Cart_coords( comm, rank, maxdims, coords );
2316 
2317  /********************************/
2318  /* EMIT OTF END */
2319  /********************************/
2320 
2321  uint64_t _end = Timer_tsc();
2322  uint64_t _duration = _end - _begin;
2323 
2325  {
2327  {
2328 
2329  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2330  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2331  MALP_EVENT_MPI, _container.event.mpi_event.type );
2332 
2333 
2334  Event_Packer_push(&otf_event);
2335  }
2336 
2337  /********************************/
2338  /* EMIT MALP EVENT */
2339  /********************************/
2340 
2341  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2342 
2343  /* Submit event if MPI instrumented */
2344  Event_Packer_push(&_container);
2345  }
2346 
2347 
2348  return ret;
2349 }
2350 int MPI_Cart_create( MPI_Comm old_comm, int ndims, int * dims, int * periods, int reorder, MPI_Comm * comm_cart )
2351 {
2352 
2353  /* Virtualize MPI */
2354  MACRO_MPI_Comm (old_comm)
2355 
2356  /* Pre instrum */
2357  int _rank = Stream_desc_get()->mpi_rank;
2358 
2359  struct MALP_Trace_Event _container;
2360 
2361  /********************************/
2362  /* FILL MPI EVENT */
2363  /********************************/
2364 
2365  _container.event.mpi_event.type =
2366  T_MPI_ENUM(MPI_CART_CREATE)
2367  ;
2368 
2369  /* Set default source & dest before override */
2370  _container.event.mpi_event.source = _rank;
2371  _container.event.mpi_event.dest = _rank;
2372 
2373 
2374 
2375 
2376 
2377 
2378 
2379 
2380  /* Fill in size informations if needed */
2381  int _size = 0;
2382  #if 0
2383 
2384  #endif
2385  _container.event.mpi_event.size = _size;
2386 
2387  /********************************/
2388  /* EMIT OTF ENTER */
2389  /********************************/
2390 
2391  struct MALP_Trace_Event otf_event;
2392 
2393  uint64_t _begin = Timer_tsc ();
2394 
2397  {
2398 
2399  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2400  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2401  MALP_EVENT_MPI, _container.event.mpi_event.type );
2402  Event_Packer_push(&otf_event);
2403  }
2404 
2405  /********************************/
2406  /* ACTUAL FUNCTION CALL */
2407  /********************************/
2408 
2410  int ret = PMPI_Cart_create( old_comm, ndims, dims, periods, reorder, comm_cart );
2412 
2413  /********************************/
2414  /* EMIT OTF END */
2415  /********************************/
2416 
2417  uint64_t _end = Timer_tsc();
2418  uint64_t _duration = _end - _begin;
2419 
2421  {
2423  {
2424 
2425  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2426  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2427  MALP_EVENT_MPI, _container.event.mpi_event.type );
2428 
2429 
2430  Event_Packer_push(&otf_event);
2431  }
2432 
2433  /********************************/
2434  /* EMIT MALP EVENT */
2435  /********************************/
2436 
2437  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2438 
2439  /* Submit event if MPI instrumented */
2440  Event_Packer_push(&_container);
2441  }
2442 
2443 
2444  return ret;
2445 }
2446 int MPI_Cart_get( MPI_Comm comm, int maxdims, int * dims, int * periods, int * coords )
2447 {
2448 
2449  /* Virtualize MPI */
2450  MACRO_MPI_Comm (comm)
2451 
2452  /* Pre instrum */
2453  int _rank = Stream_desc_get()->mpi_rank;
2454 
2455  struct MALP_Trace_Event _container;
2456 
2457  /********************************/
2458  /* FILL MPI EVENT */
2459  /********************************/
2460 
2461  _container.event.mpi_event.type =
2462  T_MPI_ENUM(MPI_CART_GET)
2463  ;
2464 
2465  /* Set default source & dest before override */
2466  _container.event.mpi_event.source = _rank;
2467  _container.event.mpi_event.dest = _rank;
2468 
2469 
2470 
2471 
2472 
2473 
2474  SET_COMM (comm)
2475 
2476  /* Fill in size informations if needed */
2477  int _size = 0;
2478  #if 0
2479 
2480  #endif
2481  _container.event.mpi_event.size = _size;
2482 
2483  /********************************/
2484  /* EMIT OTF ENTER */
2485  /********************************/
2486 
2487  struct MALP_Trace_Event otf_event;
2488 
2489  uint64_t _begin = Timer_tsc ();
2490 
2493  {
2494 
2495  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2496  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2497  MALP_EVENT_MPI, _container.event.mpi_event.type );
2498  Event_Packer_push(&otf_event);
2499  }
2500 
2501  /********************************/
2502  /* ACTUAL FUNCTION CALL */
2503  /********************************/
2504 
2506  int ret = PMPI_Cart_get( comm, maxdims, dims, periods, coords );
2508 
2509  /********************************/
2510  /* EMIT OTF END */
2511  /********************************/
2512 
2513  uint64_t _end = Timer_tsc();
2514  uint64_t _duration = _end - _begin;
2515 
2517  {
2519  {
2520 
2521  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2522  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2523  MALP_EVENT_MPI, _container.event.mpi_event.type );
2524 
2525 
2526  Event_Packer_push(&otf_event);
2527  }
2528 
2529  /********************************/
2530  /* EMIT MALP EVENT */
2531  /********************************/
2532 
2533  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2534 
2535  /* Submit event if MPI instrumented */
2536  Event_Packer_push(&_container);
2537  }
2538 
2539 
2540  return ret;
2541 }
2542 int MPI_Cart_map( MPI_Comm comm, int ndims, int * dims, int * periods, int * newrank )
2543 {
2544 
2545  /* Virtualize MPI */
2546  MACRO_MPI_Comm (comm)
2547 
2548  /* Pre instrum */
2549  int _rank = Stream_desc_get()->mpi_rank;
2550 
2551  struct MALP_Trace_Event _container;
2552 
2553  /********************************/
2554  /* FILL MPI EVENT */
2555  /********************************/
2556 
2557  _container.event.mpi_event.type =
2558  T_MPI_ENUM(MPI_CART_MAP)
2559  ;
2560 
2561  /* Set default source & dest before override */
2562  _container.event.mpi_event.source = _rank;
2563  _container.event.mpi_event.dest = _rank;
2564 
2565 
2566 
2567 
2568 
2569 
2570  SET_COMM (comm)
2571 
2572  /* Fill in size informations if needed */
2573  int _size = 0;
2574  #if 0
2575 
2576  #endif
2577  _container.event.mpi_event.size = _size;
2578 
2579  /********************************/
2580  /* EMIT OTF ENTER */
2581  /********************************/
2582 
2583  struct MALP_Trace_Event otf_event;
2584 
2585  uint64_t _begin = Timer_tsc ();
2586 
2589  {
2590 
2591  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2592  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2593  MALP_EVENT_MPI, _container.event.mpi_event.type );
2594  Event_Packer_push(&otf_event);
2595  }
2596 
2597  /********************************/
2598  /* ACTUAL FUNCTION CALL */
2599  /********************************/
2600 
2602  int ret = PMPI_Cart_map( comm, ndims, dims, periods, newrank );
2604 
2605  /********************************/
2606  /* EMIT OTF END */
2607  /********************************/
2608 
2609  uint64_t _end = Timer_tsc();
2610  uint64_t _duration = _end - _begin;
2611 
2613  {
2615  {
2616 
2617  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2618  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2619  MALP_EVENT_MPI, _container.event.mpi_event.type );
2620 
2621 
2622  Event_Packer_push(&otf_event);
2623  }
2624 
2625  /********************************/
2626  /* EMIT MALP EVENT */
2627  /********************************/
2628 
2629  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2630 
2631  /* Submit event if MPI instrumented */
2632  Event_Packer_push(&_container);
2633  }
2634 
2635 
2636  return ret;
2637 }
2638 int MPI_Cart_rank( MPI_Comm comm, int * coords, int * rank )
2639 {
2640 
2641  /* Virtualize MPI */
2642  MACRO_MPI_Comm (comm)
2643 
2644  /* Pre instrum */
2645  int _rank = Stream_desc_get()->mpi_rank;
2646 
2647  struct MALP_Trace_Event _container;
2648 
2649  /********************************/
2650  /* FILL MPI EVENT */
2651  /********************************/
2652 
2653  _container.event.mpi_event.type =
2654  T_MPI_ENUM(MPI_CART_RANK)
2655  ;
2656 
2657  /* Set default source & dest before override */
2658  _container.event.mpi_event.source = _rank;
2659  _container.event.mpi_event.dest = _rank;
2660 
2661 
2662 
2663 
2664 
2665 
2666  SET_COMM (comm)
2667 
2668  /* Fill in size informations if needed */
2669  int _size = 0;
2670  #if 0
2671 
2672  #endif
2673  _container.event.mpi_event.size = _size;
2674 
2675  /********************************/
2676  /* EMIT OTF ENTER */
2677  /********************************/
2678 
2679  struct MALP_Trace_Event otf_event;
2680 
2681  uint64_t _begin = Timer_tsc ();
2682 
2685  {
2686 
2687  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2688  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2689  MALP_EVENT_MPI, _container.event.mpi_event.type );
2690  Event_Packer_push(&otf_event);
2691  }
2692 
2693  /********************************/
2694  /* ACTUAL FUNCTION CALL */
2695  /********************************/
2696 
2698  int ret = PMPI_Cart_rank( comm, coords, rank );
2700 
2701  /********************************/
2702  /* EMIT OTF END */
2703  /********************************/
2704 
2705  uint64_t _end = Timer_tsc();
2706  uint64_t _duration = _end - _begin;
2707 
2709  {
2711  {
2712 
2713  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2714  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2715  MALP_EVENT_MPI, _container.event.mpi_event.type );
2716 
2717 
2718  Event_Packer_push(&otf_event);
2719  }
2720 
2721  /********************************/
2722  /* EMIT MALP EVENT */
2723  /********************************/
2724 
2725  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2726 
2727  /* Submit event if MPI instrumented */
2728  Event_Packer_push(&_container);
2729  }
2730 
2731 
2732  return ret;
2733 }
2734 int MPI_Cart_shift( MPI_Comm comm, int direction, int disp, int * rank_source, int * rank_dest )
2735 {
2736 
2737  /* Virtualize MPI */
2738  MACRO_MPI_Comm (comm)
2739 
2740  /* Pre instrum */
2741  int _rank = Stream_desc_get()->mpi_rank;
2742 
2743  struct MALP_Trace_Event _container;
2744 
2745  /********************************/
2746  /* FILL MPI EVENT */
2747  /********************************/
2748 
2749  _container.event.mpi_event.type =
2750  T_MPI_ENUM(MPI_CART_SHIFT)
2751  ;
2752 
2753  /* Set default source & dest before override */
2754  _container.event.mpi_event.source = _rank;
2755  _container.event.mpi_event.dest = _rank;
2756 
2757 
2758 
2759 
2760 
2761 
2762  SET_COMM (comm)
2763 
2764  /* Fill in size informations if needed */
2765  int _size = 0;
2766  #if 0
2767 
2768  #endif
2769  _container.event.mpi_event.size = _size;
2770 
2771  /********************************/
2772  /* EMIT OTF ENTER */
2773  /********************************/
2774 
2775  struct MALP_Trace_Event otf_event;
2776 
2777  uint64_t _begin = Timer_tsc ();
2778 
2781  {
2782 
2783  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2784  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2785  MALP_EVENT_MPI, _container.event.mpi_event.type );
2786  Event_Packer_push(&otf_event);
2787  }
2788 
2789  /********************************/
2790  /* ACTUAL FUNCTION CALL */
2791  /********************************/
2792 
2794  int ret = PMPI_Cart_shift( comm, direction, disp, rank_source, rank_dest );
2796 
2797  /********************************/
2798  /* EMIT OTF END */
2799  /********************************/
2800 
2801  uint64_t _end = Timer_tsc();
2802  uint64_t _duration = _end - _begin;
2803 
2805  {
2807  {
2808 
2809  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2810  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2811  MALP_EVENT_MPI, _container.event.mpi_event.type );
2812 
2813 
2814  Event_Packer_push(&otf_event);
2815  }
2816 
2817  /********************************/
2818  /* EMIT MALP EVENT */
2819  /********************************/
2820 
2821  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2822 
2823  /* Submit event if MPI instrumented */
2824  Event_Packer_push(&_container);
2825  }
2826 
2827 
2828  return ret;
2829 }
2830 int MPI_Cart_sub( MPI_Comm comm, int * remain_dims, MPI_Comm * new_comm )
2831 {
2832 
2833  /* Virtualize MPI */
2834  MACRO_MPI_Comm (comm)
2835 
2836  /* Pre instrum */
2837  int _rank = Stream_desc_get()->mpi_rank;
2838 
2839  struct MALP_Trace_Event _container;
2840 
2841  /********************************/
2842  /* FILL MPI EVENT */
2843  /********************************/
2844 
2845  _container.event.mpi_event.type =
2846  T_MPI_ENUM(MPI_CART_SUB)
2847  ;
2848 
2849  /* Set default source & dest before override */
2850  _container.event.mpi_event.source = _rank;
2851  _container.event.mpi_event.dest = _rank;
2852 
2853 
2854 
2855 
2856 
2857 
2858  SET_COMM (comm)
2859 
2860  /* Fill in size informations if needed */
2861  int _size = 0;
2862  #if 0
2863 
2864  #endif
2865  _container.event.mpi_event.size = _size;
2866 
2867  /********************************/
2868  /* EMIT OTF ENTER */
2869  /********************************/
2870 
2871  struct MALP_Trace_Event otf_event;
2872 
2873  uint64_t _begin = Timer_tsc ();
2874 
2877  {
2878 
2879  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2880  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2881  MALP_EVENT_MPI, _container.event.mpi_event.type );
2882  Event_Packer_push(&otf_event);
2883  }
2884 
2885  /********************************/
2886  /* ACTUAL FUNCTION CALL */
2887  /********************************/
2888 
2890  int ret = PMPI_Cart_sub( comm, remain_dims, new_comm );
2892 
2893  /********************************/
2894  /* EMIT OTF END */
2895  /********************************/
2896 
2897  uint64_t _end = Timer_tsc();
2898  uint64_t _duration = _end - _begin;
2899 
2901  {
2903  {
2904 
2905  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
2906  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
2907  MALP_EVENT_MPI, _container.event.mpi_event.type );
2908 
2909 
2910  Event_Packer_push(&otf_event);
2911  }
2912 
2913  /********************************/
2914  /* EMIT MALP EVENT */
2915  /********************************/
2916 
2917  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
2918 
2919  /* Submit event if MPI instrumented */
2920  Event_Packer_push(&_container);
2921  }
2922 
2923 
2924  return ret;
2925 }
2926 int MPI_Cartdim_get( MPI_Comm comm, int * ndims )
2927 {
2928 
2929  /* Virtualize MPI */
2930  MACRO_MPI_Comm (comm)
2931 
2932  /* Pre instrum */
2933  int _rank = Stream_desc_get()->mpi_rank;
2934 
2935  struct MALP_Trace_Event _container;
2936 
2937  /********************************/
2938  /* FILL MPI EVENT */
2939  /********************************/
2940 
2941  _container.event.mpi_event.type =
2942  T_MPI_ENUM(MPI_CARTDIM_GET)
2943  ;
2944 
2945  /* Set default source & dest before override */
2946  _container.event.mpi_event.source = _rank;
2947  _container.event.mpi_event.dest = _rank;
2948 
2949 
2950 
2951 
2952 
2953 
2954  SET_COMM (comm)
2955 
2956  /* Fill in size informations if needed */
2957  int _size = 0;
2958  #if 0
2959 
2960  #endif
2961  _container.event.mpi_event.size = _size;
2962 
2963  /********************************/
2964  /* EMIT OTF ENTER */
2965  /********************************/
2966 
2967  struct MALP_Trace_Event otf_event;
2968 
2969  uint64_t _begin = Timer_tsc ();
2970 
2973  {
2974 
2975  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
2976  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
2977  MALP_EVENT_MPI, _container.event.mpi_event.type );
2978  Event_Packer_push(&otf_event);
2979  }
2980 
2981  /********************************/
2982  /* ACTUAL FUNCTION CALL */
2983  /********************************/
2984 
2986  int ret = PMPI_Cartdim_get( comm, ndims );
2988 
2989  /********************************/
2990  /* EMIT OTF END */
2991  /********************************/
2992 
2993  uint64_t _end = Timer_tsc();
2994  uint64_t _duration = _end - _begin;
2995 
2997  {
2999  {
3000 
3001  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3002  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3003  MALP_EVENT_MPI, _container.event.mpi_event.type );
3004 
3005 
3006  Event_Packer_push(&otf_event);
3007  }
3008 
3009  /********************************/
3010  /* EMIT MALP EVENT */
3011  /********************************/
3012 
3013  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3014 
3015  /* Submit event if MPI instrumented */
3016  Event_Packer_push(&_container);
3017  }
3018 
3019 
3020  return ret;
3021 }
3022 int MPI_Close_port( char * port_name )
3023 {
3024 
3025  /* Virtualize MPI */
3026 
3027 
3028  /* Pre instrum */
3029  int _rank = Stream_desc_get()->mpi_rank;
3030 
3031  struct MALP_Trace_Event _container;
3032 
3033  /********************************/
3034  /* FILL MPI EVENT */
3035  /********************************/
3036 
3037  _container.event.mpi_event.type =
3038  T_MPI_ENUM(MPI_CLOSE_PORT)
3039  ;
3040 
3041  /* Set default source & dest before override */
3042  _container.event.mpi_event.source = _rank;
3043  _container.event.mpi_event.dest = _rank;
3044 
3045 
3046 
3047 
3048 
3049 
3050 
3051 
3052  /* Fill in size informations if needed */
3053  int _size = 0;
3054  #if 0
3055 
3056  #endif
3057  _container.event.mpi_event.size = _size;
3058 
3059  /********************************/
3060  /* EMIT OTF ENTER */
3061  /********************************/
3062 
3063  struct MALP_Trace_Event otf_event;
3064 
3065  uint64_t _begin = Timer_tsc ();
3066 
3069  {
3070 
3071  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3072  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3073  MALP_EVENT_MPI, _container.event.mpi_event.type );
3074  Event_Packer_push(&otf_event);
3075  }
3076 
3077  /********************************/
3078  /* ACTUAL FUNCTION CALL */
3079  /********************************/
3080 
3082  int ret = PMPI_Close_port( port_name );
3084 
3085  /********************************/
3086  /* EMIT OTF END */
3087  /********************************/
3088 
3089  uint64_t _end = Timer_tsc();
3090  uint64_t _duration = _end - _begin;
3091 
3093  {
3095  {
3096 
3097  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3098  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3099  MALP_EVENT_MPI, _container.event.mpi_event.type );
3100 
3101 
3102  Event_Packer_push(&otf_event);
3103  }
3104 
3105  /********************************/
3106  /* EMIT MALP EVENT */
3107  /********************************/
3108 
3109  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3110 
3111  /* Submit event if MPI instrumented */
3112  Event_Packer_push(&_container);
3113  }
3114 
3115 
3116  return ret;
3117 }
3118 int MPI_Comm_accept( char * port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm * newcomm )
3119 {
3120 
3121  /* Virtualize MPI */
3122  MACRO_MPI_Comm (comm)
3123 
3124  /* Pre instrum */
3125  int _rank = Stream_desc_get()->mpi_rank;
3126 
3127  struct MALP_Trace_Event _container;
3128 
3129  /********************************/
3130  /* FILL MPI EVENT */
3131  /********************************/
3132 
3133  _container.event.mpi_event.type =
3134  T_MPI_ENUM(MPI_COMM_ACCEPT)
3135  ;
3136 
3137  /* Set default source & dest before override */
3138  _container.event.mpi_event.source = _rank;
3139  _container.event.mpi_event.dest = _rank;
3140 
3141 
3142 
3143 
3144 
3145 
3146  SET_COMM (comm)
3147 
3148  /* Fill in size informations if needed */
3149  int _size = 0;
3150  #if 0
3151 
3152  #endif
3153  _container.event.mpi_event.size = _size;
3154 
3155  /********************************/
3156  /* EMIT OTF ENTER */
3157  /********************************/
3158 
3159  struct MALP_Trace_Event otf_event;
3160 
3161  uint64_t _begin = Timer_tsc ();
3162 
3165  {
3166 
3167  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3168  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3169  MALP_EVENT_MPI, _container.event.mpi_event.type );
3170  Event_Packer_push(&otf_event);
3171  }
3172 
3173  /********************************/
3174  /* ACTUAL FUNCTION CALL */
3175  /********************************/
3176 
3178  int ret = PMPI_Comm_accept( port_name, info, root, comm, newcomm );
3180 
3181  /********************************/
3182  /* EMIT OTF END */
3183  /********************************/
3184 
3185  uint64_t _end = Timer_tsc();
3186  uint64_t _duration = _end - _begin;
3187 
3189  {
3191  {
3192 
3193  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3194  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3195  MALP_EVENT_MPI, _container.event.mpi_event.type );
3196 
3197 
3198  Event_Packer_push(&otf_event);
3199  }
3200 
3201  /********************************/
3202  /* EMIT MALP EVENT */
3203  /********************************/
3204 
3205  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3206 
3207  /* Submit event if MPI instrumented */
3208  Event_Packer_push(&_container);
3209  }
3210 
3211 
3212  return ret;
3213 }
3214 int MPI_Comm_c2f( MPI_Comm comm )
3215 {
3216 
3217  /* Virtualize MPI */
3218  MACRO_MPI_Comm (comm)
3219 
3220  /* Pre instrum */
3221  int _rank = Stream_desc_get()->mpi_rank;
3222 
3223  struct MALP_Trace_Event _container;
3224 
3225  /********************************/
3226  /* FILL MPI EVENT */
3227  /********************************/
3228 
3229  _container.event.mpi_event.type =
3230  T_MPI_ENUM(MPI_COMM_C2F)
3231  ;
3232 
3233  /* Set default source & dest before override */
3234  _container.event.mpi_event.source = _rank;
3235  _container.event.mpi_event.dest = _rank;
3236 
3237 
3238 
3239 
3240 
3241 
3242  SET_COMM (comm)
3243 
3244  /* Fill in size informations if needed */
3245  int _size = 0;
3246  #if 0
3247 
3248  #endif
3249  _container.event.mpi_event.size = _size;
3250 
3251  /********************************/
3252  /* EMIT OTF ENTER */
3253  /********************************/
3254 
3255  struct MALP_Trace_Event otf_event;
3256 
3257  uint64_t _begin = Timer_tsc ();
3258 
3261  {
3262 
3263  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3264  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3265  MALP_EVENT_MPI, _container.event.mpi_event.type );
3266  Event_Packer_push(&otf_event);
3267  }
3268 
3269  /********************************/
3270  /* ACTUAL FUNCTION CALL */
3271  /********************************/
3272 
3274  int ret = PMPI_Comm_c2f( comm );
3276 
3277  /********************************/
3278  /* EMIT OTF END */
3279  /********************************/
3280 
3281  uint64_t _end = Timer_tsc();
3282  uint64_t _duration = _end - _begin;
3283 
3285  {
3287  {
3288 
3289  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3290  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3291  MALP_EVENT_MPI, _container.event.mpi_event.type );
3292 
3293 
3294  Event_Packer_push(&otf_event);
3295  }
3296 
3297  /********************************/
3298  /* EMIT MALP EVENT */
3299  /********************************/
3300 
3301  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3302 
3303  /* Submit event if MPI instrumented */
3304  Event_Packer_push(&_container);
3305  }
3306 
3307 
3308  return ret;
3309 }
3310 int MPI_Comm_call_errhandler( MPI_Comm comm, int errorcode )
3311 {
3312 
3313  /* Virtualize MPI */
3314  MACRO_MPI_Comm (comm)
3315 
3316  /* Pre instrum */
3317  int _rank = Stream_desc_get()->mpi_rank;
3318 
3319  struct MALP_Trace_Event _container;
3320 
3321  /********************************/
3322  /* FILL MPI EVENT */
3323  /********************************/
3324 
3325  _container.event.mpi_event.type =
3326  T_MPI_ENUM(MPI_COMM_CALL_ERRHANDLER)
3327  ;
3328 
3329  /* Set default source & dest before override */
3330  _container.event.mpi_event.source = _rank;
3331  _container.event.mpi_event.dest = _rank;
3332 
3333 
3334 
3335 
3336 
3337 
3338  SET_COMM (comm)
3339 
3340  /* Fill in size informations if needed */
3341  int _size = 0;
3342  #if 0
3343 
3344  #endif
3345  _container.event.mpi_event.size = _size;
3346 
3347  /********************************/
3348  /* EMIT OTF ENTER */
3349  /********************************/
3350 
3351  struct MALP_Trace_Event otf_event;
3352 
3353  uint64_t _begin = Timer_tsc ();
3354 
3357  {
3358 
3359  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3360  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3361  MALP_EVENT_MPI, _container.event.mpi_event.type );
3362  Event_Packer_push(&otf_event);
3363  }
3364 
3365  /********************************/
3366  /* ACTUAL FUNCTION CALL */
3367  /********************************/
3368 
3370  int ret = PMPI_Comm_call_errhandler( comm, errorcode );
3372 
3373  /********************************/
3374  /* EMIT OTF END */
3375  /********************************/
3376 
3377  uint64_t _end = Timer_tsc();
3378  uint64_t _duration = _end - _begin;
3379 
3381  {
3383  {
3384 
3385  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3386  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3387  MALP_EVENT_MPI, _container.event.mpi_event.type );
3388 
3389 
3390  Event_Packer_push(&otf_event);
3391  }
3392 
3393  /********************************/
3394  /* EMIT MALP EVENT */
3395  /********************************/
3396 
3397  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3398 
3399  /* Submit event if MPI instrumented */
3400  Event_Packer_push(&_container);
3401  }
3402 
3403 
3404  return ret;
3405 }
3406 int MPI_Comm_compare( MPI_Comm comm1, MPI_Comm comm2, int * result )
3407 {
3408 
3409  /* Virtualize MPI */
3410  MACRO_MPI_Comm (comm1) MACRO_MPI_Comm (comm2)
3411 
3412  /* Pre instrum */
3413  int _rank = Stream_desc_get()->mpi_rank;
3414 
3415  struct MALP_Trace_Event _container;
3416 
3417  /********************************/
3418  /* FILL MPI EVENT */
3419  /********************************/
3420 
3421  _container.event.mpi_event.type =
3422  T_MPI_ENUM(MPI_COMM_COMPARE)
3423  ;
3424 
3425  /* Set default source & dest before override */
3426  _container.event.mpi_event.source = _rank;
3427  _container.event.mpi_event.dest = _rank;
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436  /* Fill in size informations if needed */
3437  int _size = 0;
3438  #if 0
3439 
3440  #endif
3441  _container.event.mpi_event.size = _size;
3442 
3443  /********************************/
3444  /* EMIT OTF ENTER */
3445  /********************************/
3446 
3447  struct MALP_Trace_Event otf_event;
3448 
3449  uint64_t _begin = Timer_tsc ();
3450 
3453  {
3454 
3455  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3456  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3457  MALP_EVENT_MPI, _container.event.mpi_event.type );
3458  Event_Packer_push(&otf_event);
3459  }
3460 
3461  /********************************/
3462  /* ACTUAL FUNCTION CALL */
3463  /********************************/
3464 
3466  int ret = PMPI_Comm_compare( comm1, comm2, result );
3468 
3469  /********************************/
3470  /* EMIT OTF END */
3471  /********************************/
3472 
3473  uint64_t _end = Timer_tsc();
3474  uint64_t _duration = _end - _begin;
3475 
3477  {
3479  {
3480 
3481  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3482  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3483  MALP_EVENT_MPI, _container.event.mpi_event.type );
3484 
3485 
3486  Event_Packer_push(&otf_event);
3487  }
3488 
3489  /********************************/
3490  /* EMIT MALP EVENT */
3491  /********************************/
3492 
3493  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3494 
3495  /* Submit event if MPI instrumented */
3496  Event_Packer_push(&_container);
3497  }
3498 
3499 
3500  return ret;
3501 }
3502 int MPI_Comm_connect( char * port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm * newcomm )
3503 {
3504 
3505  /* Virtualize MPI */
3506  MACRO_MPI_Comm (comm)
3507 
3508  /* Pre instrum */
3509  int _rank = Stream_desc_get()->mpi_rank;
3510 
3511  struct MALP_Trace_Event _container;
3512 
3513  /********************************/
3514  /* FILL MPI EVENT */
3515  /********************************/
3516 
3517  _container.event.mpi_event.type =
3518  T_MPI_ENUM(MPI_COMM_CONNECT)
3519  ;
3520 
3521  /* Set default source & dest before override */
3522  _container.event.mpi_event.source = _rank;
3523  _container.event.mpi_event.dest = _rank;
3524 
3525 
3526 
3527 
3528 
3529 
3530  SET_COMM (comm)
3531 
3532  /* Fill in size informations if needed */
3533  int _size = 0;
3534  #if 0
3535 
3536  #endif
3537  _container.event.mpi_event.size = _size;
3538 
3539  /********************************/
3540  /* EMIT OTF ENTER */
3541  /********************************/
3542 
3543  struct MALP_Trace_Event otf_event;
3544 
3545  uint64_t _begin = Timer_tsc ();
3546 
3549  {
3550 
3551  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3552  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3553  MALP_EVENT_MPI, _container.event.mpi_event.type );
3554  Event_Packer_push(&otf_event);
3555  }
3556 
3557  /********************************/
3558  /* ACTUAL FUNCTION CALL */
3559  /********************************/
3560 
3562  int ret = PMPI_Comm_connect( port_name, info, root, comm, newcomm );
3564 
3565  /********************************/
3566  /* EMIT OTF END */
3567  /********************************/
3568 
3569  uint64_t _end = Timer_tsc();
3570  uint64_t _duration = _end - _begin;
3571 
3573  {
3575  {
3576 
3577  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3578  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3579  MALP_EVENT_MPI, _container.event.mpi_event.type );
3580 
3581 
3582  Event_Packer_push(&otf_event);
3583  }
3584 
3585  /********************************/
3586  /* EMIT MALP EVENT */
3587  /********************************/
3588 
3589  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3590 
3591  /* Submit event if MPI instrumented */
3592  Event_Packer_push(&_container);
3593  }
3594 
3595 
3596  return ret;
3597 }
3598 int MPI_Comm_create_errhandler( MPI_Comm_errhandler_function * function, MPI_Errhandler * errhandler )
3599 {
3600 
3601  /* Virtualize MPI */
3602 
3603 
3604  /* Pre instrum */
3605  int _rank = Stream_desc_get()->mpi_rank;
3606 
3607  struct MALP_Trace_Event _container;
3608 
3609  /********************************/
3610  /* FILL MPI EVENT */
3611  /********************************/
3612 
3613  _container.event.mpi_event.type =
3614  T_MPI_ENUM(MPI_COMM_CREATE_ERRHANDLER)
3615  ;
3616 
3617  /* Set default source & dest before override */
3618  _container.event.mpi_event.source = _rank;
3619  _container.event.mpi_event.dest = _rank;
3620 
3621 
3622 
3623 
3624 
3625 
3626 
3627 
3628  /* Fill in size informations if needed */
3629  int _size = 0;
3630  #if 0
3631 
3632  #endif
3633  _container.event.mpi_event.size = _size;
3634 
3635  /********************************/
3636  /* EMIT OTF ENTER */
3637  /********************************/
3638 
3639  struct MALP_Trace_Event otf_event;
3640 
3641  uint64_t _begin = Timer_tsc ();
3642 
3645  {
3646 
3647  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3648  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3649  MALP_EVENT_MPI, _container.event.mpi_event.type );
3650  Event_Packer_push(&otf_event);
3651  }
3652 
3653  /********************************/
3654  /* ACTUAL FUNCTION CALL */
3655  /********************************/
3656 
3658  int ret = PMPI_Comm_create_errhandler( function, errhandler );
3660 
3661  /********************************/
3662  /* EMIT OTF END */
3663  /********************************/
3664 
3665  uint64_t _end = Timer_tsc();
3666  uint64_t _duration = _end - _begin;
3667 
3669  {
3671  {
3672 
3673  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3674  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3675  MALP_EVENT_MPI, _container.event.mpi_event.type );
3676 
3677 
3678  Event_Packer_push(&otf_event);
3679  }
3680 
3681  /********************************/
3682  /* EMIT MALP EVENT */
3683  /********************************/
3684 
3685  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3686 
3687  /* Submit event if MPI instrumented */
3688  Event_Packer_push(&_container);
3689  }
3690 
3691 
3692  return ret;
3693 }
3694 int MPI_Comm_create_keyval( MPI_Comm_copy_attr_function * comm_copy_attr_fn, MPI_Comm_delete_attr_function * comm_delete_attr_fn, int * comm_keyval, void * extra_state )
3695 {
3696 
3697  /* Virtualize MPI */
3698 
3699 
3700  /* Pre instrum */
3701  int _rank = Stream_desc_get()->mpi_rank;
3702 
3703  struct MALP_Trace_Event _container;
3704 
3705  /********************************/
3706  /* FILL MPI EVENT */
3707  /********************************/
3708 
3709  _container.event.mpi_event.type =
3710  T_MPI_ENUM(MPI_COMM_CREATE_KEYVAL)
3711  ;
3712 
3713  /* Set default source & dest before override */
3714  _container.event.mpi_event.source = _rank;
3715  _container.event.mpi_event.dest = _rank;
3716 
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724  /* Fill in size informations if needed */
3725  int _size = 0;
3726  #if 0
3727 
3728  #endif
3729  _container.event.mpi_event.size = _size;
3730 
3731  /********************************/
3732  /* EMIT OTF ENTER */
3733  /********************************/
3734 
3735  struct MALP_Trace_Event otf_event;
3736 
3737  uint64_t _begin = Timer_tsc ();
3738 
3741  {
3742 
3743  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3744  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3745  MALP_EVENT_MPI, _container.event.mpi_event.type );
3746  Event_Packer_push(&otf_event);
3747  }
3748 
3749  /********************************/
3750  /* ACTUAL FUNCTION CALL */
3751  /********************************/
3752 
3754  int ret = PMPI_Comm_create_keyval( comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state );
3756 
3757  /********************************/
3758  /* EMIT OTF END */
3759  /********************************/
3760 
3761  uint64_t _end = Timer_tsc();
3762  uint64_t _duration = _end - _begin;
3763 
3765  {
3767  {
3768 
3769  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3770  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3771  MALP_EVENT_MPI, _container.event.mpi_event.type );
3772 
3773 
3774  Event_Packer_push(&otf_event);
3775  }
3776 
3777  /********************************/
3778  /* EMIT MALP EVENT */
3779  /********************************/
3780 
3781  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3782 
3783  /* Submit event if MPI instrumented */
3784  Event_Packer_push(&_container);
3785  }
3786 
3787 
3788  return ret;
3789 }
3790 int MPI_Comm_create( MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm )
3791 {
3792 
3793  /* Virtualize MPI */
3794  MACRO_MPI_Comm (comm)
3795 
3796  /* Pre instrum */
3797  int _rank = Stream_desc_get()->mpi_rank;
3798 
3799  struct MALP_Trace_Event _container;
3800 
3801  /********************************/
3802  /* FILL MPI EVENT */
3803  /********************************/
3804 
3805  _container.event.mpi_event.type =
3806  T_MPI_ENUM(MPI_COMM_CREATE)
3807  ;
3808 
3809  /* Set default source & dest before override */
3810  _container.event.mpi_event.source = _rank;
3811  _container.event.mpi_event.dest = _rank;
3812 
3813 
3814 
3815 
3816 
3817 
3818  SET_COMM (comm)
3819 
3820  /* Fill in size informations if needed */
3821  int _size = 0;
3822  #if 0
3823 
3824  #endif
3825  _container.event.mpi_event.size = _size;
3826 
3827  /********************************/
3828  /* EMIT OTF ENTER */
3829  /********************************/
3830 
3831  struct MALP_Trace_Event otf_event;
3832 
3833  uint64_t _begin = Timer_tsc ();
3834 
3837  {
3838 
3839  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3840  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3841  MALP_EVENT_MPI, _container.event.mpi_event.type );
3842  Event_Packer_push(&otf_event);
3843  }
3844 
3845  /********************************/
3846  /* ACTUAL FUNCTION CALL */
3847  /********************************/
3848 
3850  int ret = PMPI_Comm_create( comm, group, newcomm );
3852 
3853  /********************************/
3854  /* EMIT OTF END */
3855  /********************************/
3856 
3857  uint64_t _end = Timer_tsc();
3858  uint64_t _duration = _end - _begin;
3859 
3861  {
3863  {
3864 
3865  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3866  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3867  MALP_EVENT_MPI, _container.event.mpi_event.type );
3868 
3869 
3870  Event_Packer_push(&otf_event);
3871  }
3872 
3873  /********************************/
3874  /* EMIT MALP EVENT */
3875  /********************************/
3876 
3877  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3878 
3879  /* Submit event if MPI instrumented */
3880  Event_Packer_push(&_container);
3881  }
3882 
3883 
3884  return ret;
3885 }
3886 int MPI_Comm_delete_attr( MPI_Comm comm, int comm_keyval )
3887 {
3888 
3889  /* Virtualize MPI */
3890  MACRO_MPI_Comm (comm)
3891 
3892  /* Pre instrum */
3893  int _rank = Stream_desc_get()->mpi_rank;
3894 
3895  struct MALP_Trace_Event _container;
3896 
3897  /********************************/
3898  /* FILL MPI EVENT */
3899  /********************************/
3900 
3901  _container.event.mpi_event.type =
3902  T_MPI_ENUM(MPI_COMM_DELETE_ATTR)
3903  ;
3904 
3905  /* Set default source & dest before override */
3906  _container.event.mpi_event.source = _rank;
3907  _container.event.mpi_event.dest = _rank;
3908 
3909 
3910 
3911 
3912 
3913 
3914  SET_COMM (comm)
3915 
3916  /* Fill in size informations if needed */
3917  int _size = 0;
3918  #if 0
3919 
3920  #endif
3921  _container.event.mpi_event.size = _size;
3922 
3923  /********************************/
3924  /* EMIT OTF ENTER */
3925  /********************************/
3926 
3927  struct MALP_Trace_Event otf_event;
3928 
3929  uint64_t _begin = Timer_tsc ();
3930 
3933  {
3934 
3935  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
3936  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
3937  MALP_EVENT_MPI, _container.event.mpi_event.type );
3938  Event_Packer_push(&otf_event);
3939  }
3940 
3941  /********************************/
3942  /* ACTUAL FUNCTION CALL */
3943  /********************************/
3944 
3946  int ret = PMPI_Comm_delete_attr( comm, comm_keyval );
3948 
3949  /********************************/
3950  /* EMIT OTF END */
3951  /********************************/
3952 
3953  uint64_t _end = Timer_tsc();
3954  uint64_t _duration = _end - _begin;
3955 
3957  {
3959  {
3960 
3961  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
3962  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
3963  MALP_EVENT_MPI, _container.event.mpi_event.type );
3964 
3965 
3966  Event_Packer_push(&otf_event);
3967  }
3968 
3969  /********************************/
3970  /* EMIT MALP EVENT */
3971  /********************************/
3972 
3973  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
3974 
3975  /* Submit event if MPI instrumented */
3976  Event_Packer_push(&_container);
3977  }
3978 
3979 
3980  return ret;
3981 }
3982 int MPI_Comm_disconnect( MPI_Comm * comm )
3983 {
3984 
3985  /* Virtualize MPI */
3986 
3987 
3988  /* Pre instrum */
3989  int _rank = Stream_desc_get()->mpi_rank;
3990 
3991  struct MALP_Trace_Event _container;
3992 
3993  /********************************/
3994  /* FILL MPI EVENT */
3995  /********************************/
3996 
3997  _container.event.mpi_event.type =
3998  T_MPI_ENUM(MPI_COMM_DISCONNECT)
3999  ;
4000 
4001  /* Set default source & dest before override */
4002  _container.event.mpi_event.source = _rank;
4003  _container.event.mpi_event.dest = _rank;
4004 
4005 
4006 
4007 
4008 
4009 
4010 
4011 
4012  /* Fill in size informations if needed */
4013  int _size = 0;
4014  #if 0
4015 
4016  #endif
4017  _container.event.mpi_event.size = _size;
4018 
4019  /********************************/
4020  /* EMIT OTF ENTER */
4021  /********************************/
4022 
4023  struct MALP_Trace_Event otf_event;
4024 
4025  uint64_t _begin = Timer_tsc ();
4026 
4029  {
4030 
4031  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4032  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4033  MALP_EVENT_MPI, _container.event.mpi_event.type );
4034  Event_Packer_push(&otf_event);
4035  }
4036 
4037  /********************************/
4038  /* ACTUAL FUNCTION CALL */
4039  /********************************/
4040 
4042  int ret = PMPI_Comm_disconnect( comm );
4044 
4045  /********************************/
4046  /* EMIT OTF END */
4047  /********************************/
4048 
4049  uint64_t _end = Timer_tsc();
4050  uint64_t _duration = _end - _begin;
4051 
4053  {
4055  {
4056 
4057  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4058  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4059  MALP_EVENT_MPI, _container.event.mpi_event.type );
4060 
4061 
4062  Event_Packer_push(&otf_event);
4063  }
4064 
4065  /********************************/
4066  /* EMIT MALP EVENT */
4067  /********************************/
4068 
4069  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4070 
4071  /* Submit event if MPI instrumented */
4072  Event_Packer_push(&_container);
4073  }
4074 
4075 
4076  return ret;
4077 }
4078 int MPI_Comm_dup( MPI_Comm comm, MPI_Comm * newcomm )
4079 {
4080 
4081  /* Virtualize MPI */
4082  MACRO_MPI_Comm (comm)
4083 
4084  /* Pre instrum */
4085  int _rank = Stream_desc_get()->mpi_rank;
4086 
4087  struct MALP_Trace_Event _container;
4088 
4089  /********************************/
4090  /* FILL MPI EVENT */
4091  /********************************/
4092 
4093  _container.event.mpi_event.type =
4094  T_MPI_ENUM(MPI_COMM_DUP)
4095  ;
4096 
4097  /* Set default source & dest before override */
4098  _container.event.mpi_event.source = _rank;
4099  _container.event.mpi_event.dest = _rank;
4100 
4101 
4102 
4103 
4104 
4105 
4106  SET_COMM (comm)
4107 
4108  /* Fill in size informations if needed */
4109  int _size = 0;
4110  #if 0
4111 
4112  #endif
4113  _container.event.mpi_event.size = _size;
4114 
4115  /********************************/
4116  /* EMIT OTF ENTER */
4117  /********************************/
4118 
4119  struct MALP_Trace_Event otf_event;
4120 
4121  uint64_t _begin = Timer_tsc ();
4122 
4125  {
4126 
4127  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4128  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4129  MALP_EVENT_MPI, _container.event.mpi_event.type );
4130  Event_Packer_push(&otf_event);
4131  }
4132 
4133  /********************************/
4134  /* ACTUAL FUNCTION CALL */
4135  /********************************/
4136 
4138  int ret = PMPI_Comm_dup( comm, newcomm );
4140 
4141  /********************************/
4142  /* EMIT OTF END */
4143  /********************************/
4144 
4145  uint64_t _end = Timer_tsc();
4146  uint64_t _duration = _end - _begin;
4147 
4149  {
4151  {
4152 
4153  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4154  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4155  MALP_EVENT_MPI, _container.event.mpi_event.type );
4156 
4157 
4158  Event_Packer_push(&otf_event);
4159  }
4160 
4161  /********************************/
4162  /* EMIT MALP EVENT */
4163  /********************************/
4164 
4165  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4166 
4167  /* Submit event if MPI instrumented */
4168  Event_Packer_push(&_container);
4169  }
4170 
4171 
4172  return ret;
4173 }
4174 int MPI_Comm_free_keyval( int * comm_keyval )
4175 {
4176 
4177  /* Virtualize MPI */
4178 
4179 
4180  /* Pre instrum */
4181  int _rank = Stream_desc_get()->mpi_rank;
4182 
4183  struct MALP_Trace_Event _container;
4184 
4185  /********************************/
4186  /* FILL MPI EVENT */
4187  /********************************/
4188 
4189  _container.event.mpi_event.type =
4190  T_MPI_ENUM(MPI_COMM_FREE_KEYVAL)
4191  ;
4192 
4193  /* Set default source & dest before override */
4194  _container.event.mpi_event.source = _rank;
4195  _container.event.mpi_event.dest = _rank;
4196 
4197 
4198 
4199 
4200 
4201 
4202 
4203 
4204  /* Fill in size informations if needed */
4205  int _size = 0;
4206  #if 0
4207 
4208  #endif
4209  _container.event.mpi_event.size = _size;
4210 
4211  /********************************/
4212  /* EMIT OTF ENTER */
4213  /********************************/
4214 
4215  struct MALP_Trace_Event otf_event;
4216 
4217  uint64_t _begin = Timer_tsc ();
4218 
4221  {
4222 
4223  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4224  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4225  MALP_EVENT_MPI, _container.event.mpi_event.type );
4226  Event_Packer_push(&otf_event);
4227  }
4228 
4229  /********************************/
4230  /* ACTUAL FUNCTION CALL */
4231  /********************************/
4232 
4234  int ret = PMPI_Comm_free_keyval( comm_keyval );
4236 
4237  /********************************/
4238  /* EMIT OTF END */
4239  /********************************/
4240 
4241  uint64_t _end = Timer_tsc();
4242  uint64_t _duration = _end - _begin;
4243 
4245  {
4247  {
4248 
4249  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4250  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4251  MALP_EVENT_MPI, _container.event.mpi_event.type );
4252 
4253 
4254  Event_Packer_push(&otf_event);
4255  }
4256 
4257  /********************************/
4258  /* EMIT MALP EVENT */
4259  /********************************/
4260 
4261  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4262 
4263  /* Submit event if MPI instrumented */
4264  Event_Packer_push(&_container);
4265  }
4266 
4267 
4268  return ret;
4269 }
4270 int MPI_Comm_free( MPI_Comm * comm )
4271 {
4272 
4273  /* Virtualize MPI */
4274 
4275 
4276  /* Pre instrum */
4277  int _rank = Stream_desc_get()->mpi_rank;
4278 
4279  struct MALP_Trace_Event _container;
4280 
4281  /********************************/
4282  /* FILL MPI EVENT */
4283  /********************************/
4284 
4285  _container.event.mpi_event.type =
4286  T_MPI_ENUM(MPI_COMM_FREE)
4287  ;
4288 
4289  /* Set default source & dest before override */
4290  _container.event.mpi_event.source = _rank;
4291  _container.event.mpi_event.dest = _rank;
4292 
4293 
4294 
4295 
4296 
4297 
4298 
4299 
4300  /* Fill in size informations if needed */
4301  int _size = 0;
4302  #if 0
4303 
4304  #endif
4305  _container.event.mpi_event.size = _size;
4306 
4307  /********************************/
4308  /* EMIT OTF ENTER */
4309  /********************************/
4310 
4311  struct MALP_Trace_Event otf_event;
4312 
4313  uint64_t _begin = Timer_tsc ();
4314 
4317  {
4318 
4319  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4320  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4321  MALP_EVENT_MPI, _container.event.mpi_event.type );
4322  Event_Packer_push(&otf_event);
4323  }
4324 
4325  /********************************/
4326  /* ACTUAL FUNCTION CALL */
4327  /********************************/
4328 
4330  int ret = PMPI_Comm_free( comm );
4332 
4333  /********************************/
4334  /* EMIT OTF END */
4335  /********************************/
4336 
4337  uint64_t _end = Timer_tsc();
4338  uint64_t _duration = _end - _begin;
4339 
4341  {
4343  {
4344 
4345  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4346  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4347  MALP_EVENT_MPI, _container.event.mpi_event.type );
4348 
4349 
4350  Event_Packer_push(&otf_event);
4351  }
4352 
4353  /********************************/
4354  /* EMIT MALP EVENT */
4355  /********************************/
4356 
4357  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4358 
4359  /* Submit event if MPI instrumented */
4360  Event_Packer_push(&_container);
4361  }
4362 
4363 
4364  return ret;
4365 }
4366 int MPI_Comm_get_attr( MPI_Comm comm, int comm_keyval, void * attribute_val, int * flag )
4367 {
4368 
4369  /* Virtualize MPI */
4370  MACRO_MPI_Comm (comm)
4371 
4372  /* Pre instrum */
4373  int _rank = Stream_desc_get()->mpi_rank;
4374 
4375  struct MALP_Trace_Event _container;
4376 
4377  /********************************/
4378  /* FILL MPI EVENT */
4379  /********************************/
4380 
4381  _container.event.mpi_event.type =
4382  T_MPI_ENUM(MPI_COMM_GET_ATTR)
4383  ;
4384 
4385  /* Set default source & dest before override */
4386  _container.event.mpi_event.source = _rank;
4387  _container.event.mpi_event.dest = _rank;
4388 
4389 
4390 
4391 
4392 
4393 
4394  SET_COMM (comm)
4395 
4396  /* Fill in size informations if needed */
4397  int _size = 0;
4398  #if 0
4399 
4400  #endif
4401  _container.event.mpi_event.size = _size;
4402 
4403  /********************************/
4404  /* EMIT OTF ENTER */
4405  /********************************/
4406 
4407  struct MALP_Trace_Event otf_event;
4408 
4409  uint64_t _begin = Timer_tsc ();
4410 
4413  {
4414 
4415  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4416  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4417  MALP_EVENT_MPI, _container.event.mpi_event.type );
4418  Event_Packer_push(&otf_event);
4419  }
4420 
4421  /********************************/
4422  /* ACTUAL FUNCTION CALL */
4423  /********************************/
4424 
4426  int ret = PMPI_Comm_get_attr( comm, comm_keyval, attribute_val, flag );
4428 
4429  /********************************/
4430  /* EMIT OTF END */
4431  /********************************/
4432 
4433  uint64_t _end = Timer_tsc();
4434  uint64_t _duration = _end - _begin;
4435 
4437  {
4439  {
4440 
4441  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4442  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4443  MALP_EVENT_MPI, _container.event.mpi_event.type );
4444 
4445 
4446  Event_Packer_push(&otf_event);
4447  }
4448 
4449  /********************************/
4450  /* EMIT MALP EVENT */
4451  /********************************/
4452 
4453  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4454 
4455  /* Submit event if MPI instrumented */
4456  Event_Packer_push(&_container);
4457  }
4458 
4459 
4460  return ret;
4461 }
4462 int MPI_Comm_get_errhandler( MPI_Comm comm, MPI_Errhandler * erhandler )
4463 {
4464 
4465  /* Virtualize MPI */
4466  MACRO_MPI_Comm (comm)
4467 
4468  /* Pre instrum */
4469  int _rank = Stream_desc_get()->mpi_rank;
4470 
4471  struct MALP_Trace_Event _container;
4472 
4473  /********************************/
4474  /* FILL MPI EVENT */
4475  /********************************/
4476 
4477  _container.event.mpi_event.type =
4478  T_MPI_ENUM(MPI_COMM_GET_ERRHANDLER)
4479  ;
4480 
4481  /* Set default source & dest before override */
4482  _container.event.mpi_event.source = _rank;
4483  _container.event.mpi_event.dest = _rank;
4484 
4485 
4486 
4487 
4488 
4489 
4490  SET_COMM (comm)
4491 
4492  /* Fill in size informations if needed */
4493  int _size = 0;
4494  #if 0
4495 
4496  #endif
4497  _container.event.mpi_event.size = _size;
4498 
4499  /********************************/
4500  /* EMIT OTF ENTER */
4501  /********************************/
4502 
4503  struct MALP_Trace_Event otf_event;
4504 
4505  uint64_t _begin = Timer_tsc ();
4506 
4509  {
4510 
4511  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4512  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4513  MALP_EVENT_MPI, _container.event.mpi_event.type );
4514  Event_Packer_push(&otf_event);
4515  }
4516 
4517  /********************************/
4518  /* ACTUAL FUNCTION CALL */
4519  /********************************/
4520 
4522  int ret = PMPI_Comm_get_errhandler( comm, erhandler );
4524 
4525  /********************************/
4526  /* EMIT OTF END */
4527  /********************************/
4528 
4529  uint64_t _end = Timer_tsc();
4530  uint64_t _duration = _end - _begin;
4531 
4533  {
4535  {
4536 
4537  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4538  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4539  MALP_EVENT_MPI, _container.event.mpi_event.type );
4540 
4541 
4542  Event_Packer_push(&otf_event);
4543  }
4544 
4545  /********************************/
4546  /* EMIT MALP EVENT */
4547  /********************************/
4548 
4549  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4550 
4551  /* Submit event if MPI instrumented */
4552  Event_Packer_push(&_container);
4553  }
4554 
4555 
4556  return ret;
4557 }
4558 int MPI_Comm_get_name( MPI_Comm comm, char * comm_name, int * resultlen )
4559 {
4560 
4561  /* Virtualize MPI */
4562  MACRO_MPI_Comm (comm)
4563 
4564  /* Pre instrum */
4565  int _rank = Stream_desc_get()->mpi_rank;
4566 
4567  struct MALP_Trace_Event _container;
4568 
4569  /********************************/
4570  /* FILL MPI EVENT */
4571  /********************************/
4572 
4573  _container.event.mpi_event.type =
4574  T_MPI_ENUM(MPI_COMM_GET_NAME)
4575  ;
4576 
4577  /* Set default source & dest before override */
4578  _container.event.mpi_event.source = _rank;
4579  _container.event.mpi_event.dest = _rank;
4580 
4581 
4582 
4583 
4584 
4585 
4586  SET_COMM (comm)
4587 
4588  /* Fill in size informations if needed */
4589  int _size = 0;
4590  #if 0
4591 
4592  #endif
4593  _container.event.mpi_event.size = _size;
4594 
4595  /********************************/
4596  /* EMIT OTF ENTER */
4597  /********************************/
4598 
4599  struct MALP_Trace_Event otf_event;
4600 
4601  uint64_t _begin = Timer_tsc ();
4602 
4605  {
4606 
4607  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4608  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4609  MALP_EVENT_MPI, _container.event.mpi_event.type );
4610  Event_Packer_push(&otf_event);
4611  }
4612 
4613  /********************************/
4614  /* ACTUAL FUNCTION CALL */
4615  /********************************/
4616 
4618  int ret = PMPI_Comm_get_name( comm, comm_name, resultlen );
4620 
4621  /********************************/
4622  /* EMIT OTF END */
4623  /********************************/
4624 
4625  uint64_t _end = Timer_tsc();
4626  uint64_t _duration = _end - _begin;
4627 
4629  {
4631  {
4632 
4633  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4634  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4635  MALP_EVENT_MPI, _container.event.mpi_event.type );
4636 
4637 
4638  Event_Packer_push(&otf_event);
4639  }
4640 
4641  /********************************/
4642  /* EMIT MALP EVENT */
4643  /********************************/
4644 
4645  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4646 
4647  /* Submit event if MPI instrumented */
4648  Event_Packer_push(&_container);
4649  }
4650 
4651 
4652  return ret;
4653 }
4654 int MPI_Comm_get_parent( MPI_Comm * parent )
4655 {
4656 
4657  /* Virtualize MPI */
4658 
4659 
4660  /* Pre instrum */
4661  int _rank = Stream_desc_get()->mpi_rank;
4662 
4663  struct MALP_Trace_Event _container;
4664 
4665  /********************************/
4666  /* FILL MPI EVENT */
4667  /********************************/
4668 
4669  _container.event.mpi_event.type =
4670  T_MPI_ENUM(MPI_COMM_GET_PARENT)
4671  ;
4672 
4673  /* Set default source & dest before override */
4674  _container.event.mpi_event.source = _rank;
4675  _container.event.mpi_event.dest = _rank;
4676 
4677 
4678 
4679 
4680 
4681 
4682 
4683 
4684  /* Fill in size informations if needed */
4685  int _size = 0;
4686  #if 0
4687 
4688  #endif
4689  _container.event.mpi_event.size = _size;
4690 
4691  /********************************/
4692  /* EMIT OTF ENTER */
4693  /********************************/
4694 
4695  struct MALP_Trace_Event otf_event;
4696 
4697  uint64_t _begin = Timer_tsc ();
4698 
4701  {
4702 
4703  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4704  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4705  MALP_EVENT_MPI, _container.event.mpi_event.type );
4706  Event_Packer_push(&otf_event);
4707  }
4708 
4709  /********************************/
4710  /* ACTUAL FUNCTION CALL */
4711  /********************************/
4712 
4714  int ret = PMPI_Comm_get_parent( parent );
4716 
4717  /********************************/
4718  /* EMIT OTF END */
4719  /********************************/
4720 
4721  uint64_t _end = Timer_tsc();
4722  uint64_t _duration = _end - _begin;
4723 
4725  {
4727  {
4728 
4729  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4730  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4731  MALP_EVENT_MPI, _container.event.mpi_event.type );
4732 
4733 
4734  Event_Packer_push(&otf_event);
4735  }
4736 
4737  /********************************/
4738  /* EMIT MALP EVENT */
4739  /********************************/
4740 
4741  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4742 
4743  /* Submit event if MPI instrumented */
4744  Event_Packer_push(&_container);
4745  }
4746 
4747 
4748  return ret;
4749 }
4750 int MPI_Comm_group( MPI_Comm comm, MPI_Group * group )
4751 {
4752 
4753  /* Virtualize MPI */
4754  MACRO_MPI_Comm (comm)
4755 
4756  /* Pre instrum */
4757  int _rank = Stream_desc_get()->mpi_rank;
4758 
4759  struct MALP_Trace_Event _container;
4760 
4761  /********************************/
4762  /* FILL MPI EVENT */
4763  /********************************/
4764 
4765  _container.event.mpi_event.type =
4766  T_MPI_ENUM(MPI_COMM_GROUP)
4767  ;
4768 
4769  /* Set default source & dest before override */
4770  _container.event.mpi_event.source = _rank;
4771  _container.event.mpi_event.dest = _rank;
4772 
4773 
4774 
4775 
4776 
4777 
4778  SET_COMM (comm)
4779 
4780  /* Fill in size informations if needed */
4781  int _size = 0;
4782  #if 0
4783 
4784  #endif
4785  _container.event.mpi_event.size = _size;
4786 
4787  /********************************/
4788  /* EMIT OTF ENTER */
4789  /********************************/
4790 
4791  struct MALP_Trace_Event otf_event;
4792 
4793  uint64_t _begin = Timer_tsc ();
4794 
4797  {
4798 
4799  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4800  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4801  MALP_EVENT_MPI, _container.event.mpi_event.type );
4802  Event_Packer_push(&otf_event);
4803  }
4804 
4805  /********************************/
4806  /* ACTUAL FUNCTION CALL */
4807  /********************************/
4808 
4810  int ret = PMPI_Comm_group( comm, group );
4812 
4813  /********************************/
4814  /* EMIT OTF END */
4815  /********************************/
4816 
4817  uint64_t _end = Timer_tsc();
4818  uint64_t _duration = _end - _begin;
4819 
4821  {
4823  {
4824 
4825  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4826  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4827  MALP_EVENT_MPI, _container.event.mpi_event.type );
4828 
4829 
4830  Event_Packer_push(&otf_event);
4831  }
4832 
4833  /********************************/
4834  /* EMIT MALP EVENT */
4835  /********************************/
4836 
4837  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4838 
4839  /* Submit event if MPI instrumented */
4840  Event_Packer_push(&_container);
4841  }
4842 
4843 
4844  return ret;
4845 }
4846 int MPI_Comm_join( int fd, MPI_Comm * intercomm )
4847 {
4848 
4849  /* Virtualize MPI */
4850 
4851 
4852  /* Pre instrum */
4853  int _rank = Stream_desc_get()->mpi_rank;
4854 
4855  struct MALP_Trace_Event _container;
4856 
4857  /********************************/
4858  /* FILL MPI EVENT */
4859  /********************************/
4860 
4861  _container.event.mpi_event.type =
4862  T_MPI_ENUM(MPI_COMM_JOIN)
4863  ;
4864 
4865  /* Set default source & dest before override */
4866  _container.event.mpi_event.source = _rank;
4867  _container.event.mpi_event.dest = _rank;
4868 
4869 
4870 
4871 
4872 
4873 
4874 
4875 
4876  /* Fill in size informations if needed */
4877  int _size = 0;
4878  #if 0
4879 
4880  #endif
4881  _container.event.mpi_event.size = _size;
4882 
4883  /********************************/
4884  /* EMIT OTF ENTER */
4885  /********************************/
4886 
4887  struct MALP_Trace_Event otf_event;
4888 
4889  uint64_t _begin = Timer_tsc ();
4890 
4893  {
4894 
4895  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4896  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4897  MALP_EVENT_MPI, _container.event.mpi_event.type );
4898  Event_Packer_push(&otf_event);
4899  }
4900 
4901  /********************************/
4902  /* ACTUAL FUNCTION CALL */
4903  /********************************/
4904 
4906  int ret = PMPI_Comm_join( fd, intercomm );
4908 
4909  /********************************/
4910  /* EMIT OTF END */
4911  /********************************/
4912 
4913  uint64_t _end = Timer_tsc();
4914  uint64_t _duration = _end - _begin;
4915 
4917  {
4919  {
4920 
4921  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
4922  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
4923  MALP_EVENT_MPI, _container.event.mpi_event.type );
4924 
4925 
4926  Event_Packer_push(&otf_event);
4927  }
4928 
4929  /********************************/
4930  /* EMIT MALP EVENT */
4931  /********************************/
4932 
4933  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
4934 
4935  /* Submit event if MPI instrumented */
4936  Event_Packer_push(&_container);
4937  }
4938 
4939 
4940  return ret;
4941 }
4942 int MPI_Comm_rank( MPI_Comm comm, int * rank )
4943 {
4944 
4945  /* Virtualize MPI */
4946  MACRO_MPI_Comm (comm)
4947 
4948  /* Pre instrum */
4949  int _rank = Stream_desc_get()->mpi_rank;
4950 
4951  struct MALP_Trace_Event _container;
4952 
4953  /********************************/
4954  /* FILL MPI EVENT */
4955  /********************************/
4956 
4957  _container.event.mpi_event.type =
4958  T_MPI_ENUM(MPI_COMM_RANK)
4959  ;
4960 
4961  /* Set default source & dest before override */
4962  _container.event.mpi_event.source = _rank;
4963  _container.event.mpi_event.dest = _rank;
4964 
4965 
4966 
4967 
4968 
4969 
4970  SET_COMM (comm)
4971 
4972  /* Fill in size informations if needed */
4973  int _size = 0;
4974  #if 0
4975 
4976  #endif
4977  _container.event.mpi_event.size = _size;
4978 
4979  /********************************/
4980  /* EMIT OTF ENTER */
4981  /********************************/
4982 
4983  struct MALP_Trace_Event otf_event;
4984 
4985  uint64_t _begin = Timer_tsc ();
4986 
4989  {
4990 
4991  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
4992  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
4993  MALP_EVENT_MPI, _container.event.mpi_event.type );
4994  Event_Packer_push(&otf_event);
4995  }
4996 
4997  /********************************/
4998  /* ACTUAL FUNCTION CALL */
4999  /********************************/
5000 
5002  int ret = PMPI_Comm_rank( comm, rank );
5004 
5005  /********************************/
5006  /* EMIT OTF END */
5007  /********************************/
5008 
5009  uint64_t _end = Timer_tsc();
5010  uint64_t _duration = _end - _begin;
5011 
5013  {
5015  {
5016 
5017  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5018  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5019  MALP_EVENT_MPI, _container.event.mpi_event.type );
5020 
5021 
5022  Event_Packer_push(&otf_event);
5023  }
5024 
5025  /********************************/
5026  /* EMIT MALP EVENT */
5027  /********************************/
5028 
5029  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5030 
5031  /* Submit event if MPI instrumented */
5032  Event_Packer_push(&_container);
5033  }
5034 
5035 
5036  return ret;
5037 }
5038 int MPI_Comm_remote_group( MPI_Comm comm, MPI_Group * group )
5039 {
5040 
5041  /* Virtualize MPI */
5042  MACRO_MPI_Comm (comm)
5043 
5044  /* Pre instrum */
5045  int _rank = Stream_desc_get()->mpi_rank;
5046 
5047  struct MALP_Trace_Event _container;
5048 
5049  /********************************/
5050  /* FILL MPI EVENT */
5051  /********************************/
5052 
5053  _container.event.mpi_event.type =
5054  T_MPI_ENUM(MPI_COMM_REMOTE_GROUP)
5055  ;
5056 
5057  /* Set default source & dest before override */
5058  _container.event.mpi_event.source = _rank;
5059  _container.event.mpi_event.dest = _rank;
5060 
5061 
5062 
5063 
5064 
5065 
5066  SET_COMM (comm)
5067 
5068  /* Fill in size informations if needed */
5069  int _size = 0;
5070  #if 0
5071 
5072  #endif
5073  _container.event.mpi_event.size = _size;
5074 
5075  /********************************/
5076  /* EMIT OTF ENTER */
5077  /********************************/
5078 
5079  struct MALP_Trace_Event otf_event;
5080 
5081  uint64_t _begin = Timer_tsc ();
5082 
5085  {
5086 
5087  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
5088  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
5089  MALP_EVENT_MPI, _container.event.mpi_event.type );
5090  Event_Packer_push(&otf_event);
5091  }
5092 
5093  /********************************/
5094  /* ACTUAL FUNCTION CALL */
5095  /********************************/
5096 
5098  int ret = PMPI_Comm_remote_group( comm, group );
5100 
5101  /********************************/
5102  /* EMIT OTF END */
5103  /********************************/
5104 
5105  uint64_t _end = Timer_tsc();
5106  uint64_t _duration = _end - _begin;
5107 
5109  {
5111  {
5112 
5113  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5114  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5115  MALP_EVENT_MPI, _container.event.mpi_event.type );
5116 
5117 
5118  Event_Packer_push(&otf_event);
5119  }
5120 
5121  /********************************/
5122  /* EMIT MALP EVENT */
5123  /********************************/
5124 
5125  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5126 
5127  /* Submit event if MPI instrumented */
5128  Event_Packer_push(&_container);
5129  }
5130 
5131 
5132  return ret;
5133 }
5134 int MPI_Comm_remote_size( MPI_Comm comm, int * size )
5135 {
5136 
5137  /* Virtualize MPI */
5138  MACRO_MPI_Comm (comm)
5139 
5140  /* Pre instrum */
5141  int _rank = Stream_desc_get()->mpi_rank;
5142 
5143  struct MALP_Trace_Event _container;
5144 
5145  /********************************/
5146  /* FILL MPI EVENT */
5147  /********************************/
5148 
5149  _container.event.mpi_event.type =
5150  T_MPI_ENUM(MPI_COMM_REMOTE_SIZE)
5151  ;
5152 
5153  /* Set default source & dest before override */
5154  _container.event.mpi_event.source = _rank;
5155  _container.event.mpi_event.dest = _rank;
5156 
5157 
5158 
5159 
5160 
5161 
5162  SET_COMM (comm)
5163 
5164  /* Fill in size informations if needed */
5165  int _size = 0;
5166  #if 0
5167 
5168  #endif
5169  _container.event.mpi_event.size = _size;
5170 
5171  /********************************/
5172  /* EMIT OTF ENTER */
5173  /********************************/
5174 
5175  struct MALP_Trace_Event otf_event;
5176 
5177  uint64_t _begin = Timer_tsc ();
5178 
5181  {
5182 
5183  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
5184  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
5185  MALP_EVENT_MPI, _container.event.mpi_event.type );
5186  Event_Packer_push(&otf_event);
5187  }
5188 
5189  /********************************/
5190  /* ACTUAL FUNCTION CALL */
5191  /********************************/
5192 
5194  int ret = PMPI_Comm_remote_size( comm, size );
5196 
5197  /********************************/
5198  /* EMIT OTF END */
5199  /********************************/
5200 
5201  uint64_t _end = Timer_tsc();
5202  uint64_t _duration = _end - _begin;
5203 
5205  {
5207  {
5208 
5209  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5210  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5211  MALP_EVENT_MPI, _container.event.mpi_event.type );
5212 
5213 
5214  Event_Packer_push(&otf_event);
5215  }
5216 
5217  /********************************/
5218  /* EMIT MALP EVENT */
5219  /********************************/
5220 
5221  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5222 
5223  /* Submit event if MPI instrumented */
5224  Event_Packer_push(&_container);
5225  }
5226 
5227 
5228  return ret;
5229 }
5230 int MPI_Comm_set_attr( MPI_Comm comm, int comm_keyval, void * attribute_val )
5231 {
5232 
5233  /* Virtualize MPI */
5234  MACRO_MPI_Comm (comm)
5235 
5236  /* Pre instrum */
5237  int _rank = Stream_desc_get()->mpi_rank;
5238 
5239  struct MALP_Trace_Event _container;
5240 
5241  /********************************/
5242  /* FILL MPI EVENT */
5243  /********************************/
5244 
5245  _container.event.mpi_event.type =
5246  T_MPI_ENUM(MPI_COMM_SET_ATTR)
5247  ;
5248 
5249  /* Set default source & dest before override */
5250  _container.event.mpi_event.source = _rank;
5251  _container.event.mpi_event.dest = _rank;
5252 
5253 
5254 
5255 
5256 
5257 
5258  SET_COMM (comm)
5259 
5260  /* Fill in size informations if needed */
5261  int _size = 0;
5262  #if 0
5263 
5264  #endif
5265  _container.event.mpi_event.size = _size;
5266 
5267  /********************************/
5268  /* EMIT OTF ENTER */
5269  /********************************/
5270 
5271  struct MALP_Trace_Event otf_event;
5272 
5273  uint64_t _begin = Timer_tsc ();
5274 
5277  {
5278 
5279  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
5280  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
5281  MALP_EVENT_MPI, _container.event.mpi_event.type );
5282  Event_Packer_push(&otf_event);
5283  }
5284 
5285  /********************************/
5286  /* ACTUAL FUNCTION CALL */
5287  /********************************/
5288 
5290  int ret = PMPI_Comm_set_attr( comm, comm_keyval, attribute_val );
5292 
5293  /********************************/
5294  /* EMIT OTF END */
5295  /********************************/
5296 
5297  uint64_t _end = Timer_tsc();
5298  uint64_t _duration = _end - _begin;
5299 
5301  {
5303  {
5304 
5305  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5306  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5307  MALP_EVENT_MPI, _container.event.mpi_event.type );
5308 
5309 
5310  Event_Packer_push(&otf_event);
5311  }
5312 
5313  /********************************/
5314  /* EMIT MALP EVENT */
5315  /********************************/
5316 
5317  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5318 
5319  /* Submit event if MPI instrumented */
5320  Event_Packer_push(&_container);
5321  }
5322 
5323 
5324  return ret;
5325 }
5326 int MPI_Comm_set_errhandler( MPI_Comm comm, MPI_Errhandler errhandler )
5327 {
5328 
5329  /* Virtualize MPI */
5330  MACRO_MPI_Comm (comm)
5331 
5332  /* Pre instrum */
5333  int _rank = Stream_desc_get()->mpi_rank;
5334 
5335  struct MALP_Trace_Event _container;
5336 
5337  /********************************/
5338  /* FILL MPI EVENT */
5339  /********************************/
5340 
5341  _container.event.mpi_event.type =
5342  T_MPI_ENUM(MPI_COMM_SET_ERRHANDLER)
5343  ;
5344 
5345  /* Set default source & dest before override */
5346  _container.event.mpi_event.source = _rank;
5347  _container.event.mpi_event.dest = _rank;
5348 
5349 
5350 
5351 
5352 
5353 
5354  SET_COMM (comm)
5355 
5356  /* Fill in size informations if needed */
5357  int _size = 0;
5358  #if 0
5359 
5360  #endif
5361  _container.event.mpi_event.size = _size;
5362 
5363  /********************************/
5364  /* EMIT OTF ENTER */
5365  /********************************/
5366 
5367  struct MALP_Trace_Event otf_event;
5368 
5369  uint64_t _begin = Timer_tsc ();
5370 
5373  {
5374 
5375  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
5376  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
5377  MALP_EVENT_MPI, _container.event.mpi_event.type );
5378  Event_Packer_push(&otf_event);
5379  }
5380 
5381  /********************************/
5382  /* ACTUAL FUNCTION CALL */
5383  /********************************/
5384 
5386  int ret = PMPI_Comm_set_errhandler( comm, errhandler );
5388 
5389  /********************************/
5390  /* EMIT OTF END */
5391  /********************************/
5392 
5393  uint64_t _end = Timer_tsc();
5394  uint64_t _duration = _end - _begin;
5395 
5397  {
5399  {
5400 
5401  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5402  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5403  MALP_EVENT_MPI, _container.event.mpi_event.type );
5404 
5405 
5406  Event_Packer_push(&otf_event);
5407  }
5408 
5409  /********************************/
5410  /* EMIT MALP EVENT */
5411  /********************************/
5412 
5413  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5414 
5415  /* Submit event if MPI instrumented */
5416  Event_Packer_push(&_container);
5417  }
5418 
5419 
5420  return ret;
5421 }
5422 int MPI_Comm_set_name( MPI_Comm comm, char * comm_name )
5423 {
5424 
5425  /* Virtualize MPI */
5426  MACRO_MPI_Comm (comm)
5427 
5428  /* Pre instrum */
5429  int _rank = Stream_desc_get()->mpi_rank;
5430 
5431  struct MALP_Trace_Event _container;
5432 
5433  /********************************/
5434  /* FILL MPI EVENT */
5435  /********************************/
5436 
5437  _container.event.mpi_event.type =
5438  T_MPI_ENUM(MPI_COMM_SET_NAME)
5439  ;
5440 
5441  /* Set default source & dest before override */
5442  _container.event.mpi_event.source = _rank;
5443  _container.event.mpi_event.dest = _rank;
5444 
5445 
5446 
5447 
5448 
5449 
5450  SET_COMM (comm)
5451 
5452  /* Fill in size informations if needed */
5453  int _size = 0;
5454  #if 0
5455 
5456  #endif
5457  _container.event.mpi_event.size = _size;
5458 
5459  /********************************/
5460  /* EMIT OTF ENTER */
5461  /********************************/
5462 
5463  struct MALP_Trace_Event otf_event;
5464 
5465  uint64_t _begin = Timer_tsc ();
5466 
5469  {
5470 
5471  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
5472  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
5473  MALP_EVENT_MPI, _container.event.mpi_event.type );
5474  Event_Packer_push(&otf_event);
5475  }
5476 
5477  /********************************/
5478  /* ACTUAL FUNCTION CALL */
5479  /********************************/
5480 
5482  int ret = PMPI_Comm_set_name( comm, comm_name );
5484 
5485  /********************************/
5486  /* EMIT OTF END */
5487  /********************************/
5488 
5489  uint64_t _end = Timer_tsc();
5490  uint64_t _duration = _end - _begin;
5491 
5493  {
5495  {
5496 
5497  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5498  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5499  MALP_EVENT_MPI, _container.event.mpi_event.type );
5500 
5501 
5502  Event_Packer_push(&otf_event);
5503  }
5504 
5505  /********************************/
5506  /* EMIT MALP EVENT */
5507  /********************************/
5508 
5509  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5510 
5511  /* Submit event if MPI instrumented */
5512  Event_Packer_push(&_container);
5513  }
5514 
5515 
5516  return ret;
5517 }
5518 int MPI_Comm_size( MPI_Comm comm, int * size )
5519 {
5520 
5521  /* Virtualize MPI */
5522  MACRO_MPI_Comm (comm)
5523 
5524  /* Pre instrum */
5525  int _rank = Stream_desc_get()->mpi_rank;
5526 
5527  struct MALP_Trace_Event _container;
5528 
5529  /********************************/
5530  /* FILL MPI EVENT */
5531  /********************************/
5532 
5533  _container.event.mpi_event.type =
5534  T_MPI_ENUM(MPI_COMM_SIZE)
5535  ;
5536 
5537  /* Set default source & dest before override */
5538  _container.event.mpi_event.source = _rank;
5539  _container.event.mpi_event.dest = _rank;
5540 
5541 
5542 
5543 
5544 
5545 
5546  SET_COMM (comm)
5547 
5548  /* Fill in size informations if needed */
5549  int _size = 0;
5550  #if 0
5551 
5552  #endif
5553  _container.event.mpi_event.size = _size;
5554 
5555  /********************************/
5556  /* EMIT OTF ENTER */
5557  /********************************/
5558 
5559  struct MALP_Trace_Event otf_event;
5560 
5561  uint64_t _begin = Timer_tsc ();
5562 
5565  {
5566 
5567  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _begin, 0);
5568  OTF_Event_forge( &otf_event, OTF_EVENT_ENTER,
5569  MALP_EVENT_MPI, _container.event.mpi_event.type );
5570  Event_Packer_push(&otf_event);
5571  }
5572 
5573  /********************************/
5574  /* ACTUAL FUNCTION CALL */
5575  /********************************/
5576 
5578  int ret = PMPI_Comm_size( comm, size );
5580 
5581  /********************************/
5582  /* EMIT OTF END */
5583  /********************************/
5584 
5585  uint64_t _end = Timer_tsc();
5586  uint64_t _duration = _end - _begin;
5587 
5589  {
5591  {
5592 
5593  MALP_Trace_Event_fill( &otf_event, MALP_EVENT_OTF, _end, _duration);
5594  OTF_Event_forge( &otf_event, OTF_EVENT_LEAVE,
5595  MALP_EVENT_MPI, _container.event.mpi_event.type );
5596 
5597 
5598  Event_Packer_push(&otf_event);
5599  }
5600 
5601  /********************************/
5602  /* EMIT MALP EVENT */
5603  /********************************/
5604 
5605  MALP_Trace_Event_fill( &_container, MALP_EVENT_MPI, _begin, _duration );
5606 
5607  /* Submit event if MPI instrumented */
5608  Event_Packer_push(&_container);
5609  }
5610 
5611 
5612  return ret;
5613 }
5614 int MPI_Comm_spawn( char * command, char ** argv, int maxpr