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

Add error return values

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