Memory preallocation in python
Marek Wojciechowski
mwojc at p.lodz.pl
Mon Aug 21 06:11:21 CDT 2006
Hi,
i have a small problem in python. In case of matrix assembling -info says
me something like:
[0] MatSetUpPreallocationWarning not preallocating matrix storage
[0] MatAssemblyEnd_SeqAIJMatrix size: 6006 X 6006; storage space: 12084
unneeded,108036 used
[0] MatAssemblyEnd_SeqAIJNumber of mallocs during MatSetValues() is 6006
[0] MatAssemblyEnd_SeqAIJMaximum nonzeros in any row is 18
[0] Mat_CheckInodeFound 2002 nodes of 6006. Limit used: 5. Using Inode
routines
This obviously means poor behavior because of dynamical memory allocation.
Unfortunately, I have no idea how to preallocate memory for Mat objects in
python.
Any suggestions?
Greetings
--
Marek Wojciechowski
More information about the petsc-users
mailing list