Commit 00cf5f05 authored by Andreas Marek's avatar Andreas Marek

Allow to build (useless) ELPA if --disable-timings

parent 37112bd3
...@@ -75,6 +75,7 @@ module elpa_abstract_impl ...@@ -75,6 +75,7 @@ module elpa_abstract_impl
type(timer_t) :: autotune_timer type(timer_t) :: autotune_timer
#else #else
type(timer_dummy_t) :: timer type(timer_dummy_t) :: timer
type(timer_dummy_t) :: autotune_timer
#endif #endif
type(c_ptr) :: index = C_NULL_PTR type(c_ptr) :: index = C_NULL_PTR
logical :: eigenvalues_only logical :: eigenvalues_only
......
...@@ -851,8 +851,9 @@ module elpa_impl ...@@ -851,8 +851,9 @@ module elpa_impl
unfinished = .false. unfinished = .false.
if (ts_impl%i >= 0) then if (ts_impl%i >= 0) then
#ifdef HAVE_DETAILED_TIMINGS
time_spent = self%autotune_timer%get("accumulator") time_spent = self%autotune_timer%get("accumulator")
!print *, time_spent #endif
if (ts_impl%min_loc == -1 .or. (time_spent < ts_impl%min_val)) then if (ts_impl%min_loc == -1 .or. (time_spent < ts_impl%min_val)) then
ts_impl%min_val = time_spent ts_impl%min_val = time_spent
ts_impl%min_loc = ts_impl%i ts_impl%min_loc = ts_impl%i
......
...@@ -61,12 +61,22 @@ module timings_dummy ...@@ -61,12 +61,22 @@ module timings_dummy
contains contains
procedure, pass :: start => timer_start procedure, pass :: start => timer_start
procedure, pass :: stop => timer_stop procedure, pass :: stop => timer_stop
procedure, pass :: enable => timer_enable
procedure, pass :: free => timer_free
procedure, pass :: print => timer_print
end type end type
type(timer_dummy_t) :: timer type(timer_dummy_t) :: timer
type(timer_dummy_t) :: autotune_timer
contains contains
subroutine timer_print(self, name)
class(timer_dummy_t), intent(inout), target :: self
character(len=*), intent(in) :: name
end subroutine
subroutine timer_start(self, name, replace) subroutine timer_start(self, name, replace)
class(timer_dummy_t), intent(inout), target :: self class(timer_dummy_t), intent(inout), target :: self
character(len=*), intent(in) :: name character(len=*), intent(in) :: name
...@@ -80,4 +90,13 @@ module timings_dummy ...@@ -80,4 +90,13 @@ module timings_dummy
end subroutine end subroutine
subroutine timer_enable(self)
class(timer_dummy_t), intent(inout), target :: self
end subroutine
subroutine timer_free(self)
class(timer_dummy_t), intent(inout), target :: self
end subroutine
end module timings_dummy end module timings_dummy
...@@ -47,7 +47,11 @@ ...@@ -47,7 +47,11 @@
module test_analytic module test_analytic
use test_util use test_util
#ifdef HAVE_DETAILED_TIMINGS
use ftimings use ftimings
#else
use timings_dummy
#endif
interface prepare_matrix_analytic interface prepare_matrix_analytic
module procedure prepare_matrix_analytic_complex_double module procedure prepare_matrix_analytic_complex_double
module procedure prepare_matrix_analytic_real_double module procedure prepare_matrix_analytic_real_double
......
...@@ -51,8 +51,11 @@ ...@@ -51,8 +51,11 @@
MATH_DATATYPE(kind=REAL_DATATYPE), intent(inout) :: a(:,:) MATH_DATATYPE(kind=REAL_DATATYPE), intent(inout) :: a(:,:)
integer(kind=ik) :: globI, globJ, locI, locJ, pi, pj, levels(num_primes) integer(kind=ik) :: globI, globJ, locI, locJ, pi, pj, levels(num_primes)
#ifdef HAVE_DETAILED_TIMINGS
type(timer_t) :: timer type(timer_t) :: timer
#else
type(timer_dummy_t) :: timer
#endif
call timer%enable() call timer%enable()
call timer%start("prepare_matrix_analytic") call timer%start("prepare_matrix_analytic")
...@@ -147,7 +150,12 @@ ...@@ -147,7 +150,12 @@
integer(kind=ik) :: max_idx_array(np_rows * np_cols), & integer(kind=ik) :: max_idx_array(np_rows * np_cols), &
rank rank
#ifdef HAVE_DETAILED_TIMINGS
type(timer_t) :: timer type(timer_t) :: timer
#else
type(timer_dummy_t) :: timer
#endif
call timer%enable() call timer%enable()
call timer%start("check_correctness_analytic") call timer%start("check_correctness_analytic")
......
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