Commit 9734ed1f authored by Pavel Kus's avatar Pavel Kus Committed by Andreas Marek

adding error code for problems loading/saving state or autotuning state

parent 73d926be
...@@ -98,7 +98,8 @@ enum ELPA_COMPLEX_KERNELS { ...@@ -98,7 +98,8 @@ enum ELPA_COMPLEX_KERNELS {
X(ELPA_ERROR_API_VERSION, -8) \ X(ELPA_ERROR_API_VERSION, -8) \
X(ELPA_ERROR_AUTOTUNE_API_VERSION, -9) \ X(ELPA_ERROR_AUTOTUNE_API_VERSION, -9) \
X(ELPA_ERROR_AUTOTUNE_OBJECT_CHANGED, -10) \ X(ELPA_ERROR_AUTOTUNE_OBJECT_CHANGED, -10) \
X(ELPA_ERROR_ENTRY_READONLY, -11) X(ELPA_ERROR_ENTRY_READONLY, -11) \
X(ELPA_ERROR_CANNOT_OPEN_FILE, -12)
enum ELPA_ERRORS { enum ELPA_ERRORS {
ELPA_FOR_ALL_ERRORS(ELPA_ENUM_ENTRY) ELPA_FOR_ALL_ERRORS(ELPA_ENUM_ENTRY)
......
...@@ -1254,7 +1254,7 @@ module elpa_impl ...@@ -1254,7 +1254,7 @@ module elpa_impl
if (elpa_index_print_settings_c(self%index, file_name // c_null_char) /= 1) then if (elpa_index_print_settings_c(self%index, file_name // c_null_char) /= 1) then
write(error_unit, *) "This should not happen (in elpa_store_settings())" write(error_unit, *) "This should not happen (in elpa_store_settings())"
if (present(error)) then if (present(error)) then
error = ELPA_ERROR error = ELPA_ERROR_CANNOT_OPEN_FILE
endif endif
endif endif
...@@ -1300,7 +1300,7 @@ module elpa_impl ...@@ -1300,7 +1300,7 @@ module elpa_impl
if (elpa_index_load_settings_c(self%index, file_name // c_null_char) /= 1) then if (elpa_index_load_settings_c(self%index, file_name // c_null_char) /= 1) then
write(error_unit, *) "This should not happen (in elpa_load_settings())" write(error_unit, *) "This should not happen (in elpa_load_settings())"
if (present(error)) then if (present(error)) then
error = ELPA_ERROR error = ELPA_ERROR_CANNOT_OPEN_FILE
endif endif
endif endif
end subroutine end subroutine
...@@ -1422,7 +1422,7 @@ module elpa_impl ...@@ -1422,7 +1422,7 @@ module elpa_impl
ts_impl%min_val, ts_impl%current, ts_impl%cardinality, file_name // c_null_char) /= 1) then ts_impl%min_val, ts_impl%current, ts_impl%cardinality, file_name // c_null_char) /= 1) then
write(error_unit, *) "This should not happen (in elpa_autotune_save_state())" write(error_unit, *) "This should not happen (in elpa_autotune_save_state())"
if (present(error)) then if (present(error)) then
error = ELPA_ERROR_AUTOTUNE_OBJECT_CHANGED error = ELPA_ERROR_CANNOT_OPEN_FILE
endif endif
endif endif
end subroutine end subroutine
...@@ -1493,7 +1493,7 @@ module elpa_impl ...@@ -1493,7 +1493,7 @@ module elpa_impl
ts_impl%min_val, ts_impl%current, ts_impl%cardinality, file_name // c_null_char) /= 1) then ts_impl%min_val, ts_impl%current, ts_impl%cardinality, file_name // c_null_char) /= 1) then
write(error_unit, *) "This should not happen (in elpa_autotune_load_state())" write(error_unit, *) "This should not happen (in elpa_autotune_load_state())"
if (present(error)) then if (present(error)) then
error = ELPA_ERROR_AUTOTUNE_OBJECT_CHANGED error = ELPA_ERROR_CANNOT_OPEN_FILE
endif endif
endif endif
!print *, "testing, after C call, ts_impl%current is ", ts_impl%current !print *, "testing, after C call, ts_impl%current is ", ts_impl%current
......
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