[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory preallocation in python



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