[petsc-users] Values of PETSC_DECIDE

Massoud Rezavand msdrezavand at gmail.com
Sat Dec 3 12:36:36 CST 2016


Thanks Matt,

the local "m" and "n" are calculated based on the number of processors,
right?

how about for the case where m and n are not equal for all processors (like
the example presented in MatMPIAIJSetPreallocation)? how can I find the
local m and n for each processor?

I need the m and n for each processor to calculate the entries for d_nnz
and o_nnz and then preallocate the matrix.

Best
Massoud



On Sat, Dec 3, 2016 at 6:37 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Sat, Dec 3, 2016 at 11:33 AM, Massoud Rezavand <msdrezavand at gmail.com>
> wrote:
>
>> Dear PETSc team,
>>
>> Supposing to have a dynamic Mat and Vec, if I let PETSc to decide the
>> number of local rows and local columns, i.e
>>
>> MatSetSizes(A, PETSC_DECIDE, PETSC_DECISDE, M, N)
>>
>> How can I get these numbers from PETSc?
>>
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/
> VecGetLocalSize.html
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/
> MatGetLocalSize.html#MatGetLocalSize
>
>    Matt
>
>
>> Thanks,
>> Massoud
>>
>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161203/032f75b1/attachment.html>


More information about the petsc-users mailing list