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

Re: Memory preallocation in python



On 8/21/06, Marek Wojciechowski <mwojc@xxxxxxxxx> wrote:

>   1) It would have to be for a subclass like MatSeqAIJ
>
>   2) It is setPreallocation()
>
>   Thanks,
>
>      Matt
>

Honestly, I can find neither subclass MatSeqAIJ nor the method
setPreallocation(). I create matrix as follows:

import PETSc.Mat
K = PETSc.Mat.Mat()   ## as far as i know this is the only way to create
matrix in python
K.setSizes(size, size, Size, Size)
K.setFromOptions ()
K.setType("seqaij")   ## i choose matrix type here, I don't know another
way...

Where is the moment to preallocate?

It may be that they never wrapped the preallocation methods. It seems strange, but
possible. I guess I would mail Lisandro and see.

  Matt

--
Marek Wojciechowski
--
"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness