Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
elpa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
elpa
elpa
Commits
a092b731
Commit
a092b731
authored
Nov 20, 2018
by
Andreas Marek
Committed by
Pavel Kus
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return more expressive error codes
parent
4ffc2622
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
32 deletions
+36
-32
elpa/elpa_constants.h.in
elpa/elpa_constants.h.in
+6
-1
src/elpa_impl.F90
src/elpa_impl.F90
+29
-30
test/Fortran/test_multiple_objs.F90
test/Fortran/test_multiple_objs.F90
+1
-1
No files found.
elpa/elpa_constants.h.in
View file @
a092b731
...
...
@@ -93,7 +93,12 @@ enum ELPA_COMPLEX_KERNELS {
X(ELPA_ERROR_ENTRY_INVALID_VALUE, -3) \
X(ELPA_ERROR_ENTRY_ALREADY_SET, -4) \
X(ELPA_ERROR_ENTRY_NO_STRING_REPRESENTATION, -5) \
X(ELPA_ERROR_ENTRY_READONLY, -6)
X(ELPA_ERROR_SETUP, -6) \
X(ELPA_ERROR_CRITICAL, -7) \
X(ELPA_ERROR_API_VERSION, -8) \
X(ELPA_ERROR_AUTOTUNE_API_VERSION, -9) \
X(ELPA_ERROR_AUTOTUNE_OBJECT_CHANGED, -10) \
X(ELPA_ERROR_ENTRY_READONLY, -11)
enum ELPA_ERRORS {
ELPA_FOR_ALL_ERRORS(ELPA_ENUM_ENTRY)
...
...
src/elpa_impl.F90
View file @
a092b731
...
...
@@ -188,7 +188,7 @@ module elpa_impl
if
(
elpa_initialized
()
.ne.
ELPA_OK
)
then
write
(
error_unit
,
*
)
"elpa_allocate(): you must call elpa_init() once before creating instances of ELPA"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_SETUP
endif
return
endif
...
...
@@ -471,7 +471,6 @@ module elpa_impl
self
%
communicators_owned
=
0
error
=
ELPA_OK
call
self
%
get
(
"mpi_comm_rows"
,
mpi_comm_rows
,
error
)
if
(
error
.ne.
ELPA_OK
)
then
print
*
,
"Problem getting option. Aborting..."
...
...
@@ -950,10 +949,10 @@ module elpa_impl
write
(
error_unit
,
"(a,i0,a)"
)
"ELPA: Error API version: Autotuning does not support "
,
elpa_get_api_version
()
#ifdef USE_FORTRAN2008
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_API_VERSION
endif
#else
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_API_VERSION
#endif
return
endif
...
...
@@ -1123,16 +1122,16 @@ module elpa_impl
type
is
(
elpa_autotune_impl_t
)
ts_impl
=>
tune_state
class
default
print
*
,
"This should not happen
"
write
(
error_unit
,
*
)
"This should not happen! Critical error
"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_CRITICAL
endif
end
select
if
(
elpa_index_set_autotune_parameters_c
(
self
%
index
,
ts_impl
%
level
,
ts_impl
%
domain
,
ts_impl
%
min_loc
)
/
=
1
)
then
print
*
,
"This should not happen (in elpa_autotune_set_best())"
write
(
error_unit
,
*
)
"This should not happen (in elpa_autotune_set_best())"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_OBJECT_CHANGED
endif
endif
end
subroutine
...
...
@@ -1161,19 +1160,19 @@ module elpa_impl
type
is
(
elpa_autotune_impl_t
)
ts_impl
=>
tune_state
class
default
print
*
,
"This should not happen
"
write
(
error_unit
,
*
)
"This should not happen! Critical error
"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_CRITICAL
endif
end
select
print
*
,
"The following settings were found to be best:"
print
*
,
"Best, i = "
,
ts_impl
%
min_loc
,
"best time = "
,
ts_impl
%
min_val
!
print *, "The following settings were found to be best:"
!
print *, "Best, i = ", ts_impl%min_loc, "best time = ", ts_impl%min_val
flush
(
output_unit
)
if
(
elpa_index_print_autotune_parameters_c
(
self
%
index
,
ts_impl
%
level
,
ts_impl
%
domain
)
/
=
1
)
then
print
*
,
"This should not happen (in elpa_autotune_print_best())"
write
(
error_unit
,
*
)
"This should not happen (in elpa_autotune_print_best())"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_OBJECT_CHANGED
endif
endif
end
subroutine
...
...
@@ -1195,7 +1194,7 @@ module elpa_impl
error
=
ELPA_OK
endif
if
(
elpa_index_print_settings_c
(
self
%
index
,
c_null_char
)
/
=
1
)
then
print
*
,
"This should not happen (in elpa_print_settings())"
write
(
error_unit
,
*
)
"This should not happen (in elpa_print_settings())"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
endif
...
...
@@ -1239,7 +1238,7 @@ module elpa_impl
error
=
ELPA_OK
endif
if
(
elpa_index_print_settings_c
(
self
%
index
,
file_name
//
c_null_char
)
/
=
1
)
then
print
*
,
"This should not happen (in elpa_store_settings())"
write
(
error_unit
,
*
)
"This should not happen (in elpa_store_settings())"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
endif
...
...
@@ -1285,7 +1284,7 @@ module elpa_impl
error
=
ELPA_OK
endif
if
(
elpa_index_load_settings_c
(
self
%
index
,
file_name
//
c_null_char
)
/
=
1
)
then
print
*
,
"This should not happen (in elpa_load_settings())"
write
(
error_unit
,
*
)
"This should not happen (in elpa_load_settings())"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
endif
...
...
@@ -1335,17 +1334,17 @@ module elpa_impl
type
is
(
elpa_autotune_impl_t
)
ts_impl
=>
tune_state
class
default
print
*
,
"This should not happen
"
write
(
error_unit
,
*
)
"This should not happen! Critical erro
"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_CRITICAL
endif
end
select
if
(
elpa_index_print_autotune_state_c
(
self
%
index
,
ts_impl
%
level
,
ts_impl
%
domain
,
ts_impl
%
min_loc
,
&
ts_impl
%
min_val
,
ts_impl
%
current
,
ts_impl
%
cardinality
,
c_null_char
)
/
=
1
)
then
print
*
,
"This should not happen (in elpa_autotune_print_state())"
write
(
error_unit
,
*
)
"This should not happen (in elpa_autotune_print_state())"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_OBJECT_CHANGED
endif
endif
end
subroutine
...
...
@@ -1399,17 +1398,17 @@ module elpa_impl
type
is
(
elpa_autotune_impl_t
)
ts_impl
=>
tune_state
class
default
print
*
,
"This should not happen
"
write
(
error_unit
,
*
)
"This should not happen! Critical error
"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_CRITICAL
endif
end
select
if
(
elpa_index_print_autotune_state_c
(
self
%
index
,
ts_impl
%
level
,
ts_impl
%
domain
,
ts_impl
%
min_loc
,
&
ts_impl
%
min_val
,
ts_impl
%
current
,
ts_impl
%
cardinality
,
file_name
//
c_null_char
)
/
=
1
)
then
print
*
,
"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
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_OBJECT_CHANGED
endif
endif
end
subroutine
...
...
@@ -1468,9 +1467,9 @@ module elpa_impl
type
is
(
elpa_autotune_impl_t
)
ts_impl
=>
tune_state
class
default
print
*
,
"This should not happen
"
write
(
error_unit
,
*
)
"This should not happen! Critical error
"
if
(
present
(
error
))
then
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_CRITICAL
endif
end
select
...
...
@@ -1478,12 +1477,12 @@ module elpa_impl
if
(
elpa_index_load_autotune_state_c
(
self
%
index
,
ts_impl
%
level
,
ts_impl
%
domain
,
ts_impl
%
min_loc
,
&
ts_impl
%
min_val
,
ts_impl
%
current
,
ts_impl
%
cardinality
,
file_name
//
c_null_char
)
/
=
1
)
then
!print *,
"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
error
=
ELPA_ERROR
error
=
ELPA_ERROR
_AUTOTUNE_OBJECT_CHANGED
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
end
subroutine
...
...
test/Fortran/test_multiple_objs.F90
View file @
a092b731
...
...
@@ -206,7 +206,7 @@ program test
e_ptr
=>
e2
tune_state
=>
e_ptr
%
autotune_setup
(
ELPA_AUTOTUNE_
MEDIUM
,
AUTOTUNE_DOMAIN
,
error
)
tune_state
=>
e_ptr
%
autotune_setup
(
ELPA_AUTOTUNE_
FAST
,
AUTOTUNE_DOMAIN
,
error
)
assert_elpa_ok
(
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment