gasp_mpi.c File Reference

MPI GASP wrapper implementation for PPW. More...

#include <ppw_stdinc.h>
#include <gasp_mpi_upcall.h>
#include <mpi.h>
#include <gasp.h>
#include <gasp_mpi.h>

Classes

struct  ppw_userev_s
 A struct for keeping track of user events. More...
struct  _gasp_context_S
 Our GASP context struct definition. More...

Defines

#define GASP_UPCALL(cmd)
 Utility macro for upcalls.
#define MAX_USEREVT   (GASP_MPI_USEREVT_END - GASP_MPI_USEREVT_START)
#define PPW_GASP_TYPENAME(ID, TYPE, TXT)
#define PPW_THROTTLE(SRCID, CTX)

Typedefs

typedef struct ppw_userev_sppw_userev

Functions

void gasp_mpi_finish (gasp_context_t ctx, int64_t ts)
 Finish up data collection and write data out.
void gasp_dummy (int val)
 Silly function to ensure linking of GASP.
gasp_context_t gasp_init (gasp_model_t model, int *argc, char ***argv)
int gasp_control (gasp_context_t ctx, int on)
int ppw_gasp_lookupsrc (ppw_profile prof, unsigned int gasp_tag, const char *filename, int line, char is_local, const void *data)
 Callback used by the measurement code to translate a (gasp tag, filename, line) tuple into a source ID.
unsigned int gasp_create_event (gasp_context_t ctx, const char *name, const char *desc)
void gasp_event_notify (gasp_context_t ctx, unsigned int evttag, gasp_evttype_t evttype, const char *filename, int linenum, int colnum,...)
void gasp_event_notifyVA (gasp_context_t ctx, unsigned int evttag, gasp_evttype_t evttype, const char *filename, int linenum, int colnum, va_list argptr)

Variables

int _ppw_gasp_dummyval
 Silly variable to ensure linking of GASP.


Detailed Description

MPI GASP wrapper implementation for PPW.

Author:
Hung-Hsun Su, Adam Leko

Define Documentation

#define GASP_UPCALL ( cmd   ) 

Value:

{ \
  char old_in_upcall = ctx->in_upcall; \
  ctx->in_upcall = 1; \
  cmd; \
  ctx->in_upcall = old_in_upcall; \
}
Utility macro for upcalls.

Referenced by gasp_mpi_finish(), and gasp_upc_finish().

#define PPW_GASP_TYPENAME ( ID,
TYPE,
TXT   ) 

Value:

case ID: \
    typename = TYPE; \
    evdesc = TXT; \
    break;

#define PPW_THROTTLE ( SRCID,
CTX   ) 

Value:

if((SRCID) == PPW_THROTTLE_MAGIC) {                     \
    (CTX)->throttled = 1;                               \
    (CTX)->start_cnt_after_throttled = 0;               \
    return;                                             \
  }


Function Documentation

void gasp_dummy ( int  val  ) 

Silly function to ensure linking of GASP.

Silly function for ensuring linking of GASP.

Note that passing in something like "-u gasp_init" during linking also works, but the ``fake function'' solution seems more portable.

References _ppw_gasp_dummyval.

int ppw_gasp_lookupsrc ( ppw_profile  prof,
unsigned int  gasp_tag,
const char *  filename,
int  line,
char  is_local,
const void *  data 
)

Callback used by the measurement code to translate a (gasp tag, filename, line) tuple into a source ID.

Must be provided by each GASP wrapper that uses this measurement code.

The void* is a helper pointer that can be used to create the ID if just the (tag, filename, line) info is not enough. For instance, in the case of GASP_C_FUNC, it could be the name of the function being called. It is the same void* that got passed in via the ppw_meas_srcid function, which is who calls ppw_gasp_lookup when it needs to generate a new source ID.

The is_local flag is also passed along from the ppw_meas_srcid call.

References ppw_source.callsite_id, GASP_C_FUNC, ppw_source.operation_id, ppw_userev_s.opid, ppw_list_at(), ppw_profile_add_operation(), ppw_profile_add_source(), ppw_profile_lookupcs(), ppw_profile_lookuplang(), ppw_profile_lookupot(), and PPW_WARNMSG.


Generated on Sat Sep 29 08:46:40 2012 for PPW by  doxygen 1.5.8