Gathering distributed dense matrix only on rank 0
Hei, is there a way to gather a distributed dense matrix only on rank 0, not on the other ranks? My matrix processing/storage routines in my program currently are single-threaded and only operate on rank 0, and therefore I assume that I can ignore all other ranks. This should also save a bit time, I hope (MatCreateRedundantMatrix is currently the by far most expensive part of my program). When executing MatCreateRedundantMatrix(A, size, MPI_COMM_NULL, MAT_INITIAL_MATRIX, &B), usually all ranks get the full matrices, something I would like to avoid. Therefore, is there another way of handling this? Thanks! Regards, Roland Richter
On Mon, Jan 25, 2021 at 4:40 AM Roland Richter <[email protected]> wrote:
Hei,
is there a way to gather a distributed dense matrix only on rank 0, not on the other ranks? My matrix processing/storage routines in my program currently are single-threaded and only operate on rank 0, and therefore I assume that I can ignore all other ranks. This should also save a bit time, I hope (MatCreateRedundantMatrix is currently the by far most expensive part of my program).
When executing MatCreateRedundantMatrix(A, size, MPI_COMM_NULL, MAT_INITIAL_MATRIX, &B), usually all ranks get the full matrices, something I would like to avoid. Therefore, is there another way of handling this?
I am skeptical that it will save time, but you can do what you want using https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateSu... Thanks, Matt
Thanks!
Regards,
Roland Richter
-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
participants (2)
-
Matthew Knepley -
Roland Richter