/[escript]/trunk/paso/src/performance.h
ViewVC logotype

Contents of /trunk/paso/src/performance.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 584 - (show annotations)
Thu Mar 9 23:03:38 2006 UTC (13 years, 1 month ago) by gross
File MIME type: text/plain
File size: 2065 byte(s)
eigenvalues: compiles and passes tests on altix now
1 /* $Id$ */
2
3 /**************************************************************/
4
5 /* Paso: perfomance monitor interface using papi */
6
7 /**************************************************************/
8
9 /* Copyrights by ACcESS Australia 2006 */
10 /* Author: gross@access.edu.au */
11
12 /**************************************************************/
13
14 #ifndef INC_PASO_PERFORMANCE
15 #define INC_PASO_PERFORMANCE
16
17 #define PERFORMANCE_UNMONITORED_EVENT -1
18 #define PERFORMANCE_NUM_EVENTS 10 /* maximum number of events handeled by PAPI */
19
20 #define PERFORMANCE_ALL 0
21 #define PERFORMANCE_SOLVER 1
22 #define PERFORMANCE_PRECONDITIONER_INIT 2
23 #define PERFORMANCE_PRECONDITIONER 3
24 #define PERFORMANCE_MVM 4
25 #define PERFORMANCE_ASSEMBLAGE 5
26 #define PERFORMANCE_UNKNOWN 6 /* more can be added here */
27 #define PERFORMANCE_NUM_MONITORS PERFORMANCE_UNKNOWN+1
28
29 #define PERFORMANCE_UNUSED -1
30 #define PERFORMANCE_CLOSED 0
31 #define PERFORMANCE_OPENED 1
32
33 #ifdef PAPI
34 #include <papi.h>
35 struct Paso_Performance {
36 int event_set; /* papi event sets for the monitors */
37 int num_events; /* number of events tracked by the monitors */
38 int events[PERFORMANCE_NUM_EVENTS]; /* the event tracked by the monitors */
39 long_long values[PERFORMANCE_NUM_MONITORS][PERFORMANCE_NUM_EVENTS]; /* counter accummulator */
40 long_long cycles[PERFORMANCE_NUM_MONITORS]; /* cycle accumulator */
41 int set[PERFORMANCE_NUM_MONITORS];
42 };
43 #else
44 struct Paso_Performance {
45 int none;
46 };
47 #endif
48 typedef struct Paso_Performance Paso_Performance;
49
50
51 void Performance_open(Paso_Performance* pp,int verbose);
52 int Performance_getEventIndex(Paso_Performance* pp, int event_id);
53 void Performance_close(Paso_Performance* pp,int verbose);
54 void Performance_startMonitor(Paso_Performance* pp,int monitor);
55 void Performance_stopMonitor(Paso_Performance* pp,int monitor);
56
57 #endif
58
59 /*
60 * $Log$
61 */

  ViewVC Help
Powered by ViewVC 1.1.26