Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Basic_Events.h
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 #ifndef BASIC_EVENT_TYPES
20 #define BASIC_EVENT_TYPES
21 
22 #include <string.h>
23 
24 typedef enum
25 {
30 
31 
32 typedef enum
33 {
50 } Event_type;
51 
52 
53 static const char *const Event_types_datas[T_COUNT][3] =
54 {
55  { "Unknown" , "" , "T_NONE" },
56  { "MPI Common" , "" , "T_MPI_COMMON" },
57  { "MPI Collectives" , "" , "T_MPI_COLL" },
58  { "MPI One sided" , "" , "T_MPI_ONE_SIDED" },
59  { "MPI Point to point" , "" , "T_MPI_P2P" },
60  { "MPI Key management" , "" , "T_MPI_KEY" },
61  { "MPI Operations" , "" , "T_MPI_OP" },
62  { "MPI Request and status management" , "" , "T_MPI_REQ_AND_STAT" },
63  { "MPI Info" , "" , "T_MPI_INFO" },
64  { "MPI Error handling" , "" , "T_MPI_ERROR" },
65  { "MPI Asynchronous communications" , "" , "T_MPI_ASYNC" },
66  { "MPI IO" , "" , "T_MPI_IO" },
67  { "MPI Communicators and groups" , "" , "T_MPI_COMM_AND_GROUPS" },
68  { "MPI Topology management" , "" , "T_MPI_TOPO" },
69  { "MPI Type and pack handling" , "", "T_MPI_TYPES_AND_PACKS" }
70 };
71 
72 static inline Event_type Event_types_parse( char *type )
73 {
74  if( !type )
75  return T_NONE;
76 
77  int i;
78 
79  for( i = 0 ; i < T_COUNT ; i++ )
80  {
81  if( !strcmp( type, Event_types_datas[i][2] ) )
82  return 1;
83 
84  }
85 
86  return T_NONE;
87 }
88 
89 
90 /* MPI Members */
91 
92 static const char *const MPI_COMMON[] =
93 {
94  "MPI_Finalize",
95  "MPI_Finalized",
96  "MPI_Abort",
97  "MPI_Init",
98  "MPI_Initialized",
99  "MPI_Init_thread",
100  "MPI_Get_count",
101  "MPI_Get_elements",
102  "MPI_Get_processor_name",
103  "MPI_Get_version",
104  "MPI_Is_thread_main",
105  "MPI_Query_thread",
106  "MPI_Pcontrol",
107  "MPI_Wtick",
108  "MPI_Wtime",
109  NULL
110 };
111 static const char *const MPI_COLL[] =
112 {
113  "MPI_Allgather",
114  "MPI_Allgatherv",
115  "MPI_Allreduce",
116  "MPI_Alltoall",
117  "MPI_Alltoallv",
118  "MPI_Alltoallw",
119  "MPI_Barrier",
120  "MPI_Bcast",
121  "MPI_Exscan",
122  "MPI_Gather",
123  "MPI_Gatherv",
124  "MPI_Reduce",
125  "MPI_Reduce_local",
126  "MPI_Reduce_scatter",
127  "MPI_Scan",
128  "MPI_Scatter",
129  "MPI_Scatterv",
130  NULL
131 };
132 
133 static const char *const MPI_ONE_SIDED[] =
134 {
135  "MPI_Accumulate",
136  "MPI_Address",
137  "MPI_Alloc_mem",
138  "MPI_Free_mem",
139  "MPI_Get_address",
140  "MPI_Get",
141  "MPI_Put",
142  "MPI_Win_call_errhandler",
143  "MPI_Win_complete",
144  "MPI_Win_create",
145  "MPI_Win_create_errhandler",
146  "MPI_Win_create_keyval",
147  "MPI_Win_delete_attr",
148  "MPI_Win_fence",
149  "MPI_Win_free",
150  "MPI_Win_free_keyval",
151  "MPI_Win_get_attr",
152  "MPI_Win_get_errhandler",
153  "MPI_Win_get_group",
154  "MPI_Win_get_name",
155  "MPI_Win_lock",
156  "MPI_Win_post",
157  "MPI_Win_set_attr",
158  "MPI_Win_set_errhandler",
159  "MPI_Win_set_name",
160  "MPI_Win_start",
161  "MPI_Win_test",
162  "MPI_Win_unlock",
163  "MPI_Win_wait",
164  NULL
165 };
166 
167 static const char *const MPI_P2P[] =
168 {
169  "MPI_Bsend",
170  "MPI_Bsend_init",
171  "MPI_Buffer_attach",
172  "MPI_Buffer_detach",
173  "MPI_Ibsend",
174  "MPI_Recv_init",
175  "MPI_Recv",
176  "MPI_Rsend",
177  "MPI_Rsend_init",
178  "MPI_Send_init",
179  "MPI_Send",
180  "MPI_Sendrecv",
181  "MPI_Sendrecv_replace",
182  "MPI_Ssend_init",
183  "MPI_Ssend",
184  "MPI_Start",
185  "MPI_Startall",
186  NULL
187 };
188 
189 static const char *const MPI_KEY[] =
190 {
191  "MPI_Attr_delete",
192  "MPI_Attr_get",
193  "MPI_Attr_put",
194  "MPI_Keyval_create",
195  "MPI_Keyval_free",
196  NULL
197 };
198 
199 static const char *const MPI_OP[] =
200 {
201  "MPI_Op_c2f",
202  "MPI_Op_commutative",
203  "MPI_Op_create",
204  "MPI_Op MPI_Op_f2c",
205  "MPI_Op_free",
206  NULL
207 };
208 
209 static const char *const MPI_REQ_AND_STAT[] =
210 {
211  "MPI_Grequest_complete",
212  "MPI_Grequest_start",
213  "MPI_Request_free",
214  "MPI_Request_get_status",
215  "MPI_Status_set_cancelled",
216  "MPI_Status_set_elements",
217  NULL
218 };
219 
220 static const char *const MPI_INFO[] =
221 {
222  "MPI_Info_create",
223  "MPI_Info_delete",
224  "MPI_Info_dup",
225  "MPI_Info_free",
226  "MPI_Info_get",
227  "MPI_Info_get_nkeys",
228  "MPI_Info_get_nthkey",
229  "MPI_Info_get_valuelen",
230  "MPI_Info_set",
231  NULL
232 };
233 
234 static const char *const MPI_ERROR[] =
235 {
236  "MPI_Add_error_class",
237  "MPI_Add_error_code",
238  "MPI_Add_error_string",
239  "MPI_Dims_create",
240  "MPI_Errhandler_create",
241  "MPI_Errhandler_free",
242  "MPI_Errhandler_get",
243  "MPI_Errhandler_set",
244  "MPI_Error_class",
245  "MPI_Error_string",
246  NULL
247 };
248 
249 static const char *const MPI_ASYNC[] =
250 {
251  "MPI_Cancel",
252  "MPI_Ibsend",
253  "MPI_Iprobe",
254  "MPI_Irecv",
255  "MPI_Irsend",
256  "MPI_Isend",
257  "MPI_Issend",
258  "MPI_Probe",
259  "MPI_Testall",
260  "MPI_Testany",
261  "MPI_Test",
262  "MPI_Test_cancelled",
263  "MPI_Testsome",
264  "MPI_Waitall",
265  "MPI_Waitany",
266  "MPI_Wait",
267  "MPI_Waitsome",
268  NULL
269 };
270 
271 static const char *const MPI_IO[] =
272 {
273  "MPI_File_call_errhandler",
274  "MPI_File_create_errhandler",
275  "MPI_File_set_errhandler",
276  "MPI_File_get_errhandler",
277  "MPI_File_open",
278  "MPI_File_close",
279  "MPI_File_delete",
280  "MPI_File_set_size",
281  "MPI_File_preallocate",
282  "MPI_File_get_size",
283  "MPI_File_get_group",
284  "MPI_File_get_amode",
285  "MPI_File_set_info",
286  "MPI_File_get_info",
287  "MPI_File_set_view",
288  "MPI_File_get_view",
289  "MPI_File_read_at",
290  "MPI_File_read_at_all",
291  "MPI_File_write_at",
292  "MPI_File_write_at_all",
293  "MPI_File_iread_at",
294  "MPI_File_iwrite_at",
295  "MPI_File_read",
296  "MPI_File_read_all",
297  "MPI_File_write",
298  "MPI_File_write_all",
299  "MPI_File_iread",
300  "MPI_File_iwrite",
301  "MPI_File_seek",
302  "MPI_File_get_position",
303  "MPI_File_get_byte_offset",
304  "MPI_File_read_shared",
305  "MPI_File_write_shared",
306  "MPI_File_iread_shared",
307  "MPI_File_iwrite_shared",
308  "MPI_File_read_ordered",
309  "MPI_File_write_ordered",
310  "MPI_File_seek_shared",
311  "MPI_File_get_position_shared",
312  "MPI_File_read_at_all_begin",
313  "MPI_File_read_at_all_end",
314  "MPI_File_write_at_all_begin",
315  "MPI_File_write_at_all_end",
316  "MPI_File_read_all_begin",
317  "MPI_File_read_all_end",
318  "MPI_File_write_all_begin",
319  "MPI_File_write_all_end",
320  "MPI_File_read_ordered_begin",
321  "MPI_File_read_ordered_end",
322  "MPI_File_write_ordered_begin",
323  "MPI_File_write_ordered_end",
324  "MPI_File_get_type_extent",
325  "MPI_File_set_atomicity",
326  "MPI_File_get_atomicity",
327  "MPI_File_sync",
328  NULL
329 };
330 
331 static const char *const MPI_COMM_AND_GROUPS[] =
332 {
333  "MPI_Intercomm_create",
334  "MPI_Intercomm_merge",
335  "MPI_Lookup_name",
336  "MPI_Open_port",
337  "MPI_Close_port",
338  "MPI_Comm_accept",
339  "MPI_Comm_call_errhandler",
340  "MPI_Comm_compare",
341  "MPI_Comm_connect",
342  "MPI_Comm_create_errhandler",
343  "MPI_Comm_create_keyval",
344  "MPI_Comm_create",
345  "MPI_Comm_delete_attr",
346  "MPI_Comm_disconnect",
347  "MPI_Comm_dup",
348  "MPI_Comm_free_keyval",
349  "MPI_Comm_free",
350  "MPI_Comm_get_attr",
351  "MPI_Comm_get_errhandler",
352  "MPI_Comm_get_name",
353  "MPI_Comm_get_parent",
354  "MPI_Comm_group",
355  "MPI_Comm_join",
356  "MPI_Comm_rank",
357  "MPI_Comm_remote_group",
358  "MPI_Comm_remote_size",
359  "MPI_Comm_set_attr",
360  "MPI_Comm_set_errhandler",
361  "MPI_Comm_set_name",
362  "MPI_Comm_size",
363  "MPI_Comm_spawn",
364  "MPI_Comm_spawn_multiple",
365  "MPI_Comm_split",
366  "MPI_Comm_test_inter",
367  "MPI_Group_compare",
368  "MPI_Group_difference",
369  "MPI_Group_excl",
370  "MPI_Group_free",
371  "MPI_Group_incl",
372  "MPI_Group_intersection",
373  "MPI_Group_range_excl",
374  "MPI_Group_range_incl",
375  "MPI_Group_rank",
376  "MPI_Group_size",
377  "MPI_Group_translate_ranks",
378  "MPI_Group_union",
379  "MPI_Publish_name",
380  "MPI_Unpublish_name",
381  NULL
382 };
383 
384 static const char *const MPI_TOPO[] =
385 {
386  "MPI_Graph_create",
387  "MPI_Graph_get",
388  "MPI_Graph_map",
389  "MPI_Graph_neighbors_count",
390  "MPI_Graph_neighbors",
391  "MPI_Graphdims_get",
392  "MPI_Cart_coords",
393  "MPI_Cart_create",
394  "MPI_Cart_get",
395  "MPI_Cart_map",
396  "MPI_Cart_rank",
397  "MPI_Cart_shift",
398  "MPI_Cart_sub",
399  "MPI_Cartdim_get",
400  "MPI_Topo_test",
401  NULL
402 };
403 
404 static const char *const MPI_TYPES_AND_PACKS[] =
405 {
406  "MPI_Pack_external",
407  "MPI_Pack_external_size",
408  "MPI_Pack",
409  "MPI_Pack_size",
410  "MPI_Register_datarep",
411  "MPI_Type_commit",
412  "MPI_Type_contiguous",
413  "MPI_Type_create_darray",
414  "MPI_Type_create_f90_complex",
415  "MPI_Type_create_f90_integer",
416  "MPI_Type_create_f90_real",
417  "MPI_Type_create_hindexed",
418  "MPI_Type_create_hvector",
419  "MPI_Type_create_keyval",
420  "MPI_Type_create_indexed_block",
421  "MPI_Type_create_struct",
422  "MPI_Type_create_subarray",
423  "MPI_Type_create_resized",
424  "MPI_Type_delete_attr",
425  "MPI_Type_dup",
426  "MPI_Type_extent",
427  "MPI_Type_free",
428  "MPI_Type_free_keyval",
429  "MPI_Type_get_attr",
430  "MPI_Type_get_contents",
431  "MPI_Type_get_envelope",
432  "MPI_Type_get_extent",
433  "MPI_Type_get_name",
434  "MPI_Type_get_true_extent",
435  "MPI_Type_hindexed",
436  "MPI_Type_hvector",
437  "MPI_Type_indexed",
438  "MPI_Type_lb",
439  "MPI_Type_match_size",
440  "MPI_Type_set_attr",
441  "MPI_Type_set_name",
442  "MPI_Type_size",
443  "MPI_Type_struct",
444  "MPI_Type_ub",
445  "MPI_Type_vector",
446  "MPI_Unpack",
447  "MPI_Unpack_external",
448  NULL
449 };
450 
451 
452 static const char * const * const Event_types_members[T_COUNT] =
453 {
454  NULL,
455  MPI_COMMON,
456  MPI_COLL,
458  MPI_P2P,
459  MPI_KEY,
460  MPI_OP,
462  MPI_INFO,
463  MPI_ERROR,
464  MPI_ASYNC,
465  MPI_IO,
467  MPI_TOPO,
469 };
470 
471 
473 {
474  C_NONE,
475  C_MPI,
476  C_MPI,
477  C_MPI,
478  C_MPI,
479  C_MPI,
480  C_MPI,
481  C_MPI,
482  C_MPI,
483  C_MPI,
484  C_MPI,
485  C_MPI,
486  C_MPI,
487  C_MPI,
488  C_MPI
489 };
490 
491 
492 
493 
494 
495 
496 
497 
498 
499 
500 
501 
502 #endif /* BASIC_EVENT_TYPES */
static const char *const *const Event_types_members[T_COUNT]
Definition: Basic_Events.h:452
static const char *const MPI_OP[]
Definition: Basic_Events.h:199
Event_type
Definition: Basic_Events.h:32
static const char *const MPI_TYPES_AND_PACKS[]
Definition: Basic_Events.h:404
static const char *const MPI_COLL[]
Definition: Basic_Events.h:111
static const char *const Event_types_datas[T_COUNT][3]
Definition: Basic_Events.h:53
static const char *const MPI_P2P[]
Definition: Basic_Events.h:167
static const char *const MPI_TOPO[]
Definition: Basic_Events.h:384
static const char *const MPI_ASYNC[]
Definition: Basic_Events.h:249
static const Event_category Event_types_cat[T_COUNT]
Definition: Basic_Events.h:472
static Event_type Event_types_parse(char *type)
Definition: Basic_Events.h:72
Event_category
Definition: Basic_Events.h:24
static const char *const MPI_KEY[]
Definition: Basic_Events.h:189
static const char *const MPI_ONE_SIDED[]
Definition: Basic_Events.h:133
static const char *const MPI_COMM_AND_GROUPS[]
Definition: Basic_Events.h:331
static const char *const MPI_IO[]
Definition: Basic_Events.h:271
static const char *const MPI_REQ_AND_STAT[]
Definition: Basic_Events.h:209
static const char *const MPI_ERROR[]
Definition: Basic_Events.h:234
static const char *const MPI_INFO[]
Definition: Basic_Events.h:220
static const char *const MPI_COMMON[]
Definition: Basic_Events.h:92