Skip to content

Commit

Permalink
updated scatter on cov and front
Browse files Browse the repository at this point in the history
  • Loading branch information
yotamyaniv committed Mar 27, 2024
1 parent 6f991d5 commit 92010fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 10 additions & 1 deletion examples/dense/testCovarianceMPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,16 @@ MPI_Init(&argc, &argv);
MPI_Bcast(&m, 1, strumpack::mpi_type<int>(), 0, MPI_COMM_WORLD);

A = strumpack::DistributedMatrix<double>(&grid, m, m);
A.scatter(Aseq);
// A.scatter(Aseq);
std::size_t B = 10000;
for (std::size_t r=0; r<m; r+=B) {
auto nr = std::min(B, m-r);
strumpack::DenseMatrixWrapper<double> Ar(nr, m, Aseq, r, 0);
strumpack::copy(nr, m, Ar, 0, A, r, 0, grid.ctxt_all());
}

std::cout << "# scatter success" << std::endl;
Aseq.clear();


strumpack::HSS::HSSOptions<double> hss_opts;
Expand Down
9 changes: 8 additions & 1 deletion examples/dense/testFrontMPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ MPI_Init(&argc, &argv);
MPI_Bcast(&m, 1, strumpack::mpi_type<int>(), 0, MPI_COMM_WORLD);

A = strumpack::DistributedMatrix<double>(&grid, m, m);
A.scatter(Aseq);
// A.scatter(Aseq);
std::size_t B = 10000;
for (std::size_t r=0; r<m; r+=B) {
auto nr = std::min(B, m-r);
strumpack::DenseMatrixWrapper<double> Ar(nr, m, Aseq, r, 0);
strumpack::copy(nr, m, Ar, 0, A, r, 0, grid.ctxt_all());
}

std::cout << "# scatter success" << std::endl;
Aseq.clear();

Expand Down

0 comments on commit 92010fb

Please sign in to comment.