[petsc-users] about MatTranspose

Jed Brown jedbrown at mcs.anl.gov
Wed Aug 31 09:50:37 CDT 2011


On Wed, Aug 31, 2011 at 09:41, Likun Tan <likunt at andrew.cmu.edu> wrote:

> so what I want to do is using MatMatSolve() to solve Ax=B, where A is a
> 27*27 dense matrix, B is a 27*4000 dense matrix.
>
> 1. For efficiency, i want to generate the matrix B in parallel. Since it
> cannot be partitioned by row, i generated a 4000*27 matrix and try to get
> the transpose of it. Should i use MatCreateTranspose()?
>
> 2. Does MatMatSolve() solve Ax=B in parallel?
>

Depends whether A is parallel, but you don't want it to anyway.


> If so, since A is not
> partitioned, is A visible in every process? or other steps i should do?
>

You should redundantly create A and redundantly create parts of B. That is,
every process will have

A : 27x27 dense matrix on COMM_SELF.
B : 27x(4000/np) dense matrix on COMM_SELF.

np is the number of processes in COMM_WORLD


> 3. I have a 3D array (with PETSC_COMM_SELF) that will be used to generate
> all the elements of matrix B, how could I make it available in every
> process?
>

Where did it come from? (How did you get this array in the first place?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110831/eadca5ca/attachment.htm>


More information about the petsc-users mailing list