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
ea1580e5
Commit
ea1580e5
authored
Jul 07, 2017
by
Lorenz Huedepohl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add interface for timer_start/timer_stop to API
parent
7329e8f8
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
11 deletions
+73
-11
src/elpa_api.F90
src/elpa_api.F90
+24
-1
src/elpa_impl.F90
src/elpa_impl.F90
+24
-2
test/Fortran/test.F90
test/Fortran/test.F90
+25
-8
No files found.
src/elpa_api.F90
View file @
ea1580e5
...
...
@@ -98,6 +98,8 @@ module elpa_api
! 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
! Actual math routines
generic
,
public
::
eigenvectors
=>
&
!< method eigenvectors for solving the full eigenvalue problem
...
...
@@ -355,10 +357,31 @@ module elpa_api
!> \details
!> \param self class(elpa_t): the ELPA object
abstract
interface
subroutine
elpa_print_times_i
(
self
)
subroutine
elpa_print_times_i
(
self
,
name1
,
name2
,
name3
,
name4
)
import
elpa_t
implicit
none
class
(
elpa_t
),
intent
(
in
)
::
self
character
(
len
=*
),
intent
(
in
),
optional
::
name1
,
name2
,
name3
,
name4
end
subroutine
end
interface
abstract
interface
subroutine
elpa_timer_start_i
(
self
,
name
)
import
elpa_t
implicit
none
class
(
elpa_t
),
intent
(
inout
)
::
self
character
(
len
=*
),
intent
(
in
)
::
name
end
subroutine
end
interface
abstract
interface
subroutine
elpa_timer_stop_i
(
self
,
name
)
import
elpa_t
implicit
none
class
(
elpa_t
),
intent
(
inout
)
::
self
character
(
len
=*
),
intent
(
in
)
::
name
end
subroutine
end
interface
...
...
src/elpa_impl.F90
View file @
ea1580e5
...
...
@@ -77,6 +77,8 @@ module elpa_impl
! timer
procedure
,
public
::
get_time
=>
elpa_get_time
procedure
,
public
::
print_times
=>
elpa_print_times
procedure
,
public
::
timer_start
=>
elpa_timer_start
procedure
,
public
::
timer_stop
=>
elpa_timer_stop
!> \brief the private methods
...
...
@@ -444,13 +446,33 @@ module elpa_impl
end
function
subroutine
elpa_print_times
(
self
)
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
#ifdef HAVE_DETAILED_TIMINGS
call
self
%
timer
%
print
()
call
self
%
timer
%
print
(
name1
,
name2
,
name3
,
name4
)
#endif
end
subroutine
subroutine
elpa_timer_start
(
self
,
name
)
class
(
elpa_impl_t
),
intent
(
inout
)
::
self
character
(
len
=*
),
intent
(
in
)
::
name
#ifdef HAVE_DETAILED_TIMINGS
call
self
%
timer
%
start
(
name
)
#endif
end
subroutine
subroutine
elpa_timer_stop
(
self
,
name
)
class
(
elpa_impl_t
),
intent
(
inout
)
::
self
character
(
len
=*
),
intent
(
in
)
::
name
#ifdef HAVE_DETAILED_TIMINGS
call
self
%
timer
%
stop
(
name
)
#endif
end
subroutine
!> \brief elpa_eigenvectors_d: class method to solve the eigenvalue problem for double real matrices
!>
!> The dimensions of the matrix a (locally ditributed and global), the block-cyclic distribution
...
...
test/Fortran/test.F90
View file @
ea1580e5
...
...
@@ -138,8 +138,9 @@ program test
type
(
output_t
)
::
write_to_file
class
(
elpa_t
),
pointer
::
e
#ifdef TEST_ALL_KERNELS
integer
::
i
,
kernel
integer
::
i
#endif
integer
::
kernel
call
read_input_parameters_traditional
(
na
,
nev
,
nblk
,
write_to_file
)
call
setup_mpi
(
myid
,
nprocs
)
...
...
@@ -210,28 +211,44 @@ program test
#ifdef TEST_ALL_KERNELS
do
i
=
0
,
elpa_option_cardinality
(
KERNEL_KEY
)
kernel
=
elpa_option_enumerate
(
KERNEL_KEY
,
i
)
#endif /* TEST_ALL_KERNELS */
#endif
#ifdef TEST_KERNEL
call
e
%
set
(
KERNEL_KEY
,
TEST_KERNEL
,
error
)
assert_elpa_ok
(
error
)
kernel
=
TEST_KERNEL
#endif
#ifdef TEST_ALL_KERNELS
#ifdef TEST_SOLVER_2STAGE
call
e
%
set
(
KERNEL_KEY
,
kernel
,
error
)
#ifdef TEST_KERNEL
assert_elpa_ok
(
error
)
#else
if
(
error
/
=
ELPA_OK
)
then
cycle
endif
#endif
if
(
myid
==
0
)
print
*
,
elpa_int_value_to_string
(
KERNEL_KEY
,
kernel
),
" kernel"
call
e
%
timer_start
(
elpa_int_value_to_string
(
KERNEL_KEY
,
kernel
))
#else
call
e
%
timer_start
(
"e%eigenvectors()"
)
#endif
! The actual solve step
call
e
%
eigenvectors
(
a
,
ev
,
z
,
error
)
assert_elpa_ok
(
error
)
#ifdef TEST_SOLVER_2STAGE
call
e
%
timer_stop
(
elpa_int_value_to_string
(
KERNEL_KEY
,
kernel
))
#else
call
e
%
timer_stop
(
"e%eigenvectors()"
)
#endif
if
(
myid
.eq.
0
)
then
call
e
%
print_times
()
#ifdef TEST_SOLVER_2STAGE
call
e
%
print_times
(
elpa_int_value_to_string
(
KERNEL_KEY
,
kernel
))
#else
call
e
%
print_times
(
"e%eigenvectors()"
)
#endif
endif
status
=
check_correctness
(
na
,
nev
,
as
,
z
,
ev
,
sc_desc
,
myid
)
if
(
status
/
=
0
)
then
print
*
,
"Result incorrect!"
...
...
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