From b724a52be9a82fa1f9b52f0f1a063c8e8ceec010 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Wed, 13 Mar 2024 14:43:19 -0400 Subject: [PATCH] POTRF: Add -P and -Q argument Signed-off-by: Joseph Schuchart --- examples/potrf/testing_dpotrf.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/potrf/testing_dpotrf.cc b/examples/potrf/testing_dpotrf.cc index 6b80bb68c..2a5f6dacb 100644 --- a/examples/potrf/testing_dpotrf.cc +++ b/examples/potrf/testing_dpotrf.cc @@ -76,6 +76,14 @@ int main(int argc, char **argv) int P = std::sqrt(world.size()); int Q = (world.size() + P - 1)/P; + if ( (opt = getCmdOption(argv+1, argv + argc, "-P")) != nullptr) { + P = atoi(opt); + } + if ( (opt = getCmdOption(argv+1, argv + argc, "-Q")) != nullptr) { + Q = atoi(opt); + } + + if(check && (P>1 || Q>1)) { std::cerr << "Check is disabled for distributed runs at this time" << std::endl; check = false; @@ -83,7 +91,9 @@ int main(int argc, char **argv) static_assert(ttg::has_split_metadata>::value); - std::cout << "Creating 2D block cyclic matrix with NB " << NB << " N " << N << " M " << M << " P " << P << std::endl; + if (world.rank() == 0) { + std::cout << "Creating 2D block cyclic matrix with NB " << NB << " N " << N << " M " << M << " P " << P << " Q " << Q << std::endl; + } parsec_matrix_sym_block_cyclic_t dcA; parsec_matrix_sym_block_cyclic_init(&dcA, parsec_matrix_type_t::PARSEC_MATRIX_DOUBLE, @@ -126,7 +136,6 @@ int main(int argc, char **argv) auto connected = make_graph_executable(init_tt.get()); assert(connected); TTGUNUSED(connected); - std::cout << "Graph is connected: " << connected << std::endl; if (world.rank() == 0) { std::cout << "==== begin dot ====\n";