[petsc-users] Matrix stored on many machines, filled by one process

Barry Smith bsmith at mcs.anl.gov
Wed May 18 18:32:42 CDT 2011


On May 18, 2011, at 4:05 PM, Matthew Knepley wrote:

> On Wed, May 18, 2011 at 3:54 PM, Bartłomiej W <bartlomiej.wach at yahoo.pl> wrote:
> Hello again,
> 
> I am wondering if it is possibile to have a matrix be stored across several machines but have only one process to set its values? Can I just create the matrix and then simply setownership range for process 0 to full size of the matrix and zero for others?
> 
> You can create a parallel matrix, and then only set values from 1 process. Its not efficient, but it will work.

   For big problems it will be terribly slow, so slow as to be idiotic.

    Note in our users manual introduction we specifically say 

PETSc should not be used to attempt to provide a “parallel linear solver” in an otherwise sequential
code. Certainly all parts of a previously sequential code need not be parallelized but the matrix
generation portion must be to expect any kind of reasonable performance. Do not expect to generate
your matrix sequentially and then “use PETSc” to solve the linear system in parallel.


> 
>    Matt
>  
> Thank You for an answer.
> 
> 
> 
> -- 
> 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



More information about the petsc-users mailing list