[petsc-users] Irregular Matrix Partitioning problem

Barry Smith bsmith at mcs.anl.gov
Wed Jun 11 13:20:43 CDT 2014


  Just give the full size matrix and vectors to KSP as usual and use 

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCREDISTRIBUTE.html

  note that a matrix of 1000 rows is not large enough for parallelism. Generally you need at least 10,000 rows per process for good parallel performance.

  Barry


On Jun 11, 2014, at 11:44 AM, Brian Yang <jyang29 at uh.edu> wrote:

> Hi all,
> 
> To solve a linear system, Ax=b, I am trying to solve a irregular matrix partitioning problem.
> 
> For example, I want to create a parallel sparse matrix A, which is a square and 1000*1000.
> 
> Due to the requirements of the problem, for the first and last 100 rows, I just want to put 1.0 in the main diagonal.
> 
> For the middle 800 rows, I will set other values around the main diagonal. So what I want to do is that first and last computing node take care of the first and last 100 rows and other nodes distribute the work in between.
> 
> Is there any specific way to achieve this considering it's a parallel matrix? If yes, should I also be care of the method to create the related parallel vector?
> 
> Thanks.
> 
> Brian



More information about the petsc-users mailing list