Thanks, 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? If so, since A is not partitioned, is A visible in every process? or other steps i should do? 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? Thanks, Likun On Wed, August 31, 2011 4:07 am, Matthew Knepley wrote: > On Wed, Aug 31, 2011 at 2:17 AM, Likun Tan <likunt at andrew.cmu.edu> wrote: > > >> >> Thank you very much. So i should create the transpose matrix as >> MPIDense >> and partition it corresponding? That is, if the matrix is partitioned >> into 3 parts by row, then the transpose matrix will be partitioned into >> 3 parts >> by column? >> > > 1 part per process. > > > >> I have two more questions: >> 1. I define a DA with PETSC_COMM_SELF, where is the array stored? Could >> i use this array in every process? >> > > It does not store anything, but with PETSC_COMM_SELF, the array will not > be partitioned. > > >> 2. I vaguely remember that matrix can only be partitioned by row, is >> that true? >> > > Sparse matrices are generally partitioned by row. This is how the AIJ > classes work, and also our dense classes to mirror it. > > Matt > > > >> best, Likun >> >> >> >> On Tue, August 30, 2011 10:07 pm, Matthew Knepley wrote: >> >>> On Wed, Aug 31, 2011 at 12:48 AM, Likun Tan <likunt at andrew.cmu.edu> >>> wrote: >>> >>> >>> >>>> >>>> I have MPIDense matrix, if i want to get the tranpose of the >>>> matrix, what should i do? Or i should use MPISparse instead? >>> >>> >>> If it is rectangular, create the transpose matrix first, then call >>> MatTranspose. >>> >>> >>> >>> Matt >>> >>> >>> >>> >>>> On Tue, August 30, 2011 7:08 pm, Matthew Knepley wrote: >>>> >>>> >>>>> On Tue, Aug 30, 2011 at 10:59 PM, Likun Tan >>>>> <likunt at andrew.cmu.edu> >>>>> wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> >>>>>> Dear all, >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Can MatTranspose be used on non-squra matrix? I have a matrix >>>>>> with size 200*27, and i want to get the tranpose of it. >>>>>> >>>>>> >>>>>> >>>>> >>>>> I assume you are talking about dense matrices. If so, yes. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Second question is, if the 200*27 is partitioned by row, how is >>>>>> the tranpose stored in each processor? Is it stored by column? >>>>>> >>>>> >>>>> For MPIDENSE, you cannot in-place transpose unless it is square. >>>>> Otherwise, >>>>> you provide the transpose matrix, so you determine the layout. >>>>> >>>>> Matt >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Thanks, >>>>>> Likun >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> 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 >>> >>> >> >> >> >> >> > > > -- > 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 > >
