[petsc-users] Memory for matrix assembly

Matthew Knepley knepley at gmail.com
Tue Nov 22 16:59:12 CST 2011


On Tue, Nov 22, 2011 at 8:50 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Tue, Nov 22, 2011 at 08:30, Andrej Mesaros <andrej.mesaros at bc.edu>wrote:
>
>> Given that I indeed call MatSetValues exclusively with row indices within
>> the range determined by MatGetOwnershipRange, it should be impossible to
>> generate entries on the wrong process, right? In such a case, could the
>> corruption you mention be somehow due to the way I call other PETSc
>> functions? Or is it at all possible that too small preallocation is making
>> a problem?
>>
>
> Try setting these options and running in debug mode.
>
> MatSetOption(A,MAT_NO_OFF_PROC_ENTRIES,PETSC_TRUE);
> MatSetOption(A,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_TRUE);
>

I believe -info gives info on communicated entries after MatAssemble.

   Matt


>
>
>>
>> Also, what is the meaning of the memories in the report: "allocated",
>>
>
> obtained with PetscMalloc()
>
>
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Sys/PetscMallocGetCurrentUsage.html
>
>
>> "used by process"
>>
>
> resident set size returned by getrusage(), procfs, or similar
>
>
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Sys/PetscMemoryGetCurrentUsage.html
>
>
>> and "requested"?
>>
>
> Amount you are trying to allocate now.
>



-- 
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/20111122/487792bd/attachment.htm>


More information about the petsc-users mailing list