/[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 4257 - (hide annotations)
Wed Feb 27 03:42:40 2013 UTC (6 years, 2 months ago) by jfenwick
File MIME type: text/plain
File size: 2651 byte(s)
Some simple experiments for c++ Finley

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

  ViewVC Help
Powered by ViewVC 1.1.26