Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
b07e1d56
Commit
b07e1d56
authored
Oct 25, 2017
by
Pavel Kus
Browse files
print also times of creation of matrices and correctness check
in Fortran test.F90
parent
e42583f3
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/Fortran/test.F90
View file @
b07e1d56
...
...
@@ -229,7 +229,7 @@ program test
call
mpi_finalize
(
mpierr
)
#endif
stop
77
#endif
#endif
/* TEST_GPU */
if
(
nblk
.lt.
64
)
then
if
(
myid
.eq.
0
)
then
print
*
,
"At the moment QR decomposition need blocksize of at least 64"
...
...
@@ -243,7 +243,7 @@ program test
#endif
stop
77
endif
#endif
#endif
/* TEST_QR_DECOMPOSITION */
call
set_up_blacsgrid
(
mpi_comm_world
,
np_rows
,
np_cols
,
layout
,
&
my_blacs_ctxt
,
my_prow
,
my_pcol
)
...
...
@@ -251,6 +251,50 @@ program test
call
set_up_blacs_descriptor
(
na
,
nblk
,
my_prow
,
my_pcol
,
np_rows
,
np_cols
,
&
na_rows
,
na_cols
,
sc_desc
,
my_blacs_ctxt
,
info
)
e
=>
elpa_allocate
()
call
e
%
set
(
"na"
,
na
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"nev"
,
nev
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"local_nrows"
,
na_rows
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"local_ncols"
,
na_cols
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"nblk"
,
nblk
,
error
)
assert_elpa_ok
(
error
)
#ifdef WITH_MPI
call
e
%
set
(
"mpi_comm_parent"
,
MPI_COMM_WORLD
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"process_row"
,
my_prow
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"process_col"
,
my_pcol
,
error
)
assert_elpa_ok
(
error
)
#endif
call
e
%
set
(
"timings"
,
1
)
assert_elpa_ok
(
e
%
setup
())
#ifdef TEST_SOLVER_1STAGE
call
e
%
set
(
"solver"
,
ELPA_SOLVER_1STAGE
)
#else
call
e
%
set
(
"solver"
,
ELPA_SOLVER_2STAGE
)
#endif
assert_elpa_ok
(
error
)
call
e
%
set
(
"gpu"
,
TEST_GPU
,
error
)
assert_elpa_ok
(
error
)
#ifdef TEST_QR_DECOMPOSITION
call
e
%
set
(
"qr"
,
1
,
error
)
assert_elpa_ok
(
error
)
#endif
if
(
myid
==
0
)
print
*
,
""
! allocate matrices
allocate
(
a
(
na_rows
,
na_cols
))
allocate
(
as
(
na_rows
,
na_cols
))
allocate
(
z
(
na_rows
,
na_cols
))
...
...
@@ -267,6 +311,8 @@ program test
allocate
(
ev_analytic
(
na
))
#endif
! prepare matrices
call
e
%
timer_start
(
"e%prepare_matrices()"
)
a
(:,:)
=
0.0
z
(:,:)
=
0.0
ev
(:)
=
0.0
...
...
@@ -309,53 +355,15 @@ program test
call
prepare_matrix_toeplitz
(
na
,
diagonalElement
,
subdiagonalElement
,
&
d
,
sd
,
ds
,
sds
,
a
,
as
,
nblk
,
np_rows
,
&
np_cols
,
my_prow
,
my_pcol
)
#endif /* TEST_CHOLESKY */
call
e
%
timer_stop
(
"e%prepare_matrices()"
)
if
(
myid
==
0
)
then
print
*
,
""
call
e
%
print_times
(
"e%prepare_matrices()"
)
print
*
,
""
endif
e
=>
elpa_allocate
()
call
e
%
set
(
"na"
,
na
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"nev"
,
nev
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"local_nrows"
,
na_rows
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"local_ncols"
,
na_cols
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"nblk"
,
nblk
,
error
)
assert_elpa_ok
(
error
)
#ifdef WITH_MPI
call
e
%
set
(
"mpi_comm_parent"
,
MPI_COMM_WORLD
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"process_row"
,
my_prow
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"process_col"
,
my_pcol
,
error
)
assert_elpa_ok
(
error
)
#endif
call
e
%
set
(
"timings"
,
1
)
assert_elpa_ok
(
e
%
setup
())
#ifdef TEST_SOLVER_1STAGE
call
e
%
set
(
"solver"
,
ELPA_SOLVER_1STAGE
)
#else
call
e
%
set
(
"solver"
,
ELPA_SOLVER_2STAGE
)
#endif
assert_elpa_ok
(
error
)
call
e
%
set
(
"gpu"
,
TEST_GPU
,
error
)
assert_elpa_ok
(
error
)
#ifdef TEST_QR_DECOMPOSITION
call
e
%
set
(
"qr"
,
1
,
error
)
assert_elpa_ok
(
error
)
#endif
if
(
myid
==
0
)
print
*
,
""
! solve the problem
#ifdef TEST_ALL_KERNELS
do
i
=
0
,
elpa_option_cardinality
(
KERNEL_KEY
)
! kernels
kernel
=
elpa_option_enumerate
(
KERNEL_KEY
,
i
)
...
...
@@ -452,6 +460,8 @@ program test
#endif /* TEST_ALL_KERNELS */
endif
! check the results
call
e
%
timer_start
(
"e%check_correctness()"
)
#if defined(TEST_EIGENVECTORS) || defined(TEST_QR_DECOMPOSITION)
#ifdef TEST_MATRIX_ANALYTIC
status
=
check_correctness_analytic
(
na
,
nev
,
ev
,
z
,
nblk
,
myid
,
np_rows
,
np_cols
,
my_prow
,
my_pcol
,
check_all_evals
)
...
...
@@ -494,6 +504,7 @@ program test
status
=
check_correctness_hermitian_multiply
(
na
,
a
,
b
,
c
,
na_rows
,
sc_desc
,
myid
)
call
check_status
(
status
,
myid
)
#endif
call
e
%
timer_stop
(
"e%check_correctness()"
)
if
(
myid
==
0
)
then
print
*
,
""
...
...
@@ -508,6 +519,12 @@ program test
end
do
! kernels
#endif
if
(
myid
==
0
)
then
print
*
,
""
call
e
%
print_times
(
"e%check_correctness()"
)
print
*
,
""
endif
call
elpa_deallocate
(
e
)
deallocate
(
a
)
...
...
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