PAPI 7.1.0.0
Loading...
Searching...
No Matches
mpi_hl.c File Reference
Include dependency graph for mpi_hl.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 9 of file mpi_hl.c.

10{
11 int retval;
12 int quiet = 0;
13 char* region_name;
14 int world_size, world_rank;
15
16 /* Set TESTS_QUIET variable */
17 quiet = tests_quiet( argc, argv );
18
19 MPI_Init( &argc, &argv );
20 MPI_Comm_size(MPI_COMM_WORLD, &world_size);
21 MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
22
23 region_name = "do_flops";
24
25 if ( !quiet ) {
26 printf("\nRank %d: instrument flops\n", world_rank);
27 }
28
29 retval = PAPI_hl_region_begin(region_name);
30 if ( retval != PAPI_OK ) {
31 test_fail( __FILE__, __LINE__, "PAPI_hl_region_begin", retval );
32 }
33
35
36 retval = PAPI_hl_region_end(region_name);
37 if ( retval != PAPI_OK ) {
38 test_fail( __FILE__, __LINE__, "PAPI_hl_region_end", retval );
39 }
40
41 MPI_Finalize();
42 test_hl_pass( __FILE__ );
43
44 return 0;
45}
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
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 quiet
Definition: rapl_overflow.c:19
#define NUM_FLOPS
Definition: sdsc-mpx.c:24
int retval
Definition: zero_fork.c:53
Here is the call graph for this function: