/[escript]/branches/doubleplusgood/paso/src/performance.h
ViewVC logotype

Annotation of /branches/doubleplusgood/paso/src/performance.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3911 - (hide annotations)
Thu Jun 14 01:01:03 2012 UTC (6 years, 11 months ago) by jfenwick
Original Path: trunk/paso/src/performance.h
File MIME type: text/plain
File size: 2466 byte(s)
Copyright changes
1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
4 jfenwick 3911 * Copyright (c) 2003-2012 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 dhawcroft 631
14 ksteube 1811
15 gross 494 /**************************************************************/
16    
17 gross 495 /* Paso: perfomance monitor interface using papi */
18 gross 494
19     /**************************************************************/
20    
21 gross 495 /* Copyrights by ACcESS Australia 2006 */
22 jfenwick 2608 /* Author: Lutz Gross, l.gross@uq.edu.au */
23 gross 494
24     /**************************************************************/
25    
26     #ifndef INC_PASO_PERFORMANCE
27     #define INC_PASO_PERFORMANCE
28    
29 gross 495 #define PERFORMANCE_UNMONITORED_EVENT -1
30 caltinay 3642 #define PERFORMANCE_NUM_EVENTS 10 /* maximum number of events handled by PAPI */
31 gross 494
32 gross 495 #define PERFORMANCE_ALL 0
33     #define PERFORMANCE_SOLVER 1
34     #define PERFORMANCE_PRECONDITIONER_INIT 2
35     #define PERFORMANCE_PRECONDITIONER 3
36     #define PERFORMANCE_MVM 4
37     #define PERFORMANCE_ASSEMBLAGE 5
38     #define PERFORMANCE_UNKNOWN 6 /* more can be added here */
39     #define PERFORMANCE_NUM_MONITORS PERFORMANCE_UNKNOWN+1
40 gross 494
41 gross 495 #define PERFORMANCE_UNUSED -1
42     #define PERFORMANCE_CLOSED 0
43     #define PERFORMANCE_OPENED 1
44 gross 494
45 gross 495 #ifdef PAPI
46     #include <papi.h>
47 gross 494 struct Paso_Performance {
48 gross 495 int event_set; /* papi event sets for the monitors */
49     int num_events; /* number of events tracked by the monitors */
50     int events[PERFORMANCE_NUM_EVENTS]; /* the event tracked by the monitors */
51 caltinay 3642 long_long values[PERFORMANCE_NUM_MONITORS][PERFORMANCE_NUM_EVENTS]; /* counter accumulator */
52 gross 495 long_long cycles[PERFORMANCE_NUM_MONITORS]; /* cycle accumulator */
53     int set[PERFORMANCE_NUM_MONITORS];
54 gross 584 };
55 gross 495 #else
56     struct Paso_Performance {
57     int none;
58 gross 494 };
59     #endif
60 gross 495 typedef struct Paso_Performance Paso_Performance;
61 gross 494
62    
63 gross 584 void Performance_open(Paso_Performance* pp,int verbose);
64 gross 495 int Performance_getEventIndex(Paso_Performance* pp, int event_id);
65 gross 584 void Performance_close(Paso_Performance* pp,int verbose);
66 gross 495 void Performance_startMonitor(Paso_Performance* pp,int monitor);
67     void Performance_stopMonitor(Paso_Performance* pp,int monitor);
68 gross 494
69 gross 495 #endif
70 gross 494
71 gross 495 /*
72     * $Log$
73     */

  ViewVC Help
Powered by ViewVC 1.1.26