Skip to content
GitLab
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
d74c3668
Commit
d74c3668
authored
Nov 09, 2018
by
Pavel Kus
Committed by
Pavel Kus
Nov 15, 2018
Browse files
adding 1 test where row and col communicators are created by the caller
and supplied to the elpa object by set methods
parent
42dd0b07
Changes
2
Hide whitespace changes
Inline
Side-by-side
generate_automake_test_programs.py
View file @
d74c3668
...
...
@@ -53,15 +53,21 @@ layout_flag = {
"square"
:
""
}
for
lang
,
m
,
g
,
q
,
t
,
p
,
d
,
s
,
lay
in
product
(
sorted
(
language_flag
.
keys
()),
sorted
(
matrix_flag
.
keys
()),
sorted
(
gpu_flag
.
keys
()),
sorted
(
qr_flag
.
keys
()),
sorted
(
test_type_flag
.
keys
()),
sorted
(
prec_flag
.
keys
()),
sorted
(
domain_flag
.
keys
()),
sorted
(
solver_flag
.
keys
()),
sorted
(
layout_flag
.
keys
())):
split_comm_flag
=
{
"myself"
:
"-DSPLIT_COMM_MYSELF"
,
"by_elpa"
:
""
}
for
lang
,
m
,
g
,
q
,
t
,
p
,
d
,
s
,
lay
,
spl
in
product
(
sorted
(
language_flag
.
keys
()),
sorted
(
matrix_flag
.
keys
()),
sorted
(
gpu_flag
.
keys
()),
sorted
(
qr_flag
.
keys
()),
sorted
(
test_type_flag
.
keys
()),
sorted
(
prec_flag
.
keys
()),
sorted
(
domain_flag
.
keys
()),
sorted
(
solver_flag
.
keys
()),
sorted
(
layout_flag
.
keys
()),
sorted
(
split_comm_flag
.
keys
())):
if
lang
==
"C"
and
(
m
==
"analytic"
or
m
==
"toeplitz"
or
m
==
"frank"
or
lay
==
"all_layouts"
):
continue
...
...
@@ -117,10 +123,18 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()),
if
(
q
==
1
and
(
s
!=
"2stage"
or
d
!=
"real"
or
t
!=
"eigenvectors"
or
g
==
1
or
m
!=
"random"
)):
continue
# one test with split communicator myself should be enough
if
(
spl
==
"myself"
and
(
s
!=
"1stage"
or
d
!=
"real"
or
p
!=
"double"
or
g
==
1
or
m
!=
"random"
or
t
!=
"eigenvectors"
or
lang
!=
"Fortran"
or
lay
!=
"square"
)):
continue
for
kernel
in
[
"all_kernels"
,
"default_kernel"
]
if
s
==
"2stage"
else
[
"nokernel"
]:
endifs
=
0
extra_flags
=
[]
if
(
spl
==
"myself"
):
print
(
"if WITH_MPI"
)
endifs
+=
1
if
(
t
==
"eigenvalues"
and
kernel
==
"all_kernels"
):
continue
...
...
@@ -151,6 +165,9 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()),
if
layout_flag
[
lay
]:
extra_flags
.
append
(
layout_flag
[
lay
])
if
split_comm_flag
[
spl
]:
extra_flags
.
append
(
split_comm_flag
[
spl
])
if
(
p
==
"single"
):
if
(
d
==
"real"
):
print
(
"if WANT_SINGLE_PRECISION_REAL"
)
...
...
@@ -160,14 +177,15 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()),
raise
Exception
(
"Oh no!"
)
endifs
+=
1
name
=
"test{langsuffix}_{d}_{p}_{t}_{s}{kernelsuffix}_{gpusuffix}{qrsuffix}{m}{layoutsuffix}"
.
format
(
name
=
"test{langsuffix}_{d}_{p}_{t}_{s}{kernelsuffix}_{gpusuffix}{qrsuffix}{m}{layoutsuffix}
{spl}
"
.
format
(
langsuffix
=
language_flag
[
lang
],
d
=
d
,
p
=
p
,
t
=
t
,
s
=
s
,
kernelsuffix
=
""
if
kernel
==
"nokernel"
else
"_"
+
kernel
,
gpusuffix
=
"gpu_"
if
g
else
""
,
qrsuffix
=
"qr_"
if
q
else
""
,
m
=
m
,
layoutsuffix
=
"_all_layouts"
if
lay
==
"all_layouts"
else
""
)
layoutsuffix
=
"_all_layouts"
if
lay
==
"all_layouts"
else
""
,
spl
=
"_split_comm_myself"
if
spl
==
"myself"
else
""
)
print
(
"if BUILD_KCOMPUTER"
)
print
(
"bin_PROGRAMS += "
+
name
)
...
...
test/Fortran/test.F90
View file @
d74c3668
...
...
@@ -183,6 +183,11 @@ program test
integer
::
max_threads
#endif
#ifdef SPLIT_COMM_MYSELF
integer
::
mpi_comm_rows
,
mpi_comm_cols
,
mpi_string_length
,
mpierr2
character
(
len
=
MPI_MAX_ERROR_STRING
)
::
mpierr_string
#endif
call
read_input_parameters_traditional
(
na
,
nev
,
nblk
,
write_to_file
,
skip_check_correctness
)
call
setup_mpi
(
myid
,
nprocs
)
#ifdef HAVE_REDIRECT
...
...
@@ -541,6 +546,26 @@ program test
assert_elpa_ok
(
error
)
#ifdef WITH_MPI
#ifdef SPLIT_COMM_MYSELF
call
mpi_comm_split
(
MPI_COMM_WORLD
,
my_pcol
,
my_prow
,
mpi_comm_rows
,
mpierr
)
if
(
mpierr
.ne.
MPI_SUCCESS
)
then
call
MPI_ERROR_STRING
(
mpierr
,
mpierr_string
,
mpi_string_length
,
mpierr2
)
write
(
error_unit
,
*
)
"MPI ERROR occured during mpi_comm_split for row communicator: "
,
trim
(
mpierr_string
)
stop
1
endif
call
mpi_comm_split
(
MPI_COMM_WORLD
,
my_prow
,
my_pcol
,
mpi_comm_cols
,
mpierr
)
if
(
mpierr
.ne.
MPI_SUCCESS
)
then
call
MPI_ERROR_STRING
(
mpierr
,
mpierr_string
,
mpi_string_length
,
mpierr2
)
write
(
error_unit
,
*
)
"MPI ERROR occured during mpi_comm_split for col communicator: "
,
trim
(
mpierr_string
)
stop
1
endif
call
e
%
set
(
"mpi_comm_rows"
,
mpi_comm_rows
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"mpi_comm_cols"
,
mpi_comm_cols
,
error
)
assert_elpa_ok
(
error
)
#else
call
e
%
set
(
"mpi_comm_parent"
,
MPI_COMM_WORLD
,
error
)
assert_elpa_ok
(
error
)
call
e
%
set
(
"process_row"
,
my_prow
,
error
)
...
...
@@ -548,6 +573,7 @@ program test
call
e
%
set
(
"process_col"
,
my_pcol
,
error
)
assert_elpa_ok
(
error
)
#endif
#endif
#ifdef TEST_GENERALIZED_EIGENPROBLEM
call
e
%
set
(
"blacs_context"
,
my_blacs_ctxt
,
error
)
assert_elpa_ok
(
error
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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