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

Diff of /trunk/paso/src/performance.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1555 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1556 by gross, Mon May 12 00:54:58 2008 UTC
# Line 33  Line 33 
33  void Performance_open(Paso_Performance* pp,int verbose) {  void Performance_open(Paso_Performance* pp,int verbose) {
34     #ifdef PAPI     #ifdef PAPI
35        int i,j;        int i,j;
36        #pragma omp master        #pragma omp single
37        {        {
38           pp->event_set=PAPI_NULL;           pp->event_set=PAPI_NULL;
39           /* Initialize the PAPI library */           /* Initialize the PAPI library */
# Line 90  int  Performance_getEventIndex(Paso_Perf Line 90  int  Performance_getEventIndex(Paso_Perf
90  void Performance_close(Paso_Performance* pp,int verbose) {  void Performance_close(Paso_Performance* pp,int verbose) {
91      #ifdef PAPI      #ifdef PAPI
92        long_long values[PERFORMANCE_NUM_EVENTS];        long_long values[PERFORMANCE_NUM_EVENTS];
93        #pragma omp master        #pragma omp single
94        {        {
95          if (Paso_noError() && verbose) {          if (Paso_noError() && verbose) {
96             int i;             int i;
# Line 158  void Performance_startMonitor(Paso_Perfo Line 158  void Performance_startMonitor(Paso_Perfo
158         int i;         int i;
159         long_long values[PERFORMANCE_NUM_EVENTS];         long_long values[PERFORMANCE_NUM_EVENTS];
160         #pragma omp barrier         #pragma omp barrier
161         #pragma omp master         #pragma omp single
162         {         {
163            /* Start counting events in the Event Set */            /* Start counting events in the Event Set */
164            PAPI_read(pp->event_set,values);            PAPI_read(pp->event_set,values);
# Line 177  void Performance_stopMonitor(Paso_Perfor Line 177  void Performance_stopMonitor(Paso_Perfor
177         int i;         int i;
178         long_long values[PERFORMANCE_NUM_EVENTS];         long_long values[PERFORMANCE_NUM_EVENTS];
179         #pragma omp barrier         #pragma omp barrier
180         #pragma omp master         #pragma omp single
181         {         {
182            /* Add the counters in the Event Set */            /* Add the counters in the Event Set */
183            PAPI_read(pp->event_set,values);            PAPI_read(pp->event_set,values);
# Line 188  void Performance_stopMonitor(Paso_Perfor Line 188  void Performance_stopMonitor(Paso_Perfor
188         }         }
189      #endif      #endif
190  }  }
 /*  
  * $Log$  
  */  
   

Legend:
Removed from v.1555  
changed lines
  Added in v.1556

  ViewVC Help
Powered by ViewVC 1.1.26