Commit 316be4bf authored by Andreas Marek's avatar Andreas Marek

Add error return values

parent 8850b049
...@@ -263,7 +263,11 @@ module elpa_api ...@@ -263,7 +263,11 @@ module elpa_api
import elpa_t import elpa_t
implicit none implicit none
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -280,7 +284,11 @@ module elpa_api ...@@ -280,7 +284,11 @@ module elpa_api
implicit none implicit none
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
character(*), intent(in) :: file_name character(*), intent(in) :: file_name
#ifdef USE_FORTRAN2008
integer, optional, intent(out):: error integer, optional, intent(out):: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -297,7 +305,11 @@ module elpa_api ...@@ -297,7 +305,11 @@ module elpa_api
implicit none implicit none
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
character(*), intent(in) :: file_name character(*), intent(in) :: file_name
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -339,7 +351,11 @@ module elpa_api ...@@ -339,7 +351,11 @@ module elpa_api
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
class(elpa_autotune_t), intent(inout), target :: tune_state class(elpa_autotune_t), intent(inout), target :: tune_state
logical :: unfinished logical :: unfinished
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end function end function
end interface end interface
...@@ -357,7 +373,12 @@ module elpa_api ...@@ -357,7 +373,12 @@ module elpa_api
implicit none implicit none
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
class(elpa_autotune_t), intent(in), target :: tune_state class(elpa_autotune_t), intent(in), target :: tune_state
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -375,7 +396,12 @@ module elpa_api ...@@ -375,7 +396,12 @@ module elpa_api
implicit none implicit none
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
class(elpa_autotune_t), intent(in), target :: tune_state class(elpa_autotune_t), intent(in), target :: tune_state
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -392,7 +418,11 @@ module elpa_api ...@@ -392,7 +418,11 @@ module elpa_api
implicit none implicit none
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
class(elpa_autotune_t), intent(in), target :: tune_state class(elpa_autotune_t), intent(in), target :: tune_state
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -411,7 +441,11 @@ module elpa_api ...@@ -411,7 +441,11 @@ module elpa_api
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
class(elpa_autotune_t), intent(in), target :: tune_state class(elpa_autotune_t), intent(in), target :: tune_state
character(*), intent(in) :: file_name character(*), intent(in) :: file_name
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
...@@ -430,7 +464,11 @@ module elpa_api ...@@ -430,7 +464,11 @@ module elpa_api
class(elpa_t), intent(inout) :: self class(elpa_t), intent(inout) :: self
class(elpa_autotune_t), intent(in), target :: tune_state class(elpa_autotune_t), intent(in), target :: tune_state
character(*), intent(in) :: file_name character(*), intent(in) :: file_name
#ifdef USE_FORTRAN2008
integer, optional, intent(out) :: error integer, optional, intent(out) :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
#endif #endif
...@@ -698,10 +736,16 @@ module elpa_api ...@@ -698,10 +736,16 @@ module elpa_api
!> Parameters !> Parameters
!> \param self class(elpa_autotune_t): the ELPA autotune object !> \param self class(elpa_autotune_t): the ELPA autotune object
abstract interface abstract interface
subroutine elpa_autotune_print_i(self) subroutine elpa_autotune_print_i(self, error)
import elpa_autotune_t import elpa_autotune_t
implicit none implicit none
class(elpa_autotune_t), intent(in) :: self class(elpa_autotune_t), intent(in) :: self
#ifdef USE_FORTRAN2008
integer, intent(out), optional :: error
#else
integer, intent(out) :: error
#endif
end subroutine end subroutine
end interface end interface
......
...@@ -23,9 +23,14 @@ module elpa_autotune_impl ...@@ -23,9 +23,14 @@ module elpa_autotune_impl
!> \brief function to print the autotuning !> \brief function to print the autotuning
!> Parameters !> Parameters
!> \param self class(elpa_autotune_impl_t) the allocated ELPA autotune object !> \param self class(elpa_autotune_impl_t) the allocated ELPA autotune object
subroutine elpa_autotune_print(self) subroutine elpa_autotune_print(self, error)
implicit none implicit none
class(elpa_autotune_impl_t), intent(in) :: self class(elpa_autotune_impl_t), intent(in) :: self
#ifdef USE_FORTRAN2008
integer, intent(out), optional :: error
#else
integer, intent(out) :: error
#endif
!print *, "Print me" !print *, "Print me"
end subroutine end subroutine
......
This diff is collapsed.
...@@ -219,7 +219,7 @@ int main(int argc, char** argv) { ...@@ -219,7 +219,7 @@ int main(int argc, char** argv) {
for (i=0; i < 20; i++) { for (i=0; i < 20; i++) {
unfinished = elpa_autotune_step_err(handle, autotune_handle, &error); unfinished = elpa_autotune_step(handle, autotune_handle, &error);
if (unfinished == 0) { if (unfinished == 0) {
if (myid == 0) { if (myid == 0) {
...@@ -269,7 +269,7 @@ int main(int argc, char** argv) { ...@@ -269,7 +269,7 @@ int main(int argc, char** argv) {
} }
} }
elpa_autotune_set_best_no_err(handle, autotune_handle); elpa_autotune_set_best(handle, autotune_handle, &error);
elpa_autotune_deallocate(autotune_handle); elpa_autotune_deallocate(autotune_handle);
elpa_deallocate(handle); elpa_deallocate(handle);
......
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