Manual Reference Pages  - papiex_start (3)

NAME

papiex_start - Start counting at instrumentation point. papiex_stop - Stop counting at instrumentation point. papiex_accum - Accumulate counts since last start or accum at instrumentation point.

CONTENTS

Synopsis
Description
Arguments
Return Values
Example
See Also
Bugs
Authors
Copyright

SYNOPSIS

C Interface

#include <papiex.h> PAPIEX_START_ARG(int point, char *label); PAPIEX_STOP_ARG(int point); PAPIEX_ACCUM_ARG(int point); PAPIEX_START(); PAPIEX_STOP(); PAPIEX_ACCUM();

void papiex_start(int point, char *label); void papiex_stop(int point); void papiex_accum(int point);

Fortran Interface

#include <papiex.h> PAPIEX_START_ARG(C_INT point, C_STRING label) PAPIEX_STOP_ARG(C_INT point); PAPIEX_ACCUM_ARG(C_INT point); PAPIEX_START(); PAPIEX_STOP(); PAPIEX_ACCUM();

papiex_start(C_INT point, C_STRING label) papiex_stop(C_INT point)

DESCRIPTION

These functions set up caliper points for measurement with the papiex tool. By default papiex measures the entire execution of processes and threads. By using caliper points, the user can quickly and easily instrument and measure smaller regions of code while continuing to use the papiex program to control counting options. Each measured region maintains per-thread counts so the semantics are similar to that of papiex. Points that are stopped can be started again and the subsequent passes over that caliper will accumulate the data. papiex reserves caliper point 0 for internal use.

The macros defined in the papiex.h header file are for convenience and the user is encouraged to use them. By using these macros, the user can conditionally compile them out of the source code by defining the -DNO_PAPIEX on the compile line. PAPIEX_START and PAPIEX_STOP are shortcuts to caliper point 1 with no label.

In order to compile and link with the papiex header file and library, the user is encouraged to make use of the papiex-config driver as shown below.

ARGUMENTS

point -- an integer handle for the caliper. This can range from 1 to PAPIEX_MAX_CALIPERS as defined in papiex.h.

label -- an optional character string for labeling the point, which will be included in the output of PapiEx. This value is only used on the first call of papiex_start for a particular caliper point.

RETURN VALUES

These functions return no values.

EXAMPLE


#include "papiex.h"

volatile double a = 0.1, b = 1.1, c = 2.1;

int main(int argc, char **argv) { int i;

PAPIEX_START(); /* Same as papiex_start(1,""); */ printf("Doing 100000000 iters. of a += b * c on doubles.0); PAPIEX_STOP(); /* Same as papiex_stop(1); */

/* Measure the whole loop */ PAPIEX_START_ARG(2,"for loop 1"); for (i=0;i<100000000;i++) a += b * c; PAPIEX_STOP_ARG(2);

/* The below will measure every iteration */ PAPIEX_START_ARG(2,"for loop 2"); for (i=0;i<100000000;i++) { a += b * c; PAPIEX_ACCUM_ARG(2); } PAPIEX_STOP_ARG(2); }

> gcc ‘papiex-config --cflags‘ example.c -o a.out ‘papiex-config --libs‘

SEE ALSO

papiex(1), papiex-config(1), PAPI(3)

BUGS

Caliper point 0 is reserved for internal use.

Additional bugs should be reported to the PAPI Mailing List at <ptools-perfapi@cs.utk.edu>.

AUTHORS

papiex was written by Philip J. Mucci and Tushar Mohan.

COPYRIGHT

This software is COMPLETELY OPEN SOURCE. If you incorporate any portion of this software, I would appreciate an acknowledgement in the appropriate places. Should you find PapiEx useful, please considering making a contribution in the form of hardware, software or plain old cash.


papiex_start (3) Feb, 2005
Generated by manServer 1.07 from man/papiex_start.3 using man macros.