[petsc-users] Call to DMSetMatrixPreallocateSkip not changing allocation behavior
Fackler, Philip
facklerpw at ornl.gov
Thu Dec 14 13:05:33 CST 2023
I'm using the following sequence of functions related to the Jacobian matrix:
DMDACreate1d(..., &da);
DMSetFromOptions(da);
DMSetUp(da);
DMSetMatType(da, MATAIJKOKKOS);
DMSetMatrixPreallocateSkip(da, PETSC_TRUE);
Mat J;
DMCreateMatrix(da, &J);
MatSetPreallocationCOO(J, ...);
I recently added the call to DMSetMatrixPreallocateSkip, hoping the allocation would be delayed to MatSetPreallocationCOO, and that it would require less memory. The documentation<https://petsc.org/release/manualpages/DM/DMSetMatrixPreallocateSkip/> says that the data structures will not be preallocated. The following data from heaptrack shows that the allocation is still happening in the call to DMCreateMatrix.
[cid:bda9ef12-a46f-47b2-9b9b-a4b2808b6b13]
Can someone help me understand this?
Thanks,
Philip Fackler
Research Software Engineer, Application Engineering Group
Advanced Computing Systems Research Section
Computer Science and Mathematics Division
Oak Ridge National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20231214/7375aeca/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 54775 bytes
Desc: image.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20231214/7375aeca/attachment-0001.png>
More information about the petsc-users
mailing list