Commit a077abc8 authored by Andreas Marek's avatar Andreas Marek

Add some doxygen documentation for the autotuning routines

parent 0be5ab47
......@@ -208,16 +208,22 @@ module elpa
obj => elpa_impl_allocate()
end function
!> \brief function to deallocate an ELPA instance
!> Parameters
!> \details
!> \param obj class(elpa_t), pointer : pointer to object to be destroyed and deallocated
!> \param obj class(elpa_t), pointer : pointer to the ELPA object to be destroyed and deallocated
subroutine elpa_deallocate(obj)
class(elpa_t), pointer :: obj
call obj%destroy()
deallocate(obj)
end subroutine
!> \brief function to deallocate an ELPA autotune instance
!> Parameters
!> \details
!> \param obj class(elpa_autotune_t), pointer : pointer to then autotune object to be destroyed and deallocated
subroutine elpa_autotune_deallocate(obj)
class(elpa_autotune_t), pointer :: obj
call obj%destroy()
......
......@@ -96,10 +96,10 @@ module elpa_api
procedure(elpa_can_set_i), deferred, public :: can_set !< method to check whether key/value can be set
! Timer
procedure(elpa_get_time_i), deferred, public :: get_time
procedure(elpa_print_times_i), deferred, public :: print_times
procedure(elpa_timer_start_i), deferred, public :: timer_start
procedure(elpa_timer_stop_i), deferred, public :: timer_stop
procedure(elpa_get_time_i), deferred, public :: get_time !< method to get the times from the timer object
procedure(elpa_print_times_i), deferred, public :: print_times !< method to print the timings tree
procedure(elpa_timer_start_i), deferred, public :: timer_start !< method to start a time measurement
procedure(elpa_timer_stop_i), deferred, public :: timer_stop !< method to stop a time measurement
! Actual math routines
generic, public :: eigenvectors => & !< method eigenvectors for solving the full eigenvalue problem
......@@ -132,14 +132,14 @@ module elpa_api
elpa_invert_trm_dc, &
elpa_invert_trm_fc
generic, public :: solve_tridiagonal => & !< method to solve the eigenvalue problem for a tridiagonal
elpa_solve_tridiagonal_d, & !< matrix
generic, public :: solve_tridiagonal => & !< method to solve the eigenvalue problem for a tridiagonal
elpa_solve_tridiagonal_d, & !< matrix
elpa_solve_tridiagonal_f
! Auto-tune
procedure(elpa_autotune_setup_i), deferred, public :: autotune_setup
procedure(elpa_autotune_step_i), deferred, public :: autotune_step
procedure(elpa_autotune_set_best_i), deferred, public :: autotune_set_best
procedure(elpa_autotune_setup_i), deferred, public :: autotune_setup !< method to prepare the ELPA autotuning
procedure(elpa_autotune_step_i), deferred, public :: autotune_step !< method to do an autotuning step
procedure(elpa_autotune_set_best_i), deferred, public :: autotune_set_best !< method to set the best options
!> \brief These method have to be public, in order to be overrideable in the extension types
procedure(elpa_set_integer_i), deferred, public :: elpa_set_integer
......@@ -177,6 +177,8 @@ module elpa_api
procedure(elpa_solve_tridiagonal_f_i), deferred, public :: elpa_solve_tridiagonal_f
end type elpa_t
!> \brief Abstract definition of the elpa_autotunet type
type, abstract :: elpa_autotune_t
private
contains
......@@ -200,7 +202,7 @@ module elpa_api
end interface
!> \brief abstract definition of setup method
!> \brief abstract definition of the ELPA setup method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object
......@@ -215,6 +217,13 @@ module elpa_api
end interface
!> \brief abstract definition of the autotune setup method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object, which should be tuned
!> \param level integer: the level of "thoroughness" of the tuning steps
!> \param domain integer: domain (real/complex) which should be tuned
!> \result tune_state class(elpa_autotune_t): the autotuning object
abstract interface
function elpa_autotune_setup_i(self, level, domain) result(tune_state)
import elpa_t, elpa_autotune_t
......@@ -226,6 +235,12 @@ module elpa_api
end interface
!> \brief abstract definition of the autotune step method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object, which should be tuned
!> \param tune_state class(elpa_autotune_t): the autotuning object
!> \param unfinished logical: state whether tuning is unfinished or not
abstract interface
function elpa_autotune_step_i(self, tune_state) result(unfinished)
import elpa_t, elpa_autotune_t
......@@ -236,7 +251,13 @@ module elpa_api
end function
end interface
!> \brief abstract definition of the autotune set_best method
!> Parameters
!> \details
!> \param self class(elpa_t): the ELPA object, which should be tuned
!> \param tune_state class(elpa_autotune_t): the autotuning object
!> Sets the best combination of ELPA options
abstract interface
subroutine elpa_autotune_set_best_i(self, tune_state)
import elpa_t, elpa_autotune_t
......@@ -1214,7 +1235,10 @@ module elpa_api
end subroutine
end interface
!> \brief abstract definition of interface to print the autotuning state
!> Parameters
!> \param self class(elpa_autotune_t): the ELPA autotune object
abstract interface
subroutine elpa_autotune_print_i(self)
import elpa_autotune_t
......@@ -1223,7 +1247,10 @@ module elpa_api
end subroutine
end interface
!> \brief abstract definition of interface to destroy the autotuning state
!> Parameters
!> \param self class(elpa_autotune_t): the ELPA autotune object
abstract interface
subroutine elpa_autotune_destroy_i(self)
import elpa_autotune_t
......
......@@ -373,6 +373,12 @@ module elpa_impl
end function
!> \brief function to convert a value to an human readable string
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param option_name string: the name of the options, whose value should be converted
!> \param error integer: errpr code
!> \result string string: the humanreadable string
function elpa_value_to_string(self, option_name, error) result(string)
class(elpa_impl_t), intent(in) :: self
character(kind=c_char, len=*), intent(in) :: option_name
......@@ -448,8 +454,13 @@ module elpa_impl
call c_f_pointer(name_p, name)
call elpa_get_double(self, name, value, error)
end subroutine
!> \brief function to associate a pointer with an integer value
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param name string: the name of the entry
!> \result value integer, pointer: the value for the entry
function elpa_associate_int(self, name) result(value)
class(elpa_impl_t) :: self
character(*), intent(in) :: name
......@@ -465,6 +476,13 @@ module elpa_impl
end function
!> \brief function to querry the timing information at a certain level
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param name1 .. name6 string: the string identifier for the timer region.
!> at the moment 6 nested levels can be queried
!> \result s double: the timer metric for the region. Might be seconds,
!> or any other supported metric
function elpa_get_time(self, name1, name2, name3, name4, name5, name6) result(s)
class(elpa_impl_t), intent(in) :: self
! this is clunky, but what can you do..
......@@ -479,6 +497,11 @@ module elpa_impl
end function
!> \brief function to print the timing tree below at a certain level
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param name1 .. name6 string: the string identifier for the timer region.
!> at the moment 4 nested levels can be specified
subroutine elpa_print_times(self, name1, name2, name3, name4)
class(elpa_impl_t), intent(in) :: self
character(len=*), intent(in), optional :: name1, name2, name3, name4
......@@ -488,6 +511,10 @@ module elpa_impl
end subroutine
!> \brief function to start the timing of a code region
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param name string: a chosen identifier name for the code region
subroutine elpa_timer_start(self, name)
class(elpa_impl_t), intent(inout) :: self
character(len=*), intent(in) :: name
......@@ -497,6 +524,10 @@ module elpa_impl
end subroutine
!> \brief function to stop the timing of a code region
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param name string: identifier name for the code region to stop
subroutine elpa_timer_stop(self, name)
class(elpa_impl_t), intent(inout) :: self
character(len=*), intent(in) :: name
......@@ -1349,6 +1380,8 @@ module elpa_impl
call elpa_hermitian_multiply_f(self, uplo_a, uplo_c, ncb, a, b, nrows_b, &
ncols_b, c, nrows_c, ncols_c, error)
end subroutine
!> \brief elpa_hermitian_multiply_dc: class method to perform C : = A**H * B for double complex matrices
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
......@@ -1435,6 +1468,7 @@ module elpa_impl
ncols_b, c, nrows_c, ncols_c, error)
end subroutine
!> \brief elpa_hermitian_multiply_fc: class method to perform C : = A**H * B for float complex matrices
!> where A is a square matrix (self%na,self%na) which is optionally upper or lower triangular
!> B is a (self%na,ncb) matrix
......@@ -2069,6 +2103,9 @@ module elpa_impl
end subroutine
!> \brief function to destroy an elpa object
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
subroutine elpa_destroy(self)
#ifdef WITH_MPI
integer :: mpi_comm_rows, mpi_comm_cols, mpierr
......@@ -2091,6 +2128,13 @@ module elpa_impl
end subroutine
!> \brief function to setup the ELPA autotuning and create the autotune object
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param level integer: the "thoroughness" of the planed autotuning
!> \param domain integer: the domain (real/complex) which should be tuned
!> \result tune_state class(elpa_autotune_t): the created autotuning object
function elpa_autotune_setup(self, level, domain) result(tune_state)
class(elpa_impl_t), intent(inout), target :: self
integer, intent(in) :: level, domain
......@@ -2112,6 +2156,11 @@ module elpa_impl
end function
!> \brief function to do an autotunig step
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param tune_state class(elpa_autotune_t): the autotuning object
!> \result unfinished logical: describes the state of the autotuning (completed/uncompleted)
function elpa_autotune_step(self, tune_state) result(unfinished)
implicit none
class(elpa_impl_t), intent(inout) :: self
......@@ -2151,6 +2200,10 @@ module elpa_impl
end function
!> \brief function to set the up-to-know best options of the autotuning
!> Parameters
!> \param self class(elpa_impl_t) the allocated ELPA object
!> \param tune_state class(elpa_autotune_t): the autotuning object
subroutine elpa_autotune_set_best(self, tune_state)
implicit none
class(elpa_impl_t), intent(inout) :: 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