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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 584 - (hide annotations)
Thu Mar 9 23:03:38 2006 UTC (13 years, 9 months ago) by gross
File MIME type: text/plain
File size: 2065 byte(s)
eigenvalues: compiles and passes tests on altix now
1 gross 494 /* $Id$ */
2    
3     /**************************************************************/
4    
5 gross 495 /* Paso: perfomance monitor interface using papi */
6 gross 494
7     /**************************************************************/
8    
9 gross 495 /* Copyrights by ACcESS Australia 2006 */
10 gross 494 /* Author: gross@access.edu.au */
11    
12     /**************************************************************/
13    
14     #ifndef INC_PASO_PERFORMANCE
15     #define INC_PASO_PERFORMANCE
16    
17 gross 495 #define PERFORMANCE_UNMONITORED_EVENT -1
18     #define PERFORMANCE_NUM_EVENTS 10 /* maximum number of events handeled by PAPI */
19 gross 494
20 gross 495 #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 gross 494
29 gross 495 #define PERFORMANCE_UNUSED -1
30     #define PERFORMANCE_CLOSED 0
31     #define PERFORMANCE_OPENED 1
32 gross 494
33 gross 495 #ifdef PAPI
34     #include <papi.h>
35 gross 494 struct Paso_Performance {
36 gross 495 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 gross 584 };
43 gross 495 #else
44     struct Paso_Performance {
45     int none;
46 gross 494 };
47     #endif
48 gross 495 typedef struct Paso_Performance Paso_Performance;
49 gross 494
50    
51 gross 584 void Performance_open(Paso_Performance* pp,int verbose);
52 gross 495 int Performance_getEventIndex(Paso_Performance* pp, int event_id);
53 gross 584 void Performance_close(Paso_Performance* pp,int verbose);
54 gross 495 void Performance_startMonitor(Paso_Performance* pp,int monitor);
55     void Performance_stopMonitor(Paso_Performance* pp,int monitor);
56 gross 494
57 gross 495 #endif
58 gross 494
59 gross 495 /*
60     * $Log$
61     */

  ViewVC Help
Powered by ViewVC 1.1.26