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

Matthew Knepley knepley at gmail.com
Mon Sep 24 15:50:00 CDT 2018


On Mon, Sep 24, 2018 at 4:41 PM Xiangdong <epscodes at gmail.com> wrote:

> 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.
>

The idea is that you pass a new Mat in that you have called MatSetSizes()
on.

  Thanks,

    Matt


> 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
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180924/573296aa/attachment.html>


More information about the petsc-users mailing list