1PAPI_flips(3) PAPI PAPI_flips(3)
2
3
4
6 PAPI_flips - PAPI High level: Simplified call to get Mflips/s, real and processor time
7 PAPI_flops - PAPI High level: Simplified call to get Mflops/s, real and processor time
8
9
11 C Interface
12 #include <papi.h>
13 int PAPI_flips (float *rtime, float *ptime, long_long *flpins, float *mflips);
14 int PAPI_flops (float *rtime, float *ptime, long_long *flpops, float *mflops);
15 Fortran Interface
16 #include fpapi.h
17 PAPIF_flips(C_FLOAT real_time, C_FLOAT proc_time, C_LONG_LONG flpins, C_FLOAT mflips, C_INT check)
18 PAPIF_flops(C_FLOAT real_time, C_FLOAT proc_time, C_LONG_LONG flpops, C_FLOAT mflops, C_INT check)
19
20
22 The first call to PAPI_flips() or PAPI_flops() will initialize the PAPI
23 High Level interface, set up the counters to monitor PAPI_FP_INS or
24 PAPI_FP_OPS and PAPI_TOT_CYC events and start the counters. Subsequent
25 calls will read the counters and return total real time, total process
26 time, total floating point instructions or operations since the start
27 of the measurement and the Mflip/s or Mflop/s rate since latest call to
28 PAPI_flips() or PAPI_flops(). A call to PAPI_stop_counters() will stop
29 the counters from running and then calls such as PAPI_start_counters()
30 can safely be used.
31
32
34 *rtime -- total realtime since the first PAPI_flops() call
35
36 *ptime -- total process time since the first PAPI_flops() call
37
38 *flpins, flpops -- total floating point instructions or operations
39 since the first call
40
41 *mflips, *mflops -- Mflip/s or Mflop/s achieved since the previous call
42
43
45 On success, this function returns PAPI_OK.
46 On error, a non-zero error code is returned.
47
48
50 In addition to the possible errors returned by the various PAPI low
51 level calls, the following errors could also be returned:
52
53 PAPI_EINVAL
54 The counters were already started by something other than:
55 PAPI_flips() or PAPI_flops().
56
57 PAPI_ENOEVNT
58 The floating point operations,floating point instruction or
59 total cycles event does not exist.
60
61 PAPI_ENOMEM
62 Insufficient memory to complete the operation.
63
64
65
67 Mflip/s, or millions of floating point instructions per second, is
68 defined in this context as the number of instructions issued to the
69 floating point unit per second. It is usually calculated directly from
70 a counter measurement and may be different from platform to platform.
71 Mflop/s, or millions of floating point operations per second, is
72 intended to represent the number of floating point arithmetic opera‐
73 tions per second. Attempts are made to massage the counter values to
74 produce the theoreticallly expected value by, for instance, doubling
75 FMA counts or subtracting floating point loads and stores if necessary.
76 CAVEAT EMPTOR
77
78
79 PAPI_flops()andPAPI_flips() may be called by:
80
81 the user application program
82
83
84 PAPI_flops() contains calls to:
85
86 PAPI_perror()
87 PAPI_library_init()
88 PAPI_get_hardware_info()
89 PAPI_create_eventset()
90 PAPI_add_event()
91 PAPI_start()
92 PAPI_get_real_usec()
93 PAPI_accum()
94 PAPI_shutdown()
95
96
98 These functions have no known bugs.
99
100
102 PAPI_stop_counters (3),PAPI_ipc (3),PAPI_set_opt (3)
103
104
105
106PAPI Programmer's Reference September, 2004 PAPI_flips(3)