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
4423aa9a
Commit
4423aa9a
authored
Aug 05, 2017
by
Andreas Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Special case: matrix size 1
parent
d97f8400
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
58 deletions
+109
-58
src/elpa1/elpa1_template.F90
src/elpa1/elpa1_template.F90
+23
-1
src/elpa2/elpa2_template.F90
src/elpa2/elpa2_template.F90
+24
-1
src/elpa2/legacy_interface/elpa2_template.F90
src/elpa2/legacy_interface/elpa2_template.F90
+57
-55
test/shared/test_analytic.F90
test/shared/test_analytic.F90
+5
-1
No files found.
src/elpa1/elpa1_template.F90
View file @
4423aa9a
...
...
@@ -122,6 +122,7 @@ function elpa_solve_evp_&
&PRECISION&
&"
)
success
=
.true.
if
(
present
(
q
))
then
obj
%
eigenvalues_only
=
.false.
...
...
@@ -136,6 +137,28 @@ function elpa_solve_evp_&
nblk
=
obj
%
nblk
matrixCols
=
obj
%
local_ncols
! special case na = 1
if
(
na
.eq.
1
)
then
#if REALCASE == 1
ev
(
1
)
=
a
(
1
,
1
)
if
(
.not.
(
obj
%
eigenvalues_only
))
then
q
(
1
,
1
)
=
CONST_REAL_1_0
endif
#endif
#if COMPLEXCASE == 1
ev
(
1
)
=
real
(
a
(
1
,
1
))
if
(
.not.
(
obj
%
eigenvalues_only
))
then
q
(
1
,
1
)
=
CONST_COMPLEX_PAIR_1_0
endif
#endif
call
obj
%
timer
%
stop
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_1stage_&
&PRECISION&
&"
)
return
endif
if
(
nev
==
0
)
then
nev
=
1
obj
%
eigenvalues_only
=
.true.
...
...
@@ -167,7 +190,6 @@ function elpa_solve_evp_&
#endif
call
obj
%
timer
%
stop
(
"mpi_communication"
)
success
=
.true.
call
obj
%
get
(
"debug"
,
debug
)
wantDebug
=
debug
==
1
...
...
src/elpa2/elpa2_template.F90
View file @
4423aa9a
...
...
@@ -123,6 +123,8 @@
&PRECISION&
&"
)
success
=
.true.
if
(
present
(
q
))
then
obj
%
eigenvalues_only
=
.false.
else
...
...
@@ -136,6 +138,28 @@
nblk
=
obj
%
nblk
matrixCols
=
obj
%
local_ncols
! special case na = 1
if
(
na
.eq.
1
)
then
#if REALCASE == 1
ev
(
1
)
=
a
(
1
,
1
)
if
(
.not.
(
obj
%
eigenvalues_only
))
then
q
(
1
,
1
)
=
CONST_REAL_1_0
endif
#endif
#if COMPLEXCASE == 1
ev
(
1
)
=
real
(
a
(
1
,
1
))
if
(
.not.
(
obj
%
eigenvalues_only
))
then
q
(
1
,
1
)
=
CONST_COMPLEX_PAIR_1_0
endif
#endif
call
obj
%
timer
%
stop
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
)
return
endif
if
(
nev
==
0
)
then
nev
=
1
obj
%
eigenvalues_only
=
.true.
...
...
@@ -210,7 +234,6 @@
call
obj
%
get
(
"debug"
,
debug
)
wantDebug
=
debug
==
1
success
=
.true.
do_useGPU
=
.false.
do_useGPU_trans_ev_tridi
=
.false.
...
...
src/elpa2/legacy_interface/elpa2_template.F90
View file @
4423aa9a
...
...
@@ -204,61 +204,63 @@
return
endif
time_evp_fwd
=
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"bandred"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time bandred_real :'
,
time_evp_fwd
time_evp_fwd
=
time_evp_fwd
+
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"tridiag"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time tridiag_band_real :'
,
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"tridiag"
)
time_evp_solve
=
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"solve"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time solve_tridi :'
,
time_evp_solve
time_evp_back
=
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"trans_ev_to_band"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time trans_ev_tridi_to_band_real:'
,
time_evp_back
time_evp_back
=
time_evp_back
+
&
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"trans_ev_to_full"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time trans_ev_band_to_full_real :'
,
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"trans_ev_to_full"
)
if
(
na
.gt.
1
)
then
time_evp_fwd
=
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"bandred"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time bandred_real :'
,
time_evp_fwd
time_evp_fwd
=
time_evp_fwd
+
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"tridiag"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time tridiag_band_real :'
,
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"tridiag"
)
time_evp_solve
=
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"solve"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time solve_tridi :'
,
time_evp_solve
if
(
nev
.ge.
1
)
then
time_evp_back
=
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"trans_ev_to_band"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time trans_ev_tridi_to_band_real:'
,
time_evp_back
time_evp_back
=
time_evp_back
+
&
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"trans_ev_to_full"
)
if
(
my_prow
==
0
.and.
my_pcol
==
0
.and.
elpa_print_times
)
&
write
(
error_unit
,
*
)
'Time trans_ev_band_to_full_real :'
,
e
%
get_time
(
"elpa_solve_evp_&
&MATH_DATATYPE&
&_2stage_&
&PRECISION&
&"
,
"trans_ev_to_full"
)
endif
endif
! na > 1
call
elpa_deallocate
(
e
)
call
elpa_uninit
()
...
...
test/shared/test_analytic.F90
View file @
4423aa9a
...
...
@@ -238,7 +238,11 @@ module test_analytic
! go to zero-based indexing
ii
=
i
-
1
jj
=
j
-
1
a
=
exp
(
log
(
largest_ev
)/(
na
-1
))
if
(
na
.gt.
2
)
then
a
=
exp
(
log
(
largest_ev
)/(
na
-1
))
else
a
=
exp
(
log
(
largest_ev
)/(
1
))
endif
s
=
0.5_rk8
c
=
sqrt
(
3.0_rk8
)/
2.0_rk8
element
=
ONE
...
...
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