xref: /petsc/include/petsclog.h (revision 3a40ed3dce77c081171d005ae1a6ff4bb9d13b6f)
1 /* $Id: petsclog.h,v 1.114 1997/09/09 20:27:02 curfman 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(USE_PETSC_LOG)  /* --- Logging is turned on --------------------------------*/
142 
143 /*
144    Flop counting:  We count each arithmetic operation (e.g., addition, multiplication) separately.
145 
146    For the complex numbers version, note that
147        1 complex addition = 2 flops
148        1 complex multiplication = 6 flops,
149    where we define 1 flop as that for a double precision scalar.  We roughly approximate
150    flop counting for complex numbers by multiplying the total flops by 4; this corresponds
151    to the assumption that we're counting mostly additions and multiplications -- and
152    roughly the same number of each.  More accurate counting could be done by distinguishing
153    among the various arithmetic operations.
154  */
155 
156 #if defined(USE_PETSC_COMPLEX)
157 #define PLogFlops(n) {_TotalFlops += (4*n);}
158 #else
159 #define PLogFlops(n) {_TotalFlops += (n);}
160 #endif
161 
162 #if defined (HAVE_MPE)
163 #include "mpe.h"
164 #define MPEBEGIN    1000
165 extern int PLogMPEBegin();
166 extern int PLogMPEDump(char *);
167 extern int UseMPE,PLogEventMPEFlags[];
168 extern int PLogEventMPEActivate(int);
169 extern int PLogEventMPEDeactivate(int);
170 #else
171 #define PLogEventMPEActivate(a) 0
172 #define PLogEventMPEDeactivate(a) 0
173 #endif
174 
175 extern int PLogEventActivate(int);
176 extern int PLogEventDeactivate(int);
177 
178 extern int PLogEventActivateClass(int);
179 extern int PLogEventDeactivateClass(int);
180 
181 extern int PLogEventFlags[];
182 extern int (*_PLogPLB)(int,int,PetscObject,PetscObject,PetscObject,PetscObject);
183 extern int (*_PLogPLE)(int,int,PetscObject,PetscObject,PetscObject,PetscObject);
184 extern int (*_PLogPHC)(PetscObject);
185 extern int (*_PLogPHD)(PetscObject);
186 
187 #if defined(HAVE_MPE)
188 #define PLogEventBarrierBegin(e,o1,o2,o3,o4,cm) \
189   { \
190     if (_PLogPLB && PLogEventFlags[e]) {                           \
191       PLogEventBegin((e),o1,o2,o3,o4);                                   \
192       if (UseMPE && PLogEventMPEFlags[(e)])\
193         MPE_Log_event(MPEBEGIN+2*(e),0,"");\
194       MPI_Barrier(cm);                                             \
195       PLogEventEnd((e),o1,o2,o3,o4);                                     \
196       if (UseMPE && PLogEventMPEFlags[(e)])\
197         MPE_Log_event(MPEBEGIN+2*((e)+1),0,"");\
198     }                                                                \
199     PLogEventBegin(e+1,o1,o2,o3,o4);                                   \
200     if (UseMPE && PLogEventMPEFlags[(e)+1])\
201       MPE_Log_event(MPEBEGIN+2*((e)+1),0,"");\
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    if (UseMPE && PLogEventMPEFlags[(e)])\
208      MPE_Log_event(MPEBEGIN+2*(e),0,"");\
209   }
210 #else
211 #define PLogEventBarrierBegin(e,o1,o2,o3,o4,cm) \
212   { \
213     if (_PLogPLB && PLogEventFlags[(e)]) {                           \
214       PLogEventBegin((e),o1,o2,o3,o4);                                   \
215       MPI_Barrier(cm);                                             \
216       PLogEventEnd((e),o1,o2,o3,o4);                                     \
217     }                                                                \
218     PLogEventBegin((e)+1,o1,o2,o3,o4);                                   \
219   }
220 #define PLogEventBegin(e,o1,o2,o3,o4)  \
221   {  \
222    if (_PLogPLB && PLogEventFlags[(e)]) \
223      (*_PLogPLB)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
224   }
225 #endif
226 
227 #if defined(HAVE_MPE)
228 #define PLogEventBarrierEnd(e,o1,o2,o3,o4,cm) {\
229   if (_PLogPLE && PLogEventFlags[(e)+1]) \
230     (*_PLogPLE)((e)+1,0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
231   if (UseMPE && PLogEventMPEFlags[(e)+1])\
232      MPE_Log_event(MPEBEGIN+2*((e)+1)+1,0,"");\
233   }
234 #define PLogEventEnd(e,o1,o2,o3,o4) {\
235   if (_PLogPLE && PLogEventFlags[(e)]) \
236     (*_PLogPLE)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
237   if (UseMPE && PLogEventMPEFlags[(e)])\
238      MPE_Log_event(MPEBEGIN+2*(e)+1,0,"");\
239   }
240 #else
241 #define PLogEventBarrierEnd(e,o1,o2,o3,o4,cm) {\
242   if (_PLogPLE && PLogEventFlags[(e)+1]) \
243     (*_PLogPLE)((e)+1,0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
244   }
245 #define PLogEventEnd(e,o1,o2,o3,o4) {\
246   if (_PLogPLE && PLogEventFlags[(e)]) \
247     (*_PLogPLE)((e),0,(PetscObject)(o1),(PetscObject)(o2),(PetscObject)(o3),(PetscObject)(o4));\
248   }
249 #endif
250 
251 
252 #define PLogObjectParent(p,c)       if (c) {PetscValidHeader((PetscObject)(c)); \
253                                      PetscValidHeader((PetscObject)(p));\
254                                      ((PetscObject)(c))->parent = (PetscObject) (p);}
255 #define PLogObjectParents(p,n,d)    {int _i; for ( _i=0; _i<n; _i++ ) \
256                                     PLogObjectParent(p,(d)[_i]);}
257 #define PLogObjectCreate(h)         {if (_PLogPHC) (*_PLogPHC)((PetscObject)h);}
258 #define PLogObjectDestroy(h)        {if (_PLogPHD) (*_PLogPHD)((PetscObject)h);}
259 #define PLogObjectMemory(p,m)       {PetscValidHeader((PetscObject)p);\
260                                     ((PetscObject)(p))->mem += (m);}
261 extern int        PLogObjectState(PetscObject,char *,...);
262 extern int        PLogDestroy();
263 extern int        PLogStagePush(int);
264 extern int        PLogStagePop();
265 extern int        PLogStageRegister(int,char*);
266 extern int        PLogPrintSummary(MPI_Comm,char *);
267 extern int        PLogBegin();
268 extern int        PLogTraceBegin(FILE *);
269 extern int        PLogAllBegin();
270 extern int        PLogSet(int (*)(int,int,PetscObject,PetscObject,PetscObject,PetscObject),
271                           int (*)(int,int,PetscObject,PetscObject,PetscObject,PetscObject));
272 extern int        PLogDump(char*);
273 extern int        PLogEventRegister(int*,char*,char*);
274 extern PLogDouble PetscGetFlops();
275 
276 extern PLogDouble irecv_ct, isend_ct, wait_ct, wait_any_ct, recv_ct, send_ct;
277 extern PLogDouble irecv_len, isend_len, recv_len, send_len;
278 extern PLogDouble wait_all_ct,allreduce_ct,sum_of_waits_ct;
279 /*
280      This does not work for MPI-Uni because our src/mpiuni/mpi.h file
281    uses macros to defined the MPI operations.
282 
283      It does not work correctly from HP-UX because it processes the
284    macros in a way that sometimes it double counts.
285 
286      It does not work with Windows NT because winmpich lacks MPI_Type_size()
287 */
288 #if !defined(PETSC_USING_MPIUNI) && !defined(PARCH_hpux) && !defined (PARCH_nt)
289 /*
290    Logging of MPI activities
291 */
292 
293 #define TypeSize(buff,count,type)                                                \
294 {                                                                                \
295   if (type == MPIU_SCALAR) {                                                     \
296     buff += (PLogDouble) ((count)*sizeof(Scalar));                               \
297   } else if (type == MPI_INT) {                                                  \
298     buff += (PLogDouble) ((count)*sizeof(int));                                  \
299   } else {                                                                       \
300     int _size; MPI_Type_size(type,&_size); buff += (PLogDouble) ((count)*_size); \
301   }                                                                              \
302 }
303 
304 #define MPI_Irecv( buf, count,  datatype, source, tag, comm, request)        \
305 {                                                                            \
306   MPI_Irecv( buf, count,  datatype, source, tag, comm, request);             \
307   irecv_ct++; TypeSize(irecv_len,count,datatype);                            \
308 }
309 
310 #define MPI_Isend( buf, count,  datatype, dest, tag, comm, request)          \
311 {                                                                            \
312   MPI_Isend( buf, count,  datatype, dest, tag, comm, request);               \
313   isend_ct++;   TypeSize(isend_len,count,datatype);                          \
314 }
315 
316 #define MPI_Startall_irecv( count,number,requests)                                    \
317 {                                                                                     \
318   MPI_Startall( number, requests);                                                    \
319   irecv_ct += (PLogDouble)(number); irecv_len += (PLogDouble) (count*sizeof(Scalar)); \
320 }
321 
322 #define MPI_Startall_isend( count,number,requests)                                    \
323 {                                                                                     \
324   MPI_Startall( number, requests);                                                    \
325   isend_ct += (PLogDouble)(number); isend_len += (PLogDouble) (count*sizeof(Scalar)); \
326 }
327 
328 #define MPI_Start_isend(count,  requests)                                     \
329 {                                                                             \
330   MPI_Start( requests);                                                       \
331   isend_ct++; isend_len += (PLogDouble) (count*sizeof(Scalar));               \
332 }
333 
334 #define MPI_Recv( buf, count,  datatype, source, tag, comm, status)           \
335 {                                                                             \
336   MPI_Recv( buf, count,  datatype, source, tag, comm, status);                \
337   recv_ct++; TypeSize(recv_len,count,datatype);                               \
338 }
339 
340 #define MPI_Send( buf, count,  datatype, dest, tag, comm)                     \
341 {                                                                             \
342   MPI_Send( buf, count,  datatype, dest, tag, comm);                          \
343   send_ct++;  TypeSize(send_len,count,datatype);                              \
344 }
345 
346 #define MPI_Wait(request, status) \
347 (                                 \
348   wait_ct++, sum_of_waits_ct++,   \
349   MPI_Wait(request, status)       \
350 )
351 
352 #define MPI_Waitany(a, b, c, d)     \
353 (                                   \
354   wait_any_ct++, sum_of_waits_ct++, \
355   MPI_Waitany(a, b, c, d)           \
356 )
357 
358 #define MPI_Waitall(count, array_of_requests, array_of_statuses) \
359 (                                                                \
360   wait_all_ct++, sum_of_waits_ct += (PLogDouble) (count),        \
361   MPI_Waitall(count, array_of_requests, array_of_statuses)       \
362 )
363 
364 #define MPI_Allreduce( sendbuf,  recvbuf, count, datatype, op, comm) \
365     (allreduce_ct++,MPI_Allreduce( sendbuf,  recvbuf, count, datatype, op, comm))
366 
367 #else
368 
369 #define MPI_Startall_irecv( count,number,requests) \
370 {                                                  \
371   MPI_Startall( number, requests);                 \
372 }
373 
374 #define MPI_Startall_isend( count,number,requests) \
375 {                                                  \
376   MPI_Startall( number, requests);                 \
377 }
378 
379 #define MPI_Start_isend(count,  requests) \
380 {                                         \
381   MPI_Start( requests);                   \
382 }
383 
384 #endif /* ! PETSC_USING_MPIUNI && ! PARCH_hpux */
385 
386 #else  /* ---Logging is turned off --------------------------------------------*/
387 
388 #define PLogFlops(n)
389 
390 /*
391      With logging turned off, then MPE has to be turned off
392 */
393 #define MPEBEGIN                  1000
394 #define PLogMPEBegin()
395 #define PLogMPEDump(a)
396 #define PLogEventMPEActivate(a)   0
397 #define PLogEventMPEDeactivate(a) 0
398 
399 #define PLogEventActivate(a)   0
400 #define PLogEventDeactivate(a) 0
401 
402 #define PLogEventActivateClass(a)   0
403 #define PLogEventDeactivateClass(a) 0
404 
405 #define _PLogPLB                        0
406 #define _PLogPLE                        0
407 #define _PLogPHC                        0
408 #define _PLogPHD                        0
409 #define PetscGetFlops()               0.0
410 #define PLogEventBegin(e,o1,o2,o3,o4)
411 #define PLogEventEnd(e,o1,o2,o3,o4)
412 #define PLogEventBarrierBegin(e,o1,o2,o3,o4,cm)
413 #define PLogEventBarrierEnd(e,o1,o2,o3,o4,cm)
414 #define PLogObjectParent(p,c)
415 #define PLogObjectParents(p,n,c)
416 #define PLogObjectCreate(h)
417 #define PLogObjectDestroy(h)
418 #define PLogObjectMemory(p,m)
419 #define PLogDestroy()
420 #define PLogStagePush(a)
421 #define PLogStagePop()
422 #define PLogStageRegister(a,b)
423 #define PLogPrintSummary(comm,file)
424 #define PLogBegin()
425 #define PLogTraceBegin(file)            0
426 #define PLogSet(lb,le)
427 #define PLogAllBegin()
428 #define PLogDump(char)
429 #define PLogEventRegister(a,b,c)        0
430 #define PLogMPEBegin()
431 #define PLogMPEDump(a)
432 extern int PLogObjectState(PetscObject,char *,...);
433 
434 /* If USE_PETSC_LOG is NOT defined, these still need to be! */
435 #define MPI_Startall_irecv( count,number,requests) \
436 {                                                  \
437   MPI_Startall( number, requests);                 \
438 }
439 
440 #define MPI_Startall_isend( count,number,requests) \
441 {                                                  \
442   MPI_Startall( number, requests);                 \
443 }
444 
445 #define MPI_Start_isend(count,  requests) \
446 {                                         \
447   MPI_Start( requests);                   \
448 }
449 #endif   /* USE_PETSC_LOG */
450 
451 /*MC
452    PLogFlops - Adds floating point operations to the global counter.
453 
454    Input Parameter:
455 .  f - flop counter
456 
457    Synopsis:
458    void PLogFlops(int f)
459 
460    Notes:
461    A global counter logs all PETSc flop counts.  The user can use
462    PLogFlops() to increment this counter to include flops for the
463    application code.
464 
465    PETSc automatically logs library events if the code has been
466    compiled with -DUSE_PETSC_LOG (which is the default), and -log,
467    -log_summary, or -log_all are specified.  PLogFlops() is
468    intended for logging user flops to supplement this PETSc
469    information.
470 
471     Example of Usage:
472 $     int USER_EVENT;
473 $     PLogEventRegister(&USER_EVENT,"User event","Color:");
474 $     PLogEventBegin(USER_EVENT,0,0,0,0);
475 $        [code segment to monitor]
476 $        PLogFlops(user_flops)
477 $     PLogEventEnd(USER_EVENT,0,0,0,0);
478 
479 .seealso: PLogEventRegister(), PLogEventBegin(), PLogEventEnd(), PetscGetFlops()
480 
481 .keywords: log, flops, floating point operations
482 M*/
483 
484 
485 /*MC
486    PLogEventBegin - Logs the beginning of a user event.
487 
488    Input Parameters:
489 .  e - integer associated with the event obtained from PLogEventRegister()
490 .  o1,o2,o3,o4 - objects associated with the event, or 0
491 
492    Synopsis:
493    void PLogEventBegin(int e,PetscObject o1,PetscObject o2,PetscObject o3,
494                   PetscObject o4)
495 
496    Notes:
497    You should also register each integer event with the command
498    PLogRegisterEvent().  The source code must be compiled with
499    -DUSE_PETSC_LOG, which is the default.
500 
501    PETSc automatically logs library events if the code has been
502    compiled with -DUSE_PETSC_LOG, and -log, -log_summary, or -log_all are
503    specified.  PLogEventBegin() is intended for logging user events
504    to supplement this PETSc information.
505 
506     Example of Usage:
507 $     int USER_EVENT;
508 $     int user_event_flops;
509 $     PLogEventRegister(&USER_EVENT,"User event","Color:");
510 $     PLogEventBegin(&USER_EVENT,0,0,0,0);
511 $        [code segment to monitor]
512 $        PLogFlops(user_event_flops);
513 $     PLogEventEnd(&USER_EVENT,0,0,0,0);
514 
515 .seealso: PLogEventRegister(), PLogEventEnd(), PLogFlops()
516 
517 .keywords: log, event, begin
518 M*/
519 
520 /*MC
521    PLogEventEnd - Log the end of a user event.
522 
523    Input Parameters:
524 .  e - integer associated with the event obtained with PLogEventRegister()
525 .  o1,o2,o3,o4 - objects associated with the event, or 0
526 
527    Synopsis:
528    void PLogEventEnd(int e,PetscObject o1,PetscObject o2,PetscObject o3,
529                 PetscObject o4)
530 
531    Notes:
532    You should also register each additional integer event with the command
533    PLogRegisterEvent(). Source code must be compiled with
534    -DUSE_PETSC_LOG, which is the default.
535 
536    PETSc automatically logs library events if the code has been
537    compiled with -DUSE_PETSC_LOG, and -log, -log_summary, or -log_all are
538    specified.  PLogEventEnd() is intended for logging user events
539    to supplement this PETSc information.
540 
541     Example of Usage:
542 $     int USER_EVENT;
543 $     int user_event_flops;
544 $     PLogEventRegister(&USER_EVENT,"User event","Color:");
545 $     PLogEventBegin(USER_EVENT,0,0,0,0);
546 $        [code segment to monitor]
547 $        PLogFlops(user_event_flops);
548 $     PLogEventEnd(USER_EVENT,0,0,0,0);
549 
550 .seealso: PLogEventRegister(), PLogEventBegin(), PLogFlops()
551 
552 .keywords: log, event, end
553 M*/
554 
555 /*MC
556    PLogEventBarrierBegin - Logs the time in a barrier before an event.
557 
558    Input Parameters:
559 .  e - integer associated with the event obtained from PLogEventRegister()
560 .  o1,o2,o3,o4 - objects associated with the event, or 0
561 .  comm - communicator the barrier takes place over
562 
563    Synopsis:
564    void PLogEventBarrierBegin(int e,PetscObject o1,PetscObject o2,PetscObject o3,
565                   PetscObject o4,MPI_Comm comm)
566 
567    Notes:
568    This is for logging the amount of time spent in a barrier for an event
569    that requires synchronization.
570 
571     Example of Usage:
572 $     PLogEventBarrierBegin(VEC_NormBarrier,0,0,0,0,comm);
573 $       MPI_Allreduce()
574 $     PLogEventBarrierEnd(VEC_NormBarrier,0,0,0,0,comm);
575 
576    Additional Notes:
577    Synchronization events always come in pairs; for example, VEC_NormBarrier and
578    VEC_NormComm = VEC_NormBarrier + 1
579 
580 .seealso: PLogEventRegister(), PLogEventEnd(), PLogFlops(), PLogEventBegin(),
581           PLogEventBarrierEnd()
582 
583 .keywords: log, event, begin, barrier
584 M*/
585 
586 /*MC
587    PLogEventBarrierEnd - Logs the time in a barrier before an event.
588 
589    Input Parameters:
590 .  e - integer associated with the event obtained from PLogEventRegister()
591 .  o1,o2,o3,o4 - objects associated with the event, or 0
592 .  comm - communicator the barrier takes place over
593 
594    Synopsis:
595    void PLogEventBarrierEnd(int e,PetscObject o1,PetscObject o2,PetscObject o3,
596                   PetscObject o4,MPI_Comm comm)
597 
598    Notes:
599    This is for logging the amount of time spent in a barrier for an event
600    that requires synchronization.
601 
602     Example of Usage:
603 $     PLogEventBarrierBegin(VEC_NormBarrier,0,0,0,0,comm);
604 $       MPI_Allreduce()
605 $     PLogEventBarrierEnd(VEC_NormBarrier,0,0,0,0,comm);
606 
607    Additional Notes:
608    Synchronization events always come in pairs; for example, VEC_NormBarrier and
609    VEC_NormComm = VEC_NormBarrier + 1
610 
611 .seealso: PLogEventRegister(), PLogEventEnd(), PLogFlops(), PLogEventBegin(),
612           PLogEventBarrierBegin()
613 
614 .keywords: log, event, begin, barrier
615 M*/
616 
617 #endif
618 
619 
620 
621 
622 
623 
624