[petsc-users] Equivalent of all_reduce for sparse matrices
marco restelli
mrestelli at gmail.com
Thu May 8 11:25:11 CDT 2014
Hi,
I have a Cartesian communicator and some matrices distributed along
the "x" direction. I would like to compute an all_reduce operation for
these matrices in the y direction, and I wander whether there is a
PETSc function for this.
More precisely:
a matrix A is distributed among processors 0 , 1 , 2
another A is distributed among processors 3 , 4 , 5
another A is distributed among processors 6 , 7 , 8
...
The x direction is 0,1,2; while the y direction is 0,3,6,...
I would like to compute a matrix B = "sum of the matrices A" and a
copy of B should be distributed among processors 0,1,2, another copy
among 3,4,5 and so on.
A way of doing this is getting the matrix coefficients, broadcasting
them along the y direction and summing them in the matrix B; maybe
however there is already a PETSc function doing this.
Thank you, regards
Marco
More information about the petsc-users
mailing list