PAPI 7.1.0.0
Loading...
Searching...
No Matches
serial_hl.c
Go to the documentation of this file.
1#include <stdio.h>
2#include <stdlib.h>
3#include <time.h>
4#include "papi.h"
5#include "papi_test.h"
6#include "do_loops.h"
7
8int main( int argc, char **argv )
9{
10 int retval, i;
11 int quiet = 0;
12 char* region_name;
13
14 /* Set TESTS_QUIET variable */
15 quiet = tests_quiet( argc, argv );
16
17 region_name = "do_flops";
18
19 if ( !quiet ) {
20 printf("\nInstrument flops\n");
21 }
22
23 for ( i = 1; i <= 4; ++i ) {
24
25 retval = PAPI_hl_region_begin(region_name);
26 if ( retval != PAPI_OK ) {
27 test_fail( __FILE__, __LINE__, "PAPI_hl_region_begin", retval );
28 }
29
31
32 retval = PAPI_hl_region_end(region_name);
33 if ( retval != PAPI_OK ) {
34 test_fail( __FILE__, __LINE__, "PAPI_hl_region_end", retval );
35 }
36 }
37
38 test_hl_pass( __FILE__ );
39
40 return 0;
41}
int i
Read performance events at the beginning of a region.
Read performance events at the end of a region and store the difference to the corresponding beginnin...
#define PAPI_OK
Definition: f90papi.h:73
void do_flops(int n)
Definition: multiplex.c:23
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
Definition: test_utils.c:376
void PAPI_NORETURN test_hl_pass(const char *filename)
Definition: test_utils.c:467
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
Definition: test_utils.c:491
int main()
Definition: pernode.c:20
int quiet
Definition: rapl_overflow.c:19
#define NUM_FLOPS
Definition: sdsc-mpx.c:24
int retval
Definition: zero_fork.c:53