OpenMPI  0.1.1
otfprofile.h
1 /*
2  This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2012.
3  Authors: Andreas Knuepfer, Robert Dietrich, Matthias Jurenz
4 */
5 
6 #ifndef OTFPROFILE_H
7 #define OTFPROFILE_H
8 
9 
10 #ifdef HAVE_CONFIG_H
11 # include "config.h"
12 #endif /* HAVE_CONFIG_H */
13 
14 #include "datastructs.h"
15 
16 
17 /* print verbose message to stdout
18  (- do print message only if current verbose level is >= level
19  - if master_only is true only the master will print the message) */
20 void VerbosePrint( AllData& alldata, uint8_t level, bool master_only,
21  const char* fmt, ... );
22 
23 /* start runtime measurement of certain scope
24  (- perform measurement only if current verbose level is >= verbose_level
25  - if sync is true synchronize all workers before start measurement) */
26 void StartMeasurement( AllData& alldata, uint8_t verbose_level, bool sync,
27  const string& scope_name );
28 
29 /* stop runtime measurement of certain scope
30  (if sync is true synchronize all workers before stop measurement) */
31 void StopMeasurement( AllData& alldata, bool sync, const string& scope_name );
32 
33 /* print measurement results to stdout
34  (if scope_name is not specified print results of all measured scopes) */
35 void PrintMeasurement( AllData& alldata, const string& scope_name= "" );
36 
37 /* logarithm to base b for unsigned 64-bit integer x */
38 uint64_t Logi( uint64_t x, uint64_t b= 2 );
39 
40 #ifdef OTFPROFILE_MPI
41 /* synchronize error indicator with all worker ranks
42  (either broadcast from one rank (root) or reduce from all) */
43 bool SyncError( AllData& alldata, bool& error, uint32_t root= (uint32_t)-1 );
44 #endif /* OTFPROFILE_MPI */
45 
46 
47 /* name of program executable */
48 extern const string ExeName;
49 
50 
51 #endif /* OTFPROFILE_H */
Definition: datastructs.h:541