[petsc-dev] preallocation checks

Barry Smith bsmith at mcs.anl.gov
Wed Jan 11 22:10:03 CST 2012


On Jan 11, 2012, at 9:55 PM, Jed Brown wrote:

> Sure users can turn off the allocation error if they intended to allocate approximately.
> 
> Only concern is if allocation is only wrong in the extreme case of a huge job.

    That is not a concern, better to stop early with a useful message than take tons of extra time on a huge job and make PETSc look extra bad at huge problems.

    Barry

> 
> On Jan 11, 2012 10:52 PM, "Barry Smith" <bsmith at mcs.anl.gov> wrote:
> 
>    If the user calls an memory allocation routine should we tell them IN THEIR FACE if they did not allocate enough?
> 
> 1)    For example, automatically set the error on allocation option?   or
> 
> 2)    Have a new option that results in an ugly warning mess to the screeen?
> 
>     We get lots of emails where people may have allocated wrong and we then tell them, one at a time, to set the flag,
> 
>     Barry
> 
> 
> Begin forwarded message:
> 
>> From: Jed Brown <jedbrown at mcs.anl.gov>
>> Date: January 11, 2012 8:32:57 AM CST
>> To: PETSc users list <petsc-users at mcs.anl.gov>
>> Subject: Re: [petsc-users] lying about nullspaces
>> Reply-To: PETSc users list <petsc-users at mcs.anl.gov>
>> 
>> On Wed, Jan 11, 2012 at 09:16, Matthew Knepley <knepley at gmail.com> wrote:
>> MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_TRUE);
>> 
>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html
>> 
>> If MatSetFromOptions() is called, these options can be used
>> 
>> -mat_new_nonzero_allocation_err
>> -mat_new_nonzero_location_err
> 




More information about the petsc-dev mailing list