Markus Berndt <[email protected]> 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.
pgpA_EVxFpMr5.pgp
Description: PGP signature
