Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
fb3219c6
Commit
fb3219c6
authored
May 18, 2017
by
Andreas Marek
Browse files
Cleanup of ELPA cholesky_impl signatures
parent
9c0e4b12
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/elpa1/elpa1_auxiliary.F90
View file @
fb3219c6
...
...
@@ -92,8 +92,7 @@ module elpa1_auxiliary_impl
#define DOUBLE_PRECISION
#include "../general/precision_macros.h"
function
elpa_cholesky_real_double_impl
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
&
wantDebug
)
result
(
success
)
function
elpa_cholesky_real_double_impl
(
obj
,
a
)
result
(
success
)
#include "elpa_cholesky_template.X90"
end
function
elpa_cholesky_real_double_impl
...
...
@@ -105,8 +104,7 @@ module elpa1_auxiliary_impl
#define SINGLE_PRECISION
#include "../general/precision_macros.h"
function
elpa_cholesky_real_single_impl
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
&
wantDebug
)
result
(
success
)
function
elpa_cholesky_real_single_impl
(
obj
,
a
)
result
(
success
)
#include "elpa_cholesky_template.X90"
end
function
elpa_cholesky_real_single_impl
...
...
@@ -187,8 +185,7 @@ module elpa1_auxiliary_impl
!> \param mpi_comm_cols MPI communicator for columns
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function
elpa_cholesky_complex_double_impl
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
&
wantDebug
)
result
(
success
)
function
elpa_cholesky_complex_double_impl
(
obj
,
a
)
result
(
success
)
#include "elpa_cholesky_template.X90"
...
...
@@ -216,8 +213,7 @@ module elpa1_auxiliary_impl
!> \param mpi_comm_cols MPI communicator for columns
!> \param wantDebug logical, more debug information on failure
!> \result succes logical, reports success or failure
function
elpa_cholesky_complex_single_impl
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
&
wantDebug
)
result
(
success
)
function
elpa_cholesky_complex_single_impl
(
obj
,
a
)
result
(
success
)
#include "elpa_cholesky_template.X90"
...
...
@@ -285,8 +281,8 @@ module elpa1_auxiliary_impl
#define REALCASE 1
#define DOUBLE_PRECISION
#include "../general/precision_macros.h"
function
elpa_mult_at_b_real_double_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
nblk
,
&
mpi_comm_rows
,
mpi_comm_cols
,
c
,
ldc
,
ldcCols
)
result
(
success
)
function
elpa_mult_at_b_real_double_impl
(
obj
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
result
(
success
)
#include "elpa_multiply_a_b.X90"
end
function
elpa_mult_at_b_real_double_impl
#undef DOUBLE_PRECISION
...
...
@@ -329,8 +325,8 @@ module elpa1_auxiliary_impl
!> \param ldc leading dimension of matrix c
!> \result success
function
elpa_mult_at_b_real_single_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
nblk
,
&
mpi_comm_rows
,
mpi_comm_cols
,
c
,
ldc
,
ldcCols
)
result
(
success
)
function
elpa_mult_at_b_real_single_impl
(
obj
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
result
(
success
)
#include "elpa_multiply_a_b.X90"
...
...
@@ -378,8 +374,8 @@ module elpa1_auxiliary_impl
!> \param ldc leading dimension of matrix c
!> \result success
function
elpa_mult_ah_b_complex_double_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
nblk
,
&
mpi_comm_rows
,
mpi_comm_cols
,
c
,
ldc
,
ldcCols
)
result
(
success
)
function
elpa_mult_ah_b_complex_double_impl
(
obj
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
result
(
success
)
#include "elpa_multiply_a_b.X90"
end
function
elpa_mult_ah_b_complex_double_impl
...
...
@@ -425,8 +421,8 @@ module elpa1_auxiliary_impl
!> \param ldc leading dimension of matrix c
!> \result success
function
elpa_mult_ah_b_complex_single_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
nblk
,
&
mpi_comm_rows
,
mpi_comm_cols
,
c
,
ldc
,
ldcCols
)
result
(
success
)
function
elpa_mult_ah_b_complex_single_impl
(
obj
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
result
(
success
)
#include "elpa_multiply_a_b.X90"
...
...
src/elpa1/elpa_cholesky_template.X90
View file @
fb3219c6
...
...
@@ -52,21 +52,23 @@
use timings_dummy
#endif
use precision
use elpa_api
implicit none
class(elpa_t), intent(in) :: obj
integer(kind=ik) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
#if REALCASE == 1
#ifdef USE_ASSUMED_SIZE
real(kind=REAL_DATATYPE) :: a(
lda
,*)
real(kind=REAL_DATATYPE) :: a(
obj%local_nrows
,*)
#else
real(kind=REAL_DATATYPE) :: a(
lda,matrixC
ols)
real(kind=REAL_DATATYPE) :: a(
obj%local_nrows,obj%local_nc
ols)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef USE_ASSUMED_SIZE
complex(kind=COMPLEX_DATATYPE) :: a(
lda
,*)
complex(kind=COMPLEX_DATATYPE) :: a(
obj%local_nrows
,*)
#else
complex(kind=COMPLEX_DATATYPE) :: a(
lda,matrixC
ols)
complex(kind=COMPLEX_DATATYPE) :: a(
obj%local_nrows,obj%local_nc
ols)
#endif
#endif
integer(kind=ik) :: my_prow, my_pcol, np_rows, np_cols, mpierr
...
...
@@ -81,9 +83,9 @@
#if COMPLEXCASE == 1
complex(kind=COMPLEX_DATATYPE), allocatable :: tmp1(:), tmp2(:,:), tmatr(:,:), tmatc(:,:)
#endif
logical
, intent(in)
:: wantDebug
logical
:: wantDebug
logical :: success
integer(kind=ik) :: istat
integer(kind=ik) :: istat
, debug
character(200) :: errorMessage
call timer%start("elpa_cholesky_&
...
...
@@ -92,6 +94,20 @@
&PRECISION&
&")
na = obj%na
lda = obj%local_nrows
nblk = obj%nblk
matrixCols = obj%local_ncols
mpi_comm_rows = obj%get("mpi_comm_rows")
mpi_comm_cols = obj%get("mpi_comm_cols")
if (obj%get("wantDebug") == 1) then
wantDebug = .true.
else
wantDebug = .false.
endif
call timer%start("mpi_communication")
call mpi_comm_rank(mpi_comm_rows,my_prow,mpierr)
call mpi_comm_size(mpi_comm_rows,np_rows,mpierr)
...
...
src/elpa1/elpa_multiply_a_b.X90
View file @
fb3219c6
...
...
@@ -63,12 +63,15 @@
use elpa1_compute
use elpa_mpi
use precision
use elpa_api
implicit none
class(elpa_t), intent(in) :: obj
character*1 :: uplo_a, uplo_c
integer(kind=ik), intent(in) :: na, lda, ldaCols, ldb, ldbCols, ldc, ldcCols
, nblk
integer(kind=ik) :: ncb
, mpi_comm_rows, mpi_comm_cols
integer(kind=ik), intent(in) :: na, lda, ldaCols, ldb, ldbCols, ldc, ldcCols
integer(kind=ik) :: ncb
#if REALCASE == 1
#ifdef USE_ASSUMED_SIZE
real(kind=REAL_DATATYPE) :: a(lda,*), b(ldb,*), c(ldc,*)
...
...
@@ -100,6 +103,7 @@
integer(kind=ik) :: istat
character(200) :: errorMessage
logical :: success
integer(kind=ik) :: nblk, mpi_comm_rows, mpi_comm_cols
call timer%start("elpa_mult_at_b_&
&MATH_DATATYPE&
...
...
@@ -107,6 +111,10 @@
&PRECISION&
&")
nblk = obj%nblk
mpi_comm_rows = obj%get("mpi_comm_rows")
mpi_comm_cols = obj%get("mpi_comm_cols")
success = .true.
call timer%start("mpi_communication")
...
...
src/elpa_impl.F90
View file @
fb3219c6
...
...
@@ -515,8 +515,8 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
success_l
=
elpa_mult_at_b_real_double_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
self
%
nblk
,
&
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
c
,
ldc
,
ldcCols
)
success_l
=
elpa_mult_at_b_real_double_impl
(
self
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
if
(
present
(
error
))
then
if
(
success_l
)
then
error
=
ELPA_OK
...
...
@@ -545,8 +545,8 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
#ifdef WANT_SINGLE_PRECISION_REAL
success_l
=
elpa_mult_at_b_real_single_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
self
%
nblk
,
&
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
c
,
ldc
,
ldcCols
)
success_l
=
elpa_mult_at_b_real_single_impl
(
self
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
if
(
present
(
error
))
then
if
(
success_l
)
then
error
=
ELPA_OK
...
...
@@ -579,8 +579,8 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
success_l
=
elpa_mult_ah_b_complex_double_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
self
%
nblk
,
&
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
c
,
ldc
,
ldcCols
)
success_l
=
elpa_mult_ah_b_complex_double_impl
(
self
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
if
(
present
(
error
))
then
if
(
success_l
)
then
error
=
ELPA_OK
...
...
@@ -610,8 +610,8 @@ module elpa_impl
logical
::
success_l
#ifdef WANT_SINGLE_PRECISION_COMPLEX
success_l
=
elpa_mult_ah_b_complex_single_impl
(
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
self
%
nblk
,
&
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
c
,
ldc
,
ldcCols
)
success_l
=
elpa_mult_ah_b_complex_single_impl
(
self
,
uplo_a
,
uplo_c
,
na
,
ncb
,
a
,
lda
,
ldaCols
,
b
,
ldb
,
ldbCols
,
&
c
,
ldc
,
ldcCols
)
if
(
present
(
error
))
then
if
(
success_l
)
then
error
=
ELPA_OK
...
...
@@ -620,7 +620,7 @@ module elpa_impl
endif
else
if
(
.not.
success_l
)
then
write
(
error_unit
,
'(a)'
)
"ELPA: Error in multiply_a_b() and you did not check for errors!"
endif
endif
#else
print
*
,
"This installation of the ELPA library has not been build with single-precision support"
error
=
ELPA_ERROR
...
...
@@ -641,23 +641,8 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
integer
(
kind
=
c_int
)
::
error_actual
logical
::
wantDebugIntern
if
(
self
%
get
(
"wantDebug"
,
error_actual
)
.eq.
1
)
then
if
(
error_actual
.ne.
ELPA_OK
)
then
print
*
,
"Could not querry wantDebug"
stop
endif
wantDebugIntern
=
.true.
else
wantDebugIntern
=
.false.
endif
success_l
=
elpa_cholesky_real_double_impl
(
self
%
na
,
a
,
self
%
local_nrows
,
self
%
nblk
,
&
self
%
local_ncols
,
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
&
wantDebugIntern
)
success_l
=
elpa_cholesky_real_double_impl
(
self
,
a
)
if
(
present
(
error
))
then
if
(
success_l
)
then
error
=
ELPA_OK
...
...
@@ -683,23 +668,9 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
integer
(
kind
=
c_int
)
::
error_actual
logical
::
wantDebugIntern
if
(
self
%
get
(
"wantDebug"
,
error_actual
)
.eq.
1
)
then
if
(
error_actual
.ne.
ELPA_OK
)
then
print
*
,
"Could not querry wantDebug"
stop
endif
wantDebugIntern
=
.true.
else
wantDebugIntern
=
.false.
endif
#if WANT_SINGLE_PRECISION_REAL
success_l
=
elpa_cholesky_real_single_impl
(
self
%
na
,
a
,
self
%
local_nrows
,
self
%
nblk
,
&
self
%
local_ncols
,
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
&
wantDebugIntern
)
success_l
=
elpa_cholesky_real_single_impl
(
self
,
a
)
#else
print
*
,
"This installation of the ELPA library has not been build with single-precision support"
error
=
ELPA_ERROR
...
...
@@ -729,22 +700,8 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
integer
(
kind
=
c_int
)
::
error_actual
logical
::
wantDebugIntern
if
(
self
%
get
(
"wantDebug"
,
error_actual
)
.eq.
1
)
then
if
(
error_actual
.ne.
ELPA_OK
)
then
print
*
,
"Could not querry wantDebug"
stop
endif
wantDebugIntern
=
.true.
else
wantDebugIntern
=
.false.
endif
success_l
=
elpa_cholesky_complex_double_impl
(
self
%
na
,
a
,
self
%
local_nrows
,
self
%
nblk
,
&
self
%
local_ncols
,
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
&
wantDebugIntern
)
success_l
=
elpa_cholesky_complex_double_impl
(
self
,
a
)
if
(
present
(
error
))
then
if
(
success_l
)
then
error
=
ELPA_OK
...
...
@@ -770,22 +727,9 @@ module elpa_impl
integer
,
optional
::
error
logical
::
success_l
integer
(
kind
=
c_int
)
::
error_actual
logical
::
wantDebugIntern
if
(
self
%
get
(
"wantDebug"
,
error_actual
)
.eq.
1
)
then
if
(
error_actual
.ne.
ELPA_OK
)
then
print
*
,
"Could not querry wantDebug"
stop
endif
wantDebugIntern
=
.true.
else
wantDebugIntern
=
.false.
endif
#if WANT_SINGLE_PRECISION_COMPLEX
success_l
=
elpa_cholesky_complex_single_impl
(
self
%
na
,
a
,
self
%
local_nrows
,
self
%
nblk
,
&
self
%
local_ncols
,
self
%
get
(
"mpi_comm_rows"
),
self
%
get
(
"mpi_comm_cols"
),
&
wantDebugIntern
)
success_l
=
elpa_cholesky_complex_single_impl
(
self
,
a
)
#else
print
*
,
"This installation of the ELPA library has not been build with single-precision support"
error
=
ELPA_ERROR
...
...
Write
Preview
Supports
Markdown
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