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
e31aef46
Commit
e31aef46
authored
Apr 29, 2017
by
Andreas Marek
Committed by
Lorenz Huedepohl
May 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update legacy API to new interface [ci skip]
parent
c3941607
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
43 deletions
+69
-43
src/elpa1/legacy_interface/elpa1_template_legacy.X90
src/elpa1/legacy_interface/elpa1_template_legacy.X90
+24
-13
src/elpa1/legacy_interface/elpa_cholesky_template_legacy.X90
src/elpa1/legacy_interface/elpa_cholesky_template_legacy.X90
+1
-2
src/elpa1/legacy_interface/elpa_invert_trm_legacy.X90
src/elpa1/legacy_interface/elpa_invert_trm_legacy.X90
+1
-2
src/elpa1/legacy_interface/elpa_multiply_a_b_legacy.X90
src/elpa1/legacy_interface/elpa_multiply_a_b_legacy.X90
+1
-1
src/elpa1/legacy_interface/elpa_solve_tridi_legacy.X90
src/elpa1/legacy_interface/elpa_solve_tridi_legacy.X90
+15
-8
src/elpa2/legacy_interface/elpa2_template_legacy.X90
src/elpa2/legacy_interface/elpa2_template_legacy.X90
+27
-17
No files found.
src/elpa1/legacy_interface/elpa1_template_legacy.X90
View file @
e31aef46
...
...
@@ -103,7 +103,7 @@ function elpa_solve_evp_&
integer(kind=c_int) :: successInternal
type(elpa_t) :: e
lpa1stage
type(elpa_t) :: e
call timer%start("elpa_solve_evp_&
&MATH_DATATYPE&
&_1stage_&
...
...
@@ -120,15 +120,26 @@ function elpa_solve_evp_&
return
endif
elpa1stage = elpa_create(na, nev, lda, matrixCols, nblk, mpi_comm_all, &
my_prow, my_pcol, successInternal)
e = elpa_allocate()
call e%set("na", na)
call e%set("local_nrows", lda)
call e%set("local_ncols", matrixCols)
call e%set("nblk", nblk)
call e%set("mpi_comm_parent", mpi_comm_all)
call e%set("process_row", my_prow)
call e%set("process_col", my_pcol)
call e%setup(successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot
create elpa object
"
print *, "Cannot
setup ELPA instance
"
success = .false.
return
endif
call e
lpa1stage
%set("solver", ELPA_SOLVER_1STAGE, successInternal)
call e%set("solver", ELPA_SOLVER_1STAGE, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set ELPA 1stage solver"
success = .false.
...
...
@@ -137,14 +148,14 @@ function elpa_solve_evp_&
if (present(useGPU)) then
if (useGPU) then
call e
lpa1stage
%set("gpu", 1, successInternal)
call e%set("gpu", 1, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set gpu"
success = .false.
return
endif
else
call e
lpa1stage
%set("gpu", 0, successInternal)
call e%set("gpu", 0, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set gpu"
success = .false.
...
...
@@ -154,7 +165,7 @@ function elpa_solve_evp_&
endif
if (elpa_print_times) then
call e
lpa1stage
%set("summary_timings", 1,successInternal)
call e%set("summary_timings", 1,successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set summary_timings"
success = .false.
...
...
@@ -162,7 +173,7 @@ function elpa_solve_evp_&
endif
endif
call e
lpa1stage
%solve(a(1:lda,1:matrixCols), ev, q(1:ldq,1:matrixCols), successInternal)
call e%solve(a(1:lda,1:matrixCols), ev, q(1:ldq,1:matrixCols), successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot solve with ELPA 1stage"
success = .false.
...
...
@@ -170,11 +181,11 @@ function elpa_solve_evp_&
endif
if (elpa_print_times) then
time_evp_fwd =
elpa1stage%time_evp_fwd
time_evp_solve = e
lpa1stage%time_evp_solve
time_evp_back =
elpa1stage%time_evp_back
time_evp_fwd =
e%get("time_evp_fwd")
time_evp_solve = e
%get("time_evp_solve")
time_evp_back =
e%get("time_evp_back")
endif
call e
lpa1stage
%destroy()
call e%destroy()
call elpa_uninit()
...
...
src/elpa1/legacy_interface/elpa_cholesky_template_legacy.X90
View file @
e31aef46
...
...
@@ -119,13 +119,12 @@
call e%setup(successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot
create elpa object
"
print *, "Cannot
setup ELPA instance
"
success = .false.
stop
return
endif
call e%cholesky(a(1:lda,1:matrixCols), successInternal)
if (successInternal .ne. ELPA_OK) then
...
...
src/elpa1/legacy_interface/elpa_invert_trm_legacy.X90
View file @
e31aef46
...
...
@@ -127,13 +127,12 @@
call e%setup(successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot
create elpa object
"
print *, "Cannot
setup ELPA instance
"
success = .false.
stop
return
endif
call e%invert_tridiagonal(a(1:lda,1:matrixCols), successInternal)
if (successInternal .ne. ELPA_OK) then
...
...
src/elpa1/legacy_interface/elpa_multiply_a_b_legacy.X90
View file @
e31aef46
...
...
@@ -139,7 +139,7 @@
call e%setup(successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot
run multiply_a_b
"
print *, "Cannot
setup ELPA instance
"
stop
success = .false.
return
...
...
src/elpa1/legacy_interface/elpa_solve_tridi_legacy.X90
View file @
e31aef46
...
...
@@ -79,7 +79,7 @@
logical, intent(in) :: wantDebug
logical :: success
integer(kind=iK) :: successInternal
type(elpa_t) :: e
lpaAPI
type(elpa_t) :: e
call timer%start("elpa_solve_tridi_&
&PRECISION&
...
...
@@ -94,18 +94,25 @@
return
endif
elpaAPI = elpa_create(na, nev, ldq, matrixCols, nblk, successInternal)
e = elpa_allocate()
call e%set("na", na)
call e%set("local_nrows", lda)
call e%set("local_ncols", matrixCols)
call e%set("nblk", nblk)
call e%set("mpi_comm_rows", mpi_comm_rows)
call e%set("mpi_comm_cols", mpi_comm_cols)
call e%setup(successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot
create elpa object
"
print *, "Cannot
setup ELPA instance
"
success = .false.
stop
return
endif
call elpaAPI%set_comm_rows(mpi_comm_rows)
call elpaAPI%set_comm_cols(mpi_comm_cols)
call elpaAPI%solve_tridi(d(1:na), e(1:na), q(1:ldq,1:matrixCols), successInternal)
call e%solve_tridi(d(1:na), e(1:na), q(1:ldq,1:matrixCols), successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot run solve_tridi"
...
...
@@ -115,7 +122,7 @@
else
success =.true.
endif
call e
lpaAPI
%destroy()
call e%destroy()
call elpa_uninit()
...
...
src/elpa2/legacy_interface/elpa2_template_legacy.X90
View file @
e31aef46
...
...
@@ -95,7 +95,7 @@
logical :: success
integer(kind=c_int) :: successInternal
type(elpa_t) :: e
lpa2stage
type(elpa_t) :: e
call timer%start("solve_evp_&
&MATH_DATATYPE&
...
...
@@ -113,16 +113,26 @@
return
endif
elpa2stage = elpa_create(na, nev, lda, matrixCols, nblk, mpi_comm_all, &
my_prow, my_pcol, successInternal)
e = elpa_allocate()
call e%set("na", na)
call e%set("local_nrows", lda)
call e%set("local_ncols", matrixCols)
call e%set("nblk", nblk)
call e%set("mpi_comm_parent", mpi_comm_all)
call e%set("process_row", my_prow)
call e%set("process_col", my_pcol)
call e%setup(successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot
create elpa object
"
print *, "Cannot
setup ELPA instance
"
success = .false.
return
endif
call e
lpa2stage
%set("solver", ELPA_SOLVER_2STAGE, successInternal)
call e%set("solver", ELPA_SOLVER_2STAGE, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set ELPA 1stage solver"
success = .false.
...
...
@@ -131,14 +141,14 @@
if (present(useGPU)) then
if (useGPU) then
call e
lpa2stage
%set("gpu", 1, successInternal)
call e%set("gpu", 1, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set gpu"
success = .false.
return
endif
else
call e
lpa2stage
%set("gpu", 0, successInternal)
call e%set("gpu", 0, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set gpu"
success = .false.
...
...
@@ -150,14 +160,14 @@
#if REALCASE == 1
if (present(useQR)) then
if (useQR) then
call e
lpa2stage
%set("qr", 1, successInternal)
call e%set("qr", 1, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set qr"
success = .false.
return
endif
else
call e
lpa2stage
%set("qr", 0, successInternal)
call e%set("qr", 0, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set qr"
success = .false.
...
...
@@ -169,7 +179,7 @@
#if REALCASE == 1
if (present(THIS_ELPA_KERNEL_API)) then
call e
lpa2stage
%set("real_kernel",THIS_ELPA_KERNEL_API, successInternal)
call e%set("real_kernel",THIS_ELPA_KERNEL_API, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set ELPA2 stage real_kernel"
success = .false.
...
...
@@ -180,7 +190,7 @@
#if COMPLEXCASE == 1
if (present(THIS_ELPA_KERNEL_API)) then
call e
lpa2stage
%set("complex_kernel",THIS_ELPA_KERNEL_API, successInternal)
call e%set("complex_kernel",THIS_ELPA_KERNEL_API, successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set ELPA2 stage complex_kernel"
success = .false.
...
...
@@ -190,7 +200,7 @@
#endif
if (elpa_print_times) then
call e
lpa2stage
%set("summary_timings", 1,successInternal)
call e%set("summary_timings", 1,successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot set summary_timings"
success = .false.
...
...
@@ -198,7 +208,7 @@
endif
endif
call e
lpa2stage
%solve(a(1:lda,1:matrixCols), ev, q(1:ldq,1:matrixCols), successInternal)
call e%solve(a(1:lda,1:matrixCols), ev, q(1:ldq,1:matrixCols), successInternal)
if (successInternal .ne. ELPA_OK) then
print *, "Cannot solve with ELPA 2stage"
success = .false.
...
...
@@ -206,12 +216,12 @@
endif
if (elpa_print_times) then
time_evp_fwd
= elpa2stage%time_evp_fwd
time_evp_solve = e
lpa2stage%time_evp_solve
time_evp_back
= elpa2stage%time_evp_back
time_evp_fwd
= e%get("time_evp_fwd")
time_evp_solve = e
%get("time_evp_solve")
time_evp_back
= e%get("time_evp_back")
endif
call e
lpa2stage
%destroy()
call e%destroy()
call elpa_uninit()
...
...
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