Commit d74c3668 authored by Pavel Kus's avatar Pavel Kus Committed by Pavel Kus

adding 1 test where row and col communicators are created by the caller

and supplied to the elpa object by set methods
parent 42dd0b07
...@@ -53,15 +53,21 @@ layout_flag = { ...@@ -53,15 +53,21 @@ layout_flag = {
"square": "" "square": ""
} }
for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()), split_comm_flag = {
sorted(matrix_flag.keys()), "myself": "-DSPLIT_COMM_MYSELF",
sorted(gpu_flag.keys()), "by_elpa": ""
sorted(qr_flag.keys()), }
sorted(test_type_flag.keys()),
sorted(prec_flag.keys()), for lang, m, g, q, t, p, d, s, lay, spl in product(sorted(language_flag.keys()),
sorted(domain_flag.keys()), sorted(matrix_flag.keys()),
sorted(solver_flag.keys()), sorted(gpu_flag.keys()),
sorted(layout_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"): if lang == "C" and (m == "analytic" or m == "toeplitz" or m == "frank" or lay == "all_layouts"):
continue continue
...@@ -117,10 +123,18 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()), ...@@ -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")): if (q == 1 and (s != "2stage" or d != "real" or t != "eigenvectors" or g == 1 or m != "random")):
continue 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"]: for kernel in ["all_kernels", "default_kernel"] if s == "2stage" else ["nokernel"]:
endifs = 0 endifs = 0
extra_flags = [] extra_flags = []
if(spl == "myself"):
print("if WITH_MPI")
endifs += 1
if (t == "eigenvalues" and kernel == "all_kernels"): if (t == "eigenvalues" and kernel == "all_kernels"):
continue continue
...@@ -151,6 +165,9 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()), ...@@ -151,6 +165,9 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()),
if layout_flag[lay]: if layout_flag[lay]:
extra_flags.append(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 (p == "single"):
if (d == "real"): if (d == "real"):
print("if WANT_SINGLE_PRECISION_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()), ...@@ -160,14 +177,15 @@ for lang, m, g, q, t, p, d, s, lay in product(sorted(language_flag.keys()),
raise Exception("Oh no!") raise Exception("Oh no!")
endifs += 1 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], langsuffix=language_flag[lang],
d=d, p=p, t=t, s=s, d=d, p=p, t=t, s=s,
kernelsuffix="" if kernel == "nokernel" else "_" + kernel, kernelsuffix="" if kernel == "nokernel" else "_" + kernel,
gpusuffix="gpu_" if g else "", gpusuffix="gpu_" if g else "",
qrsuffix="qr_" if q else "", qrsuffix="qr_" if q else "",
m=m, 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("if BUILD_KCOMPUTER")
print("bin_PROGRAMS += " + name) print("bin_PROGRAMS += " + name)
......
...@@ -183,6 +183,11 @@ program test ...@@ -183,6 +183,11 @@ program test
integer :: max_threads integer :: max_threads
#endif #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 read_input_parameters_traditional(na, nev, nblk, write_to_file, skip_check_correctness)
call setup_mpi(myid, nprocs) call setup_mpi(myid, nprocs)
#ifdef HAVE_REDIRECT #ifdef HAVE_REDIRECT
...@@ -541,6 +546,26 @@ program test ...@@ -541,6 +546,26 @@ program test
assert_elpa_ok(error) assert_elpa_ok(error)
#ifdef WITH_MPI #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) call e%set("mpi_comm_parent", MPI_COMM_WORLD, error)
assert_elpa_ok(error) assert_elpa_ok(error)
call e%set("process_row", my_prow, error) call e%set("process_row", my_prow, error)
...@@ -548,6 +573,7 @@ program test ...@@ -548,6 +573,7 @@ program test
call e%set("process_col", my_pcol, error) call e%set("process_col", my_pcol, error)
assert_elpa_ok(error) assert_elpa_ok(error)
#endif #endif
#endif
#ifdef TEST_GENERALIZED_EIGENPROBLEM #ifdef TEST_GENERALIZED_EIGENPROBLEM
call e%set("blacs_context", my_blacs_ctxt, error) call e%set("blacs_context", my_blacs_ctxt, error)
assert_elpa_ok(error) assert_elpa_ok(error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment