[petsc-users] Can I eliminate all mallocs in parallel matrix assembly?
Jed Brown
jedbrown at mcs.anl.gov
Wed Oct 16 09:57:39 CDT 2013
Markus Berndt <berndt at lanl.gov> writes:
> I am trying to minimize the memory footprint of an application by
> specifying exactly how many nonzeros are needed per row of the matrix. I
> am pretty sure that I am correctly calculating these memory requirements
> for the diagonal and off diagonal parts of the parallel matrix (I am
> using MatCreateAIJ).
Either you have called another function later that clears the
preallocation information or the information you provided is incorrect.
What version of PETSc are you using? We currently set
MAT_NEW_NONZERO_ALLOCATION_ERR by default so you should get an error
when a new nonzero triggers allocation. You can catch that in a
debugger and figure out why there are more nonzeros than you allocated
for.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131016/c08b0a70/attachment.pgp>
More information about the petsc-users
mailing list