question about total allocated memory
Satish Balay
balay at mcs.anl.gov
Fri Jun 29 08:39:59 CDT 2007
On Fri, 29 Jun 2007, li pan wrote:
> Dear developers,
> I have a question about total allocated memory:
> I run my code under a PC with 2GB memory and got
> following error
> -----------------------------------------------------------------------
> [0]PETSC ERROR: PetscMallocAlign() line 62 in
> src/sys/src/memory/mal.c
> [0]PETSC ERROR: Out of memory. This could be due to
> allocating
> [0]PETSC ERROR: too large an object or bleeding by not
> properly
> [0]PETSC ERROR: destroying unneeded objects.
> [0]PETSC ERROR: Memory allocated 1234050304 Memory
> used by process 1099702272
> [0]PETSC ERROR: Try running with -malloc_dump or
> -malloc_log for info.
> [0]PETSC ERROR: Memory requested 766976840!
>
> Then I run it at another PC with 4GB memory. But got
> the same error.
Are these 2 machines in 32bit mode? Most 32bit OSes don't let a single
processes use more than 2GB of RAM [even if you have 4GB total]
> My question is, what the total memory
> needed. Is that 1234050304 + 766976840 ?
This is an estimate of the memory PETSc is keeping track of. The app
could be using more memory that the above number [for eg: if it uses
malloc() not PetscMalloc() etc..].
However normally memory available = RAM + swap [but due to this 2GB
limit on most 32bit OSes, the swap also doesn't help here]
Satish
More information about the petsc-users
mailing list