Commit 2944e4c7 authored by Andreas Marek's avatar Andreas Marek

Fix Papi

parent 61b96dff
......@@ -431,6 +431,7 @@ module elpa_impl
call self%timer%enable()
if (performance == 1) then
call self%timer%measure_flops(.true.)
call self%timer%set_print_options(print_flop_count=.true.,print_flop_rate=.true.)
endif
endif
#endif
......
......@@ -76,6 +76,8 @@ int ftimings_papi_init(void) {
flops_available = 1;
}
ldst_available = 0;
#if 0
/* Loads + Stores */
if ((ret = PAPI_query_event(PAPI_LD_INS)) < 0) {
fprintf(stderr, "ftimings: %s:%d: PAPI_query_event(PAPI_LD_INS): %s\n",
......@@ -96,7 +98,7 @@ int ftimings_papi_init(void) {
} else {
ldst_available = 1;
}
#endif
/* Start */
if ((ret = PAPI_start(event_set)) < 0) {
fprintf(stderr, "ftimings: %s:%d PAPI_start(): %s\n",
......
......@@ -65,6 +65,7 @@ module timings_dummy
procedure, pass :: free => timer_free
procedure, pass :: print => timer_print
procedure, pass :: measure_flops => timer_measure_flops
procedure, pass :: set_print_options => timer_set_print_options
end type
type(timer_dummy_t) :: timer
......@@ -101,6 +102,29 @@ module timings_dummy
logical :: enable
end subroutine
subroutine timer_set_print_options(self, print_allocated_memory, &
print_virtual_memory, &
print_max_allocated_memory, &
print_flop_count, &
print_flop_rate, &
print_ldst, &
print_memory_bandwidth, &
print_ai, &
bytes_per_ldst)
class(timer_dummy_t), intent(inout), target :: self
logical, intent(in), optional :: &
print_allocated_memory, &
print_virtual_memory, &
print_max_allocated_memory, &
print_flop_count, &
print_flop_rate, &
print_ldst, &
print_memory_bandwidth, &
print_ai
integer, intent(in), optional :: bytes_per_ldst
end subroutine
subroutine timer_free(self)
class(timer_dummy_t), intent(inout), target :: self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment