#include "fpapi.h"
real real_time,cpu_time, mflops
integer*8 fp_ins
call PAPIf_flops( real_time, cpu_time, fp_ins, mflops, ierr )
....traitement....
call PAPIf_flops(real_time,cpu_time, fp_ins, mflops, ierr)
...édition des résultats:
write (6,120) real_time, cpu_time, fp_ins,mflops
120 format (//'PAPI result'/'
$ /'
CPU time (secs) :',f15.3,
$ /'floating point instructions:', i15,
$ /'
b)
-
Inclure les définitions de PAPI:
#include "fpapi.h"
-
Déclarer les évènements a compter et la récupération des erreurs:
integer events(2),numevents, ierr
character*PAPI_MAX_STR_LEN errorstring
-
Déclarer les variables pour récupérer les compteurs
integer*8 values(2)
2-26
real time (secs) :', f15.3,
MFLOPS:', f15.3)
L'interface haut-niveau ( non thread-safe):
Guide d'installation des logiciels HPC