memory allocation
Aron Ahmadia
aja2111 at columbia.edu
Mon Jul 2 13:58:22 CDT 2007
Dear Pan,
I don't see everything going on here, but you have to account for
around 1966080*(4 or 8) bytes + 1966080*21*(4 or 8) bytes of indexing
information for storing the locations of the data in the Matrix, then
if you're using doubles, 1966080*21*8 bytes of data information.
Adding these up, I get something closer to 500 MB. If PETSc is
consuming more than 2 GB, there's probably something else going on to
consume all that memory. Are you using GMRES to solve the system?
Try calling as simple a version of your code as you can that sets up
the mesh and pass in the -log flag on the command line and report back
with the results.
~A
On 7/2/07, li pan <li76pan at yahoo.com> wrote:
> Dear developers,
> last week I asked a question about memory allocation.
> I'm trying to comprehend it from another aspect. The
> question is, if I have a mesh (HEX8) of size 128 x 128
> x 40. There are three components for each node. In
> case of displacement, it's (u,v,w). So there must be
> 128 x 128 x 40 x 3 = 1966080 degrees of freedom. In
> sparse pattern, each element must have 7 x 3 = 21
> non-zeros, because each node has 6 neighbours, plus
> itself, it's 7 nodes, then multiply 3 components, we
> get 21. If everything is allright until now, we have
> 1966080 x 21 non-zeros in the system matrix. This
> corresponds 42 MB. I wonder why there was so much
> memory required by petsc, more than 2 GB.
> Probably, I'm wrong on some points. Please remind me.
>
> kind regards
>
> pan
>
>
>
>
> ____________________________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/
>
>
More information about the petsc-users
mailing list