Generic Trace Generator (GTG)  0.1
GTGBasic.h
Go to the documentation of this file.
1 
21 #ifndef _GTG_BASIC_H_
22 #define _GTG_BASIC_H_
23 #include <stdlib.h>
24 #include <string.h>
25 #include "GTGColor.h"
26 #include "GTGTypes.h"
27 
31 #define GTG_FLAG_NONE 0
32 
36 #define GTG_FLAG_USE_MPI 1
37 
41 #define GTG_FLAG_NOTBUF 2
42 
46 #define GTG_FLAG_OUTOFORDER 4
47 
51 typedef uint8_t gtg_flag_t;
52 
53 
64 typedef enum traceType{
65  PAJE,
66  VITE,
67  OTF,
68  TAU
70 
77 void setTraceType (traceType_t type);
78 
86 
94 char* getName (int procRk);
95 
104 
105 
119 trace_return_t initTrace (const char* filename, int rank, gtg_flag_t flags);
120 
137 trace_return_t setCompress (int val);
138 
154 trace_return_t addContType (const char* alias, const char* contType,
155  const char* name);
156 
172 trace_return_t addStateType (const char* alias, const char* contType,
173  const char* name);
174 
190 trace_return_t addEventType (const char* alias, const char* contType,
191  const char* name);
192 
212 trace_return_t addLinkType (const char* alias , const char* name,
213  const char* contType, const char* srcContType,
214  const char* destContType);
215 
231 trace_return_t addVarType (const char* alias , const char* name,
232  const char* contType);
233 
248 trace_return_t addEntityValue (const char* alias, const char* entType,
249  const char* name , gtg_color_t p_color);
250 
269 trace_return_t addContainer (varPrec time, const char* alias ,
270  const char* type, const char* container,
271  const char* name, const char* file);
272 
285 trace_return_t destroyContainer (varPrec time, const char* name,
286  const char* type);
287 
302 trace_return_t setState (varPrec time, const char* type,
303  const char* cont, const char* val);
304 
319 trace_return_t pushState (varPrec time, const char* type,
320  const char* cont, const char* val);
321 
334 trace_return_t popState (varPrec time, const char* type,
335  const char* cont);
336 
351 trace_return_t addEvent (varPrec time, const char* type,
352  const char* cont, const char* val);
353 
374 trace_return_t startLink (varPrec time, const char* type,
375  const char* cont, const char* src,
376  const char* dest, const char* val,
377  const char* key);
378 
399 trace_return_t endLink (varPrec time, const char* type,
400  const char* cont, const char* src,
401  const char* dest, const char* val,
402  const char* key);
403 
418 trace_return_t setVar (varPrec time, const char* type,
419  const char* cont, varPrec val);
420 
435 trace_return_t addVar (varPrec time, const char* type,
436  const char* cont, varPrec val);
437 
453 trace_return_t subVar (varPrec time, const char* type,
454  const char* cont, varPrec val);
455 
465 trace_return_t AddComment (const char* comment);
466 #endif /* _GTG_BASIC_H_ */
trace_return_t popState(varPrec time, const char *type, const char *cont)
Revert the State of a Container to its previous value.
trace_return_t addEvent(varPrec time, const char *type, const char *cont, const char *val)
Add an Event.
trace_return_t endLink(varPrec time, const char *type, const char *cont, const char *src, const char *dest, const char *val, const char *key)
End a Link.
Definition: GTGBasic.h:66
double varPrec
Use the double precision type for time and value.
Definition: GTGTypes.h:28
trace_return_t addContainer(varPrec time, const char *alias, const char *type, const char *container, const char *name, const char *file)
Add a Container.
trace_return_t initTrace(const char *filename, int rank, gtg_flag_t flags)
Initialize a trace.
trace_return_t addStateType(const char *alias, const char *contType, const char *name)
Add a State Type.
enum traceType traceType_t
uint8_t gtg_flag_t
Flags that can be specified to GTG.
Definition: GTG_EZTrace.h:51
trace_return_t endTrace()
Finalize a trace.
trace_return_t addLinkType(const char *alias, const char *name, const char *contType, const char *srcContType, const char *destContType)
Add a Link Type.
trace_return_t pushState(varPrec time, const char *type, const char *cont, const char *val)
Save the current State on a stack and change the State of a Container.
trace_return_t subVar(varPrec time, const char *type, const char *cont, varPrec val)
trace_return_t
Define various return values.
Definition: GTGTypes.h:35
trace_return_t addEventType(const char *alias, const char *contType, const char *name)
Add an Event Type.
trace_return_t addEntityValue(const char *alias, const char *entType, const char *name, gtg_color_t p_color)
Add an Entity Value.
Definition: GTGBasic.h:67
trace_return_t setCompress(int val)
Enable trace compression (only available for OTF traces).
Definition: GTGBasic.h:65
trace_return_t setVar(varPrec time, const char *type, const char *cont, varPrec val)
Set a Variable value.
This file defines some useful colors to use in entity values for GTG.
trace_return_t startLink(varPrec time, const char *type, const char *cont, const char *src, const char *dest, const char *val, const char *key)
Start a Link.
This structure defines a color that can be used by GTG.
Definition: GTGColor.h:25
trace_return_t setState(varPrec time, const char *type, const char *cont, const char *val)
Set the State of a Container.
void setTraceType(traceType_t type)
Set the type of output trace.
uint8_t gtg_flag_t
Flags that can be specified to GTG.
Definition: GTGBasic.h:51
trace_return_t addVarType(const char *alias, const char *name, const char *contType)
Add a Variable Type.
trace_return_t destroyContainer(varPrec time, const char *name, const char *type)
Destroy a Container.
trace_return_t addContType(const char *alias, const char *contType, const char *name)
Add a Container Type.
char * getName(int procRk)
To get the name of the file to give to the addCont function for processors.
traceType_t getTraceType()
Get the type of the output trace.
enum traceType traceType_t
int bufferedModeActivated()
Check wether the buffered-mode is activated.
traceType
The type of the output trace.
Definition: GTG_EZTrace.h:64
Definition: GTGBasic.h:68
trace_return_t addVar(varPrec time, const char *type, const char *cont, varPrec val)
trace_return_t AddComment(const char *comment)