This makes sense to me.  I thought the preallocation only applies to 
MatCreateMPIAIJwithArrays(?) and other more complicate functions.

The matrix coming out from ScaLAPACK will be repopulated into a sparse matrix 
in a much large scale.  Do I need to install elemental package in PETSc in 
order to use MATELEMENTAL?

Thanks, Jed.

Jinquan


From: petsc-users-bounces at mcs.anl.gov 
[mailto:[email protected]] On Behalf Of Jed Brown
Sent: Wednesday, August 08, 2012 11:54 AM
To: PETSc users list
Subject: Re: [petsc-users] Customizeing MatSetValuesBlocked(...)

On Wed, Aug 8, 2012 at 12:47 PM, Jinquan Zhong <jzhong at 
scsolutions.com<mailto:jzhong at scsolutions.com>> wrote:
Are you referring to preallocating memory for the size of A before 
MatSetValues(A, ...)?  I didn't do that.

This is very important.

http://www.mcs.anl.gov/petsc/documentation/faq.html#efficient-assembly


With petsc-dev, it is best to use MATELEMENTAL for dense matrices.

What are you trying to do with this dense martix?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120808/1d8fe2e5/attachment.html>

Reply via email to