Paje interface in C of the GTGBasic1 API

## Functions

paje_color_t | Paje_get_color (gtg_color_t p_color)
| Converts a GTG color into a PAJE color.
trace_return_t | pajeInitTrace (const char *filename, int rank, gtg_flag_t flags, int fmt)
| Initialize a VITE trace ( *.ept).
char * | pajeGetName (int rk)
| Function to get the name of the file containing all the data for the proc of rank rk.
trace_return_t | pajeSetCompress (int val)
| Enable trace compression.
trace_return_t | pajeAddContType (const char *alias, const char *contType, const char *name)
| Add a Container Type.
trace_return_t | pajeAddStateType (const char *alias, const char *contType, const char *name)
| Add a State Type.
trace_return_t | pajeAddEventType (const char *alias, const char *contType, const char *name)
| Add an Event Type.
trace_return_t | pajeAddLinkType (const char *alias, const char *name, const char *contType, const char *srcContType, const char *destContType)
| Add a Link Type.
trace_return_t | pajeAddVarType (const char *alias, const char *contType, const char *name)
| Add a Variable Type.
trace_return_t | pajeAddEntityValue (const char *alias, const char *entType, const char *name, const char *color)
| Add an Entity Value.
trace_return_t | pajeAddContainer (varPrec time, const char *alias, const char *type, const char *container, const char *name, const char *file)
| Add a Container (VITE format).
trace_return_t | pajeSeqAddContainer (varPrec time, const char *alias, const char *type, const char *container, const char *name)
| Add a Container (PAJE format).
trace_return_t | pajeDestroyContainer (varPrec time, const char *name, const char *type)
| Destroy a Container.
trace_return_t | pajeSetState (varPrec time, const char *type, const char *cont, const char *val)
| Set the State of a Container.
trace_return_t | pajePushState (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 | pajePopState (varPrec time, const char *type, const char *cont)
| Revert the State of a Container to its previous value.
trace_return_t | pajeAddEvent (varPrec time, const char *type, const char *cont, const char *val)
| Add an Event.
trace_return_t | pajeStartLink (varPrec time, const char *type, const char *cont, const char *src, const char *val, const char *key)
| Start a link.
trace_return_t | pajeEndLink (varPrec time, const char *type, const char *cont, const char *dest, const char *val, const char *key)
| Start a link.
trace_return_t | pajeSetVar (varPrec time, const char *type, const char *cont, varPrec val)
| Set a Variable value.
trace_return_t | pajeAddVar (varPrec time, const char *type, const char *cont, varPrec val)
| Add a value to a Variable.
trace_return_t | pajeSubVar (varPrec time, const char *type, const char *cont, varPrec val)
| Substract a value from a Variable.
trace_return_t | pajeAddComment (const char *comment)
| Add some Comment in Trace file.
trace_return_t | pajeEndTrace ()
| Finalize a PAJE trace.
trace_return_t | viteEndTrace ()
| Finalize a VITE trace.

## Detailed Description

## Function Documentation

## Paje_get_color()

paje_color_t Paje_get_color | ( | gtg_color_t | color | ) |

Converts a GTG color into a PAJE color.

Parameters

  color | GTG color to convert

Returns
  The PAJE color

## pajeAddComment()

trace_return_t pajeAddComment | ( | const char * | comment | ) |

Add some Comment in Trace file.

Parameters

  comment | Comment to be added

Returns
  TRACE_SUCCESS on success
  An error code otherwise

## pajeAddContainer()

trace_return_t pajeAddContainer | ( | varPrec | time,
|  | const char * | alias,
|  | const char * | type,
|  | const char * | container,
|  | const char * | name,
|  | const char * | file )

Add a Container (VITE format).

Parameters

  time | Time at which the container is added
  alias | Alias on the new container
  type | Type of the container
  container | Container parent
  name | Name of the variable type
  file | File containing the container trace

Returns
  0 if success
  An error code otherwise

## pajeAddContType()

trace_return_t pajeAddContType | ( | const char * | alias,
|  | const char * | contType,
|  | const char * | name )

Add a Container Type.

Parameters

  alias | Alias on the container
  contType | Type of container
  name | Name of the container type

Returns
  0 if success
  An error code otherwise

## pajeAddEntityValue()

trace_return_t pajeAddEntityValue | ( | const char * | alias,
|  | const char * | entType,
|  | const char * | name,
|  | const char * | color )

Add an Entity Value.

Parameters

  alias | Alias on the entity value
  entType | Type of the entity
  name | Name of the variable type
  color | Color of the entity

Returns
  0 if success
  An error code otherwise

## pajeAddEvent()

trace_return_t pajeAddEvent | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | const char * | val )

Add an Event.

Parameters

  time | Time at which the event happens
  type | Type of the event
  cont | Container in this event
  val | Entity value of the event of the container

Returns
  0 if success
  An error code otherwise

## pajeAddEventType()

trace_return_t pajeAddEventType | ( | const char * | alias,
|  | const char * | contType,
|  | const char * | name )

Add an Event Type.

Parameters

  alias | Alias on the event type
  contType | Type of container
  name | Name of the event type

Returns
  0 if success
  An error code otherwise

## pajeAddLinkType()

trace_return_t pajeAddLinkType | ( | const char * | alias,
|  | const char * | name,
|  | const char * | contType,
|  | const char * | srcContType,
|  | const char * | destContType )

Add a Link Type.

Parameters

  alias | Alias on the link type
  name | Name of the link type
  contType | Type of container
  srcContType | Type of the source container
  destContType | Type of the destination container

Returns
  0 if success
  An error code otherwise

## pajeAddStateType()

trace_return_t pajeAddStateType | ( | const char * | alias,
|  | const char * | contType,
|  | const char * | name )

Add a State Type.

Parameters

  alias | Alias on the state type
  contType | Type of container
  name | Name of the state type

Returns
  0 if success
  An error code otherwise

## pajeAddVar()

trace_return_t pajeAddVar | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | varPrec | val )

Add a value to a Variable.

Parameters

  time | Time at which the variable is incremented
  type | Type of the variable
  cont | Container containing the variable
  val | Value added

Returns
  0 if success
  An error code otherwise

## pajeAddVarType()

trace_return_t pajeAddVarType | ( | const char * | alias,
|  | const char * | contType,
|  | const char * | name )

Add a Variable Type.

Parameters

  alias | Alias on the variable type
  contType | Type of container
  name | Name of the variable type

Returns
  0 if success
  An error code otherwise

## pajeDestroyContainer()

trace_return_t pajeDestroyContainer | ( | varPrec | time,
|  | const char * | name,
|  | const char * | type )

Destroy a Container.

Parameters

  time | Time at which the container is destroyed
  name | Name on the container to destroy
  type | Type of the container

Returns
  0 if success
  An error code otherwise

## pajeEndLink()

trace_return_t pajeEndLink | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | const char * | dest,
|  | const char * | val,
|  | const char * | key )

Start a link.

Parameters

  time | Time at which the link starts
  type | Type of the link
  cont | Container parent of the source and destination containers containing the link
  dest | Source container
  val | Value of the link
  key | Key used to match start link with end link

Returns
  0 if success
  An error code otherwise

## pajeEndTrace()

trace_return_t pajeEndTrace | ( |  | ) |

Finalize a PAJE trace.

Returns
  0 if success
  An error code otherwise

## pajeGetName()

char * pajeGetName | ( | int | rk | ) |

Function to get the name of the file containing all the data for the proc of rank rk.

Parameters

  rk | Rank of the proc you want the filename containing it

Returns
  Name of the file.

## pajeInitTrace()

trace_return_t pajeInitTrace | ( | const char * | filename,
|  | int | rank,
|  | gtg_flag_t | flags,
|  | int | fmt )

Initialize a VITE trace ( *.ept).

Parameters

  filename | Root name of the file to create
  rank | Rank of the processor
  flags | One of GTG_FLAG_NONE, GTG_FLAG_USE_MPI, GTG_FLAG_NOTBUF.
  fmt | Format, paje or vite

Returns
  0 if success An error code otherwise

## pajePopState()

trace_return_t pajePopState | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont )

Revert the State of a Container to its previous value.

Parameters

  time | Time at which the state is poped
  type | Type of the state
  cont | Container in this state

Returns
  0 if success
  An error code otherwise

## pajePushState()

trace_return_t pajePushState | ( | 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.

Parameters

  time | Time at which the state is pushed
  type | Type of the state
  cont | Container in this state
  val | Entity value of the state of the container

Returns
  0 if success
  An error code otherwise

## pajeSeqAddContainer()

trace_return_t pajeSeqAddContainer | ( | varPrec | time,
|  | const char * | alias,
|  | const char * | type,
|  | const char * | container,
|  | const char * | name )

Add a Container (PAJE format).

Parameters

  time | Time at which the container is added
  alias | Alias on the new container
  type | Type of the container
  container | Container parent
  name | Name of the variable type

Returns
  0 if success
  An error code otherwise

## pajeSetCompress()

trace_return_t pajeSetCompress | ( | int | val | ) |

Enable trace compression.

Parameters

  val | 0 means no compression, otherwize the output files will be compressed.

Returns
  0 if success
  An error code otherwise

## pajeSetState()

trace_return_t pajeSetState | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | const char * | val )

Set the State of a Container.

Parameters

  time | Time at which the state is set
  type | Type of the state
  cont | Container in this state
  val | Entity value of the state of the container

Returns
  0 if success
  An error code otherwise

## pajeSetVar()

trace_return_t pajeSetVar | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | varPrec | val )

Set a Variable value.

Parameters

  time | Time at which the variable is set
  type | Type of the variable
  cont | Container containing the variable
  val | Value of the variable

Returns
  0 if success
  An error code otherwise

## pajeStartLink()

trace_return_t pajeStartLink | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | const char * | src,
|  | const char * | val,
|  | const char * | key )

Start a link.

Parameters

  time | Time at which the link starts
  type | Type of the link
  cont | Container parent of the source and destination containers containing the link
  src | Source container
  val | Value of the link
  key | Key used to match start link with end link

Returns
  0 if success
  An error code otherwise

## pajeSubVar()

trace_return_t pajeSubVar | ( | varPrec | time,
|  | const char * | type,
|  | const char * | cont,
|  | varPrec | val )

Substract a value from a Variable.

Parameters

  time | Time at which the variable is incremented
  type | Type of the variable
  cont | Container containing the variable
  val | Value substracted

Returns
  0 if success
  An error code otherwise

## viteEndTrace()

trace_return_t viteEndTrace | ( |  | ) |

Finalize a VITE trace.

Returns
  0 if success
  An error code otherwise