xref: /petsc/include/petsclog.h (revision 02bf810659e0f51f0b4ebae749e7cee654e786ba)
1 /* $Id: petsclog.h,v 1.111 1997/08/13 22:27:41 bsmith Exp bsmith $ */
2 
3 /*
4     Defines profile/logging in PETSc.
5 */
6 
7 #if !defined(__PLOG_PACKAGE)
8 #define __PLOG_PACKAGE
9 #include "petsc.h"
10 
11 /*
12   Lists all PETSc events that are logged/profiled.
13 
14   If you add an event here, make sure you add it to
15   petsc/bin/petscview.cfg,
16   petsc/bin/petscview,
17   petsc/src/plog/src/plog.c,
18   petsc/src/plog/src/plogmpe.c, and
19   petsc/include/FINCLUDE/petsclog.h!!!
20 */
21 #define MAT_Mult                                0
22 #define MAT_MatrixFreeMult                      1
23 #define MAT_AssemblyBegin                       2
24 #define MAT_AssemblyEnd                         3
25 #define MAT_GetReordering                       4
26 #define MAT_MultTrans                           5
27 #define MAT_MultAdd                             6
28 #define MAT_MultTransAdd                        7
29 #define MAT_LUFactor                            8
30 #define MAT_CholeskyFactor                      9
31 #define MAT_LUFactorSymbolic                    10
32 #define MAT_ILUFactorSymbolic                   11
33 #define MAT_CholeskyFactorSymbolic              12
34 #define MAT_IncompleteCholeskyFactorSymbolic    13
35 #define MAT_LUFactorNumeric                     14
36 #define MAT_CholeskyFactorNumeric               15
37 #define MAT_Relax                               16
38 #define MAT_Copy                                17
39 #define MAT_Convert                             18
40 #define MAT_Scale                               19
41 #define MAT_ZeroEntries                         20
42 #define MAT_Solve                               21
43 #define MAT_SolveAdd                            22
44 #define MAT_SolveTrans                          23
45 #define MAT_SolveTransAdd                       24
46 #define MAT_SetValues                           25
47 #define MAT_ForwardSolve                        26
48 #define MAT_BackwardSolve                       27
49 #define MAT_Load                                28
50 #define MAT_View                                29
51 #define MAT_ILUFactor                           30
52 #define MAT_GetColoring                         31
53 #define MAT_GetSubMatrices                      32
54 #define MAT_GetValues                           33
55 #define MAT_IncreaseOverlap                     34
56 #define MAT_GetRow                              35
57 
58 #define VEC_ScatterBarrier                      39
59 #define VEC_Dot                                 40
60 #define VEC_Norm                                41
61 #define VEC_Max                                 42
62 #define VEC_Min                                 43
63 #define VEC_TDot                                44
64 #define VEC_Scale                               45
65 #define VEC_Copy                                46
66 #define VEC_Set                                 47
67 #define VEC_AXPY                                48
68 #define VEC_AYPX                                49
69 #define VEC_Swap                                50
70 #define VEC_WAXPY                               51
71 #define VEC_AssemblyBegin                       52
72 #define VEC_AssemblyEnd                         53
73 #define VEC_MTDot                               54
74 #define VEC_MDot                                55
75 #define VEC_MAXPY                               56
76 #define VEC_PMult                               57
77 #define VEC_SetValues                           58
78 #define VEC_Load                                59
79 #define VEC_View                                60
80 #define VEC_ScatterBegin                        61
81 #define VEC_ScatterEnd                          62
82 #define VEC_SetRandom                           63
83 
84 #define VEC_NormBarrier                         64
85 #define VEC_NormComm                            65
86 #define VEC_DotBarrier                          66
87 #define VEC_DotComm                             67
88 #define VEC_MDotBarrier                         68
89 #define VEC_MDotComm                            69
90 
91 #define SLES_Solve                              70
92 #define SLES_SetUp                              71
93 
94 #define KSP_GMRESOrthogonalization              72
95 
96 #define PC_ModifySubMatrices                    74
97 #define PC_SetUp                                75
98 #define PC_SetUpOnBlocks                        76
99 #define PC_Apply                                77
100 #define PC_ApplySymmetricLeft                   78
101 #define PC_ApplySymmetricRight                  79
102 
103 #define SNES_Solve                              80
104 #define SNES_LineSearch                         81
105 #define SNES_FunctionEval                       82
106 #define SNES_JacobianEval                       83
107 #define SNES_MinimizationFunctionEval           84
108 #define SNES_GradientEval                       85
109 #define SNES_HessianEval                        86
110 
111 #define TS_Step                                 90
112 #define TS_PseudoComputeTimeStep                91
113 
114 #define Petsc_Barrier                           100
115 
116 #define EC_SetUp                                105
117 #define EC_Solve                                106
118 
119 #define DFVec_RefineVector                      110
120 #define DFVec_AssembleFullVector                111
121 #define DFVec_GetComponentVectors               112
122 #define DFVec_DrawContours                      113
123 
124 /*
125    Event numbers PLOG_USER_EVENT_LOW to PLOG_USER_EVENT_HIGH are reserved
126    for applications.  Make sure that src/plog/src/plog.c defines enough
127    entries in (*name)[] to go up to PLOG_USER_EVENT_HIGH.
128 */
129 #define PLOG_USER_EVENT_LOW_STATIC              120
130 #define PLOG_USER_EVENT_HIGH                    200
131 
132 /* Global flop counter */
133 extern PLogDouble _TotalFlops;
134 
135 /* General logging of information; different from event logging */
136 extern int PLogInfo(void*,char*,...);
137 extern int PLogInfoDeactivateClass(int);
138 extern int PLogInfoActivateClass(int);
139 extern int PLogPrintInfo;  /* if 1, indicates PLogInfo() is turned on */
140 
141 #if defined(PETSC_LOG)  /* --------------------------------------------*/
142 
143 #define PLogFlops(n) {_TotalFlops += (n);}
144 
145 #if defined (HAVE_MPE)
146 #include "mpe.h"
147 #define MPEBEGIN    1000
148 extern int PLogMPEBegin();
149 extern int PLogMPEDump(char *);
150 extern int UseMPE,PLogEventMPEFlags[];
151 extern int PLogEventMPEActivate(int);
152 extern int PLogEventMPEDeactivate(int);
153 #else
154 #define PLogEventMPEActivate(a) 0
155 #define PLogEventMPEDeactivate(a) 0
156 #endif
157 
158 extern int PLogEventActivate(int);
159 extern int PLogEventDeactivate(int);
160 
161 extern int PLogEventActivateClass(int);
162 extern int PLogEventDeactivateClass(int);
163 
164 extern int PLogEventFlags[];
165 extern int (*_PLogPLB)(int,int,PetscObject,PetscObject,PetscObject,PetscObject);
166 extern int (*_PLogPLE)(int,int,PetscObject,PetscObject,PetscObject,PetscObject);
167 extern int (*_PLogPHC)(PetscObject);
168 extern int (*_PLogPHD)(PetscObject);
169 
170 #if defined(HAVE_MPE)
171 #define PLogEventBarrierBegin(e,o1,o2,o3,o4,cm) \
172   { \
173     if (_PLogPLB && PLogEventFlags[e]) {                           \
174       PLogEventBegin((e),o1,o2,o3,o4);                                   \
175       if (UseMPE && PLogEventMPEFlags[(e)])\
176         MPE_Log_event(MPEBEGIN+2*(e),0,"");\
177       MPI_Barrier(cm);                                             \
178       PLogEventEnd((e),o1,o2,o3,o4);                                     \
179       if (UseMPE && PLogEventMPEFlags[(e)])\
180         MPE_Log_event(MPEBEGIN+2*((e)+1),0,"");\
181     }                                                                \
182     PLogEventBegin(e+1,o1,o2,o3,o4);                                   \
183     if (UseMPE && PLogEventMPEFlags[(e)+1])\
184       MPE_Log_event(MPEBEGIN+2*((e)+1),0,"");\
185   }
186 #define PLogEventBegin(e,o1,o2,o3,o4)  \
187   {  \
188    if (_PLogPLB && PLogEventFlags[(e)]) \
189      (*_PLogPLB)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
190    if (UseMPE && PLogEventMPEFlags[(e)])\
191      MPE_Log_event(MPEBEGIN+2*(e),0,"");\
192   }
193 #else
194 #define PLogEventBarrierBegin(e,o1,o2,o3,o4,cm) \
195   { \
196     if (_PLogPLB && PLogEventFlags[(e)]) {                           \
197       PLogEventBegin((e),o1,o2,o3,o4);                                   \
198       MPI_Barrier(cm);                                             \
199       PLogEventEnd((e),o1,o2,o3,o4);                                     \
200     }                                                                \
201     PLogEventBegin((e)+1,o1,o2,o3,o4);                                   \
202   }
203 #define PLogEventBegin(e,o1,o2,o3,o4)  \
204   {  \
205    if (_PLogPLB && PLogEventFlags[(e)]) \
206      (*_PLogPLB)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
207   }
208 #endif
209 
210 #if defined(HAVE_MPE)
211 #define PLogEventBarrierEnd(e,o1,o2,o3,o4,cm) {\
212   if (_PLogPLE && PLogEventFlags[(e)+1]) \
213     (*_PLogPLE)((e)+1,0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
214   if (UseMPE && PLogEventMPEFlags[(e)+1])\
215      MPE_Log_event(MPEBEGIN+2*((e)+1)+1,0,"");\
216   }
217 #define PLogEventEnd(e,o1,o2,o3,o4) {\
218   if (_PLogPLE && PLogEventFlags[(e)]) \
219     (*_PLogPLE)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
220   if (UseMPE && PLogEventMPEFlags[(e)])\
221      MPE_Log_event(MPEBEGIN+2*(e)+1,0,"");\
222   }
223 #else
224 #define PLogEventBarrierEnd(e,o1,o2,o3,o4,cm) {\
225   if (_PLogPLE && PLogEventFlags[(e)+1]) \
226     (*_PLogPLE)((e)+1,0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
227   }
228 #define PLogEventEnd(e,o1,o2,o3,o4) {\
229   if (_PLogPLE && PLogEventFlags[(e)]) \
230     (*_PLogPLE)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
231   }
232 #endif
233 
234 
235 #define PLogObjectParent(p,c)       {PetscValidHeader((PetscObject)c); \
236                                      PetscValidHeader((PetscObject)p);\
237                                      ((PetscObject)(c))->parent = (PetscObject) p;}
238 #define PLogObjectParents(p,n,d)    {int _i; for ( _i=0; _i<n; _i++ ) \
239                                     PLogObjectParent(p,(d)[_i]);}
240 #define PLogObjectCreate(h)         {if (_PLogPHC) (*_PLogPHC)((PetscObject)h);}
241 #define PLogObjectDestroy(h)        {if (_PLogPHD) (*_PLogPHD)((PetscObject)h);}
242 #define PLogObjectMemory(p,m)       {PetscValidHeader((PetscObject)p);\
243                                     ((PetscObject)(p))->mem += (m);}
244 extern int        PLogObjectState(PetscObject,char *,...);
245 extern int        PLogDestroy();
246 extern int        PLogStagePush(int);
247 extern int        PLogStagePop();
248 extern int        PLogStageRegister(int,char*);
249 extern int        PLogPrintSummary(MPI_Comm,char *);
250 extern int        PLogBegin();
251 extern int        PLogTraceBegin(FILE *);
252 extern int        PLogAllBegin();
253 extern int        PLogSet(int (*)(int,int,PetscObject,PetscObject,PetscObject,PetscObject),
254                           int (*)(int,int,PetscObject,PetscObject,PetscObject,PetscObject));
255 extern int        PLogDump(char*);
256 extern int        PLogEventRegister(int*,char*,char*);
257 extern PLogDouble PetscGetFlops();
258 
259 extern PLogDouble irecv_ct, isend_ct, wait_ct, wait_any_ct, recv_ct, send_ct;
260 extern PLogDouble irecv_len, isend_len, recv_len, send_len;
261 extern PLogDouble wait_all_ct,allreduce_ct,sum_of_waits_ct;
262 /*
263      This does not work for MPI-Uni because our src/mpiuni/mpi.h file
264    uses macros to defined the MPI operations.
265 
266      It does not work correctly from HP-UX because it processes the
267    macros in a way that sometimes it double counts.
268 
269      It does not work with Windows NT because winmpich lacks MPI_Type_size()
270 */
271 #if !defined(PETSC_USING_MPIUNI) && !defined(PARCH_hpux) && !defined (PARCH_nt)
272 /*
273    Logging of MPI activities
274 */
275 
276 #define TypeSize(buff,count,type)                                                \
277 {                                                                                \
278   if (type == MPIU_SCALAR) {                                                     \
279     buff += (PLogDouble) ((count)*sizeof(Scalar));                               \
280   } else if (type == MPI_INT) {                                                  \
281     buff += (PLogDouble) ((count)*sizeof(int));                                  \
282   } else {                                                                       \
283     int _size; MPI_Type_size(type,&_size); buff += (PLogDouble) ((count)*_size); \
284   }                                                                              \
285 }
286 
287 #define MPI_Irecv( buf, count,  datatype, source, tag, comm, request)        \
288 {                                                                            \
289   MPI_Irecv( buf, count,  datatype, source, tag, comm, request);             \
290   irecv_ct++; TypeSize(irecv_len,count,datatype);                            \
291 }
292 
293 #define MPI_Isend( buf, count,  datatype, dest, tag, comm, request)          \
294 {                                                                            \
295   MPI_Isend( buf, count,  datatype, dest, tag, comm, request);               \
296   isend_ct++;   TypeSize(isend_len,count,datatype);                          \
297 }
298 
299 #define MPI_Startall_irecv( count,number,requests)                                    \
300 {                                                                                     \
301   MPI_Startall( number, requests);                                                    \
302   irecv_ct += (PLogDouble)(number); irecv_len += (PLogDouble) (count*sizeof(Scalar)); \
303 }
304 
305 #define MPI_Startall_isend( count,number,requests)                                    \
306 {                                                                                     \
307   MPI_Startall( number, requests);                                                    \
308   isend_ct += (PLogDouble)(number); isend_len += (PLogDouble) (count*sizeof(Scalar)); \
309 }
310 
311 #define MPI_Start_isend(count,  requests)                                     \
312 {                                                                             \
313   MPI_Start( requests);                                                       \
314   isend_ct++; isend_len += (PLogDouble) (count*sizeof(Scalar));               \
315 }
316 
317 #define MPI_Recv( buf, count,  datatype, source, tag, comm, status)           \
318 {                                                                             \
319   MPI_Recv( buf, count,  datatype, source, tag, comm, status);                \
320   recv_ct++; TypeSize(recv_len,count,datatype);                               \
321 }
322 
323 #define MPI_Send( buf, count,  datatype, dest, tag, comm)                     \
324 {                                                                             \
325   MPI_Send( buf, count,  datatype, dest, tag, comm);                          \
326   send_ct++;  TypeSize(send_len,count,datatype);                              \
327 }
328 
329 #define MPI_Wait(request, status) \
330 (                                 \
331   wait_ct++, sum_of_waits_ct++,   \
332   MPI_Wait(request, status)       \
333 )
334 
335 #define MPI_Waitany(a, b, c, d)     \
336 (                                   \
337   wait_any_ct++, sum_of_waits_ct++, \
338   MPI_Waitany(a, b, c, d)           \
339 )
340 
341 #define MPI_Waitall(count, array_of_requests, array_of_statuses) \
342 (                                                                \
343   wait_all_ct++, sum_of_waits_ct += (PLogDouble) (count),        \
344   MPI_Waitall(count, array_of_requests, array_of_statuses)       \
345 )
346 
347 #define MPI_Allreduce( sendbuf,  recvbuf, count, datatype, op, comm) \
348     (allreduce_ct++,MPI_Allreduce( sendbuf,  recvbuf, count, datatype, op, comm))
349 
350 #else
351 
352 #define MPI_Startall_irecv( count,number,requests) \
353 {                                                  \
354   MPI_Startall( number, requests);                 \
355 }
356 
357 #define MPI_Startall_isend( count,number,requests) \
358 {                                                  \
359   MPI_Startall( number, requests);                 \
360 }
361 
362 #define MPI_Start_isend(count,  requests) \
363 {                                         \
364   MPI_Start( requests);                   \
365 }
366 
367 #endif /* ! PETSC_USING_MPIUNI && ! PARCH_hpux */
368 
369 #else  /* ------------------------------------------------------------*/
370 
371 #define PLogFlops(n)
372 
373 #if defined (HAVE_MPE)
374 #define MPEBEGIN    1000
375 extern int PLogMPEBegin();
376 extern int PLogMPEDump(char *);
377 extern int PLogEventMPEActivate(int);
378 extern int PLogEventMPEDeactivate(int);
379 #else
380 #define PLogEventMPEActivate(a)   0
381 #define PLogEventMPEDeactivate(a) 0
382 #endif
383 
384 #define PLogEventActivate(a)   0
385 #define PLogEventDeactivate(a) 0
386 
387 #define PLogEventActivateClass(a)   0
388 #define PLogEventDeactivateClass(a) 0
389 
390 #define _PLogPLB                        0
391 #define _PLogPLE                        0
392 #define _PLogPHC                        0
393 #define _PLogPHD                        0
394 #define PetscGetFlops()               0.0
395 #define PLogEventBegin(e,o1,o2,o3,o4)
396 #define PLogEventEnd(e,o1,o2,o3,o4)
397 #define PLogEventBarrierBegin(e,o1,o2,o3,o4,cm)
398 #define PLogEventBarrierEnd(e,o1,o2,o3,o4,cm)
399 #define PLogObjectParent(p,c)
400 #define PLogObjectParents(p,n,c)
401 #define PLogObjectCreate(h)
402 #define PLogObjectDestroy(h)
403 #define PLogObjectMemory(p,m)
404 #define PLogDestroy()
405 #define PLogStagePush(a)
406 #define PLogStagePop()
407 #define PLogStageRegister(a,b)
408 #define PLogPrintSummary(comm,file)
409 #define PLogBegin()
410 #define PLogTraceBegin(file)            0
411 #define PLogSet(lb,le)
412 #define PLogAllBegin()
413 #define PLogDump(char)
414 #define PLogEventRegister(a,b,c)        0
415 #define PLogMPEBegin()
416 #define PLogMPEDump(a)
417 extern int PLogObjectState(PetscObject,char *,...);
418 
419 /* If PETSC_LOG is NOT defined, these still need to be! */
420 #define MPI_Startall_irecv( count,number,requests) \
421 {                                                  \
422   MPI_Startall( number, requests);                 \
423 }
424 
425 #define MPI_Startall_isend( count,number,requests) \
426 {                                                  \
427   MPI_Startall( number, requests);                 \
428 }
429 
430 #define MPI_Start_isend(count,  requests) \
431 {                                         \
432   MPI_Start( requests);                   \
433 }
434 #endif   /* PETSC_LOG */
435 
436 /*MC
437    PLogFlops - Adds floating point operations to the global counter.
438 
439    Input Parameter:
440 .  f - flop counter
441 
442    Synopsis:
443    void PLogFlops(int f)
444 
445    Notes:
446    A global counter logs all PETSc flop counts.  The user can use
447    PLogFlops() to increment this counter to include flops for the
448    application code.
449 
450    PETSc automatically logs library events if the code has been
451    compiled with -DPETSC_LOG (which is the default), and -log,
452    -log_summary, or -log_all are specified.  PLogFlops() is
453    intended for logging user flops to supplement this PETSc
454    information.
455 
456     Example of Usage:
457 $     int USER_EVENT;
458 $     PLogEventRegister(&USER_EVENT,"User event","Color:");
459 $     PLogEventBegin(USER_EVENT,0,0,0,0);
460 $        [code segment to monitor]
461 $        PLogFlops(user_flops)
462 $     PLogEventEnd(USER_EVENT,0,0,0,0);
463 
464 .seealso: PLogEventRegister(), PLogEventBegin(), PLogEventEnd(), PetscGetFlops()
465 
466 .keywords: log, flops, floating point operations
467 M*/
468 
469 
470 /*MC
471    PLogEventBegin - Logs the beginning of a user event.
472 
473    Input Parameters:
474 .  e - integer associated with the event obtained from PLogEventRegister()
475 .  o1,o2,o3,o4 - objects associated with the event, or 0
476 
477    Synopsis:
478    void PLogEventBegin(int e,PetscObject o1,PetscObject o2,PetscObject o3,
479                   PetscObject o4)
480 
481    Notes:
482    You should also register each integer event with the command
483    PLogRegisterEvent().  The source code must be compiled with
484    -DPETSC_LOG, which is the default.
485 
486    PETSc automatically logs library events if the code has been
487    compiled with -DPETSC_LOG, and -log, -log_summary, or -log_all are
488    specified.  PLogEventBegin() is intended for logging user events
489    to supplement this PETSc information.
490 
491     Example of Usage:
492 $     int USER_EVENT;
493 $     int user_event_flops;
494 $     PLogEventRegister(&USER_EVENT,"User event","Color:");
495 $     PLogEventBegin(&USER_EVENT,0,0,0,0);
496 $        [code segment to monitor]
497 $        PLogFlops(user_event_flops);
498 $     PLogEventEnd(&USER_EVENT,0,0,0,0);
499 
500 .seealso: PLogEventRegister(), PLogEventEnd(), PLogFlops()
501 
502 .keywords: log, event, begin
503 M*/
504 
505 /*MC
506    PLogEventEnd - Log the end of a user event.
507 
508    Input Parameters:
509 .  e - integer associated with the event obtained with PLogEventRegister()
510 .  o1,o2,o3,o4 - objects associated with the event, or 0
511 
512    Synopsis:
513    void PLogEventEnd(int e,PetscObject o1,PetscObject o2,PetscObject o3,
514                 PetscObject o4)
515 
516    Notes:
517    You should also register each additional integer event with the command
518    PLogRegisterEvent(). Source code must be compiled with
519    -DPETSC_LOG, which is the default.
520 
521    PETSc automatically logs library events if the code has been
522    compiled with -DPETSC_LOG, and -log, -log_summary, or -log_all are
523    specified.  PLogEventEnd() is intended for logging user events
524    to supplement this PETSc information.
525 
526     Example of Usage:
527 $     int USER_EVENT;
528 $     int user_event_flops;
529 $     PLogEventRegister(&USER_EVENT,"User event","Color:");
530 $     PLogEventBegin(USER_EVENT,0,0,0,0);
531 $        [code segment to monitor]
532 $        PLogFlops(user_event_flops);
533 $     PLogEventEnd(USER_EVENT,0,0,0,0);
534 
535 .seealso: PLogEventRegister(), PLogEventBegin(), PLogFlops()
536 
537 .keywords: log, event, end
538 M*/
539 
540 /*MC
541    PLogEventBarrierBegin - Logs the time in a barrier before an event.
542 
543    Input Parameters:
544 .  e - integer associated with the event obtained from PLogEventRegister()
545 .  o1,o2,o3,o4 - objects associated with the event, or 0
546 .  comm - communicator the barrier takes place over
547 
548    Synopsis:
549    void PLogEventBarrierBegin(int e,PetscObject o1,PetscObject o2,PetscObject o3,
550                   PetscObject o4,MPI_Comm comm)
551 
552    Notes:
553    This is for logging the amount of time spent in a barrier for an event
554    that requires synchronization.
555 
556     Example of Usage:
557 $     PLogEventBarrierBegin(VEC_NormBarrier,0,0,0,0,comm);
558 $       MPI_Allreduce()
559 $     PLogEventBarrierEnd(VEC_NormBarrier,0,0,0,0,comm);
560 
561    Additional Notes:
562    Synchronization events always come in pairs; for example, VEC_NormBarrier and
563    VEC_NormComm = VEC_NormBarrier + 1
564 
565 .seealso: PLogEventRegister(), PLogEventEnd(), PLogFlops(), PLogEventBegin(),
566           PLogEventBarrierEnd()
567 
568 .keywords: log, event, begin, barrier
569 M*/
570 
571 /*MC
572    PLogEventBarrierEnd - Logs the time in a barrier before an event.
573 
574    Input Parameters:
575 .  e - integer associated with the event obtained from PLogEventRegister()
576 .  o1,o2,o3,o4 - objects associated with the event, or 0
577 .  comm - communicator the barrier takes place over
578 
579    Synopsis:
580    void PLogEventBarrierEnd(int e,PetscObject o1,PetscObject o2,PetscObject o3,
581                   PetscObject o4,MPI_Comm comm)
582 
583    Notes:
584    This is for logging the amount of time spent in a barrier for an event
585    that requires synchronization.
586 
587     Example of Usage:
588 $     PLogEventBarrierBegin(VEC_NormBarrier,0,0,0,0,comm);
589 $       MPI_Allreduce()
590 $     PLogEventBarrierEnd(VEC_NormBarrier,0,0,0,0,comm);
591 
592    Additional Notes:
593    Synchronization events always come in pairs; for example, VEC_NormBarrier and
594    VEC_NormComm = VEC_NormBarrier + 1
595 
596 .seealso: PLogEventRegister(), PLogEventEnd(), PLogFlops(), PLogEventBegin(),
597           PLogEventBarrierBegin()
598 
599 .keywords: log, event, begin, barrier
600 M*/
601 
602 #endif
603 
604 
605 
606 
607 
608 
609