[petsc-dev] PETSc release?

Jed Brown jed at jedbrown.org
Mon Jul 24 12:59:39 CDT 2017


"Kong, Fande" <fande.kong at inl.gov> writes:
>> Correct.  The hash needs to be converted to a matrix so the maximum
>> memory usage is about double that of precise preallocation in advance.
>>
>
>
> Will  the memory be released in the hash after assembling the matrix?

Of course.

>> But this is only the first assembly, which is usually done before
>> setting up preconditioners and Krylov spaces so in most cases would not
>> significantly affect the maximum memory usage of the application.
>>
>
> If the nonzero structure changes over Newton iterations, and the maximum
> memory usage of the application may be larger than that with the precise
> preallocation.

That qualifies as a "not usual" use case, and yes, that's why precise
preallocation is better when you have it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170724/b26b491b/attachment.sig>


More information about the petsc-dev mailing list