[petsc-users] number of rows distribution for matrix from MatLoad

Xiangdong epscodes at gmail.com
Mon Sep 24 15:39:14 CDT 2018


Hello everyone,

I have a quick question on MatLoad. When I use MatLoad to read a binary
matrix into AIJ format, how can I specify the distributions of rows? In
particular, I want the rows distributed on each processor to be even.

More specific, Let's say I have a binary matrix A with 50 rows. I want to
read this binary file on np=2. By default, each processor will have 25
rows. If I want the rows on each processor to be even (eg., 26 row on rank
0, and 24 rows on rank 1), how can I achieve this? For this specific
matrix, I can do it by specifying m in MatSetSizes. However, for a general
matrix A, I do not know the number of rows before calling MatLoad, how can
I specify the distribution of the matrix?

Thank you.

Best,
Xiangdong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180924/b2e799b0/attachment.html>


More information about the petsc-users mailing list