Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doku:papi_ll_fortran [2016/07/05 12:48] irdoku:papi_ll_fortran [2016/07/05 12:50] (current) ir
Line 1: Line 1:
 ==== Interfacing with PAPI : Low level interface for Fortran ==== ==== Interfacing with PAPI : Low level interface for Fortran ====
              PROGRAM testpapi              PROGRAM testpapi
 +             
              include 'f77papi.h'              include 'f77papi.h'
              integer check, evntst              integer check, evntst
Line 103: Line 104:
                 stop                 stop
              endif              endif
 +             
 +             END PROGRAM
  
-====== d ====== 
-<code> 
-      PROGRAM testpapi 
-      include 'f77papi.h' 
-      integer check, evntst 
-      integer*8 t0, t1, c0, c1, value 
  
-      check = PAPI_NULL 
-C 
-C     PAPI Initialization 
-C 
-      check = PAPI_VER_CURRENT 
-      call PAPIF_library_init(check) 
-      if (check.ne.PAPI_VER_CURRENT) then 
-         write(6,*) 'PAPI init error' 
-         write(6,*) '00 check:', check, PAPI_VER_CURRENT 
-         stop 
-      endif 
-C 
-C     PAPI Event Set Creation 
-C 
-      evntst = PAPI_NULL 
-      call PAPIF_create_eventset(evntst, check) 
-      if (check.ne.PAPI_OK) then 
-         write(6,*) 'PAPI event set creation error' 
-         write(6,*) '01 check:', check, PAPI_OK 
-         stop 
-      endif 
-C 
-C     PAPI Specify a Particular Target Event to Analyze 
-C  PAPI_TOT_CYC         Total cycles executed          
-C  PAPI_FP_OPS          Floating point operations executed 
-C  PAPI_L1_DCM          Level 1 data cache misses           
-C  PAPI_L2_DCM          Level 2 data cache misses           
-C  for other events see 
-C  /opt/sw/x86_64/glibc-2.12/ivybridge-ep/papi/5.4.3/gnu-4.4.7/include/papiStdEventDefs.h 
-C 
-      call PAPIF_add_event(evntst, PAPI_FP_OPS, check) 
-      if (check.ne.PAPI_OK) then 
-         write(6,*) 'PAPI event set adding error' 
-         write(6,*) '02 check:', check, PAPI_OK 
-         stop 
-      endif 
-C 
-C     PAPI Time Estimators Initialization            
-C    
-      call PAPIF_get_real_usec(t0) 
-      call PAPIF_get_real_cyc(c0) 
-C 
-C     PAPI Counting Start                            
-C    
-      call PAPIF_start(evntst, check) 
-      if (check.ne.PAPI_OK) then 
-         write(6,*) 'PAPI start error !' 
-         write(6,*) '03 check:', check, PAPI_OK 
-         stop 
-      endif 
- 
-C 
-C     *** Here follows the original code section to be analyzed *** 
-C 
- 
- 
-C     PAPI Counting Stop                             
-C    
-      call PAPIF_stop(evntst, value, check) 
-      if (check.ne.PAPI_OK) then 
-         write(6,*) 'PAPI stop error !' 
-         write(6,*) '04 check:', check, PAPI_OK 
-         stop 
-      endif 
- 
-C     PAPI Time Estimators Stop                      
-C    
-      call PAPIF_get_real_usec(t1) 
-      call PAPIF_get_real_cyc(c1) 
-      </code> 
  • doku/papi_ll_fortran.1467722905.txt.gz
  • Last modified: 2016/07/05 12:48
  • by ir