[Pw_forum] Error encountered while attempting to allocate a data object.
Konstantin Kudin
konstantin_kudin at yahoo.com
Sat Jan 31 20:28:13 CET 2004
--- Paolo Giannozzi <giannozz at nest.sns.it> wrote:
> On Thursday 29 January 2004 00:01, Konstantin Kudin
> wrote:
>
> > It looks like the amount of memory for "diag:"
> got
> > wrapped around the 32-bit limit and became
> negative.
>
> that's strange: the amount of memory used is stored
> in real
> numbers, to avoid this kind of problem. Maybe your
> version
> was still using integer numbers.
Actually, the problem with the wrapped around
integers persists even in a recent CVS build. I've
taken a look at memory.f90 and noticed that even
though some of the expressions are assigned to a
floating point number, they contain all integer
arguments and thus are probably evaluated as integers
until the very last assignment.
A fix that requires not too much typing is to replace
in memory.f90:
> integer, parameter :: real_size = 8, int_size = 4
> integer, parameter :: comp_size = 2*real_size
By the following:
integer, parameter :: real_size_i = 8, int_size_i =
4
integer, parameter :: comp_size_i = 2*real_size_i
real(kind=DP) :: real_size,int_size,comp_size
... (and then a bit later) ...
real_size = float(real_size_i)
int_size = float(int_size_i)
comp_size = float(comp_size_i)
This forces floating point numbers for intermediate
values, and the estimates come out correctly.
Kostya
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
More information about the users
mailing list