[petsc-users] Doubts regarding MatGetSubMatrices
Łukasz Kasza
rpgwars at wp.pl
Mon Mar 27 16:21:26 CDT 2017
Dear PETSC users,
Lets say that I want to use MatGetSubMatrices(Mat mat,PetscInt n,const IS irow[],const IS icol[],MatReuse scall,Mat *submat[]) and I want to get every column of the specified rows. However initially I dont know which column indexes to pass in icol, I just know that I need everything.
My question is, how to implement this efficiently in parallel aij format? I could for instance pass a range of indexes from 0 to the size of the matrix, but my concern is that this way the communication cost will increase for large matrices as the request will be sent for all columns for every row in irow. Other solution would be to exchange between the processes info regarding indexes of nonzero columns and then call MatGetSubmatrices with indexes in icol only of nonzero columns.
Any help much appreciated,
Best Regards
More information about the petsc-users
mailing list