[petsc-users] Question about preallocation and getOwnership functions

Young, Matthew, Adam may at bu.edu
Thu Dec 4 09:43:10 CST 2014


Is there an advantage to using MatXAIJSetPreallocation (as Jed suggested) or either of the SEQ/MPI preallocation routines (as Hui originally considered) instead of calling MatSetUp to cover all cases?

-------------------------------------------
Matthew Young
Graduate Student
Boston University Dept. of Astronomy
-------------------------------------------


________________________________________
From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] on behalf of Jed Brown [jed at jedbrown.org]
Sent: Thursday, December 04, 2014 10:35 AM
To: Sun, Hui; petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] Question about preallocation and     getOwnership    functions

"Sun, Hui" <hus003 at ucsd.edu> writes:

> After reading some documentation, I figured it out myself. MATAIJ can
> be MATSEQAIJ or MATMPIAIJ, depending on the number of processors
> involved. Thus, I need to include the command
> MatSeqAIJSetPreallocation as well, to cover both cases.

Or call MatXAIJSetPreallocation and be done with it for all *AIJ
formats.


More information about the petsc-users mailing list